Skip to content

Use Conan for easier dependency management - #2

Merged
mschneider merged 2 commits into
mschneider:mainfrom
bdhobare:conan
Feb 10, 2022
Merged

mschneider merged 2 commits into
mschneider:mainfrom
bdhobare:conan

Conversation

@bdhobare

Copy link
Copy Markdown
Collaborator

Conan.io is a popular dependency management tool for C/C++ projects. It relieves us of the troubles of manually managing each library in CMake.

  • Added support for Conan for easier dependency management.
  • Updated the build guide.

Note
Building libcurl with gcc-9+ on MacOS currently fails because of [this issue] (curl/curl#4821). Try clang if this happens.

@Sfinx

Sfinx commented Feb 10, 2022

Copy link
Copy Markdown

: Building libcurl with gcc-9+ on MacOS currently fails because of [this issue] (curl/curl#4821). Try clang if this happens.

btw: cpr already includes and builds curl/libcurl and it is pure c++

@mschneider

Copy link
Copy Markdown
Owner

this is awesome

@mschneider
mschneider merged commit 204fb75 into mschneider:main Feb 10, 2022
@mschneider

Copy link
Copy Markdown
Owner

do you think it's worth removing curl from the dependencies if cpr already includes it?

@Sfinx

Sfinx commented Feb 11, 2022

Copy link
Copy Markdown

sure, it is extra unneeded dep:

root@Shiva:/opt# ls -l cpr
total 8
drwxrwxr-x 4 root root 4096 фев  9 22:33 include/
drwxrwxr-x 4 root root 4096 фев  9 22:33 lib/
root@Shiva:/opt# ls -l cpr/include
total 108
drwxr-xr-x 2 root root  4096 фев  9 22:33 cpr/
drwxr-xr-x 2 root root  4096 фев  9 22:33 curl/
-rw-r--r-- 1 root root  5297 фев  9 22:32 zconf.h
-rw-r--r-- 1 root root 94060 фев  9 22:32 zlib.h
root@Shiva:/opt# ls -l cpr/lib
total 1480
drwxrwxr-x 3 root root   4096 фев  9 22:33 cmake/
-rw-r--r-- 1 root root 318494 фев  9 22:32 libcpr.a
-rw-r--r-- 1 root root 988868 фев  9 22:32 libcurl.a
-rw-r--r-- 1 root root 194018 фев  9 22:32 libz.a
drwxrwxr-x 2 root root   4096 фев  9 22:33 pkgconfig/
root@Shiva:/opt# 

@bdhobare

Copy link
Copy Markdown
Collaborator Author

sure, it is extra unneeded dep:

root@Shiva:/opt# ls -l cpr
total 8
drwxrwxr-x 4 root root 4096 фев  9 22:33 include/
drwxrwxr-x 4 root root 4096 фев  9 22:33 lib/
root@Shiva:/opt# ls -l cpr/include
total 108
drwxr-xr-x 2 root root  4096 фев  9 22:33 cpr/
drwxr-xr-x 2 root root  4096 фев  9 22:33 curl/
-rw-r--r-- 1 root root  5297 фев  9 22:32 zconf.h
-rw-r--r-- 1 root root 94060 фев  9 22:32 zlib.h
root@Shiva:/opt# ls -l cpr/lib
total 1480
drwxrwxr-x 3 root root   4096 фев  9 22:33 cmake/
-rw-r--r-- 1 root root 318494 фев  9 22:32 libcpr.a
-rw-r--r-- 1 root root 988868 фев  9 22:32 libcurl.a
-rw-r--r-- 1 root root 194018 фев  9 22:32 libz.a
drwxrwxr-x 2 root root   4096 фев  9 22:33 pkgconfig/
root@Shiva:/opt# 

Thanks. We can do this in a follow up PR.

@bdhobare
bdhobare deleted the conan branch March 26, 2022 22:40
mschneider pushed a commit that referenced this pull request Oct 14, 2022
Json parsing into structs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants