-
Notifications
You must be signed in to change notification settings - Fork 38
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
Allow usage as submodule #29
Comments
This sounds like a good idea. I'm not a CMake expert though -- I know how to make an "interface library", but how do I do the namespacing bit? |
You use an ALIAS library:
This is mostly C&P from another project so double-check. You'll need to use a suitable project name (with the above users will be able to do
And yes it is a shame that so much boilerplate is required in CMake... If you got any questions, feel free to ask. I can also review a PR |
Would be great if this was usable as a git-submodule or via CMakes ExternalProject or FetchContent.
This requires
For the latter I'd suggest to remove the enable_testing and use:
This include adds an option BUILD_TESTING with default ON and enable_testing call if the current project is not the super project (aka cmake was called for another folder and this folder was added via add_subdirectory)
PS: CMAKE_CURRENT_SOURCE_DIR as used is not required and can be omitted.
The text was updated successfully, but these errors were encountered: