-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
Propagate cmake arguments to superbuild dependencies #876
Conversation
bcf3496
to
75fa1d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that's fine.
4e8f51f
to
b897b29
Compare
4e8d127
to
bf890e5
Compare
Finally passed the CI, there were connection issues yesterday. Two things to note:
@julianoes: As mentioned already, I'm not completely sure about this change. I like the idea of not having to go through all the dependencies everytime I want to support a new option (like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it!
* propagate cmake arguments to superbuild dependencies * update tinyxml
This propagates the cmake arguments to the superbuild dependencies. It works by extracting the arguments into
${CL_ARGS}
(beforeproject()
is called!), and then propagating that to the dependencies (throughbuild_target.cmake
).The
CMAKE_ARGS
defined in each dependency's CMakeLists.txt are overriding values. For instance, we always want to build our dependencies as static libs, and therefore we setBUILD_SHARED_LIBS=OFF
, no matter what the command line argument was. That's why${CL_ARGS}
appears at the top of the lists of arguments.Note that we still need to manually set
CMAKE_PREFIX_PATH
andCMAKE_INSTALL_PREFIX
, because they come from ourDEPS_INSTALL_PATH
option, and are therefore independent from the cmake command line arguments.As an example, if we now set an Android-specific argument like
ANDROID_STL
, it automatically gets propagated to all our dependencies.I believe that's an improvement, but I'm open to discussion if you think it is convoluted, @julianoes 😅.