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

Make CMake install options for standalone only #156

Closed
robiwano opened this issue Aug 27, 2018 · 1 comment
Closed

Make CMake install options for standalone only #156

robiwano opened this issue Aug 27, 2018 · 1 comment
Labels

Comments

@robiwano
Copy link

By having a CMake variable:

unset(CLI11_STANDALONE)
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
    set(CLI11_STANDALONE TRUE)
endif()

it can be used to disable install(...) directives, so CLI11 can be used as a submodule in a larger project.

@henryiii
Copy link
Collaborator

henryiii commented Sep 3, 2018

Please verify this is now fixed in master through #159. I've used CLI11_INSTALL - it deactivates most of the installs if this is a subproject always, hopefully I left in the right bits to allow the CLI11 target to still work as a dependency of a parent project through the config script.

That is, find_package(NewProject CONFIG) should produce working targets even if NewProject's targets depend on CLI11::CLI11 and CLI11 is not found separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants