Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the find package in cmake optionally, now only vendored using submodules #17

Open
9 tasks done
gocarlos opened this issue Feb 25, 2020 · 7 comments · May be fixed by #46
Open
9 tasks done

use the find package in cmake optionally, now only vendored using submodules #17

gocarlos opened this issue Feb 25, 2020 · 7 comments · May be fixed by #46

Comments

@gocarlos
Copy link
Contributor

gocarlos commented Feb 25, 2020

By doing this we can use e.g. debian packages and do find_package or conan

debian

Todo

conan

most of the dependencies are already available in the conan center...

currently the submodules are forks of (patched) dependencies, probably this not the future we want to have

eventually

#4

@gocarlos
Copy link
Contributor Author

related: cose-wg/COSE-C#71

@wgtdkp
Copy link
Member

wgtdkp commented Feb 27, 2020

I am not sure if conan is the official way to go. Does conan support compiling binaries with specific configuration option? Take COSE-C for example, I'd like it be built with mbedtls rather than openSSL.

@gocarlos
Copy link
Contributor Author

I am not sure if conan is the official way to go. Does conan support compiling binaries with specific configuration option? Take COSE-C for example, I'd like it be built with mbedtls rather than openSSL.

sure, I'm doing exactly this with libcoap: conan-io/conan-center-index#929

@gocarlos
Copy link
Contributor Author

the C and CXX are passed to the build scripts to make sure all libraries are done with the same flags. libcxx and architecture

@wgtdkp
Copy link
Member

wgtdkp commented Mar 12, 2020

@gocarlos There are other users from the community that thinking conan will be problematic for their usage. I think git submodule currently works well for OT Commissioner (as many other opensource projects do). I am going to keep it as it is but you can still use conan on your own fork. Thanks for your efforts on this issue!

@wgtdkp wgtdkp closed this as completed Mar 12, 2020
@gocarlos
Copy link
Contributor Author

Actually the issue is not only for conan but in general: the cmake script should have an option to use the vendored dependencies or try to find the dependencies in the cmake_root...

This is important as when linking this library to other libs that e.g. also use MBEDTLS and so this in the standart way (find_package) then we get evtl. two versions of the same lib in the binary -> UB

This is important for debian packagers, conan psckagers, yocto packagers etc.

@gocarlos gocarlos changed the title use the conan package manager for the dependencies instead of using submodules use the find package in cmake optionally, now only vendored using submodules Mar 12, 2020
@wgtdkp
Copy link
Member

wgtdkp commented Mar 19, 2020

@gocarlos include dependencies with cmake find_package makes sense to me. Would you like to make a PR?

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 a pull request may close this issue.

2 participants