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

CMake: Optional Install if Embedded #185

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

ax3l
Copy link
Contributor

@ax3l ax3l commented Mar 4, 2022

When adding this library as embedded library with private "target link", e.g., only used inside private source files, the library does not need to be installed when the main project gets installed.

This adds an additional option toml11_INSTALL similar to the test-build control switch in order to skip installing headers and CMake config files if requested.

Avoids using

add_subdirectory(path/to/toml11 EXCLUDE_FROM_ALL)

which has further side-effects:
https://cmake.org/cmake/help/v3.0/command/add_subdirectory.html

When adding this library as embedded library with private
"target link", e.g., only used inside private source files, the
library does not need to be installed when the main project gets
installed.

This adds an additional option `toml11_INSTALL` similar to the
test-build control switch in order to skip installing headers and
CMake config files if requested.

Avoids using
```cmake
add_subdirectory(path/to/toml11 EXCLUDE_FROM_ALL)
```

which has further side-effects:
https://cmake.org/cmake/help/v3.0/command/add_subdirectory.html
@ax3l
Copy link
Contributor Author

ax3l commented Mar 6, 2022

ping @ToruNiina 👋

Hi, can you please approve my PR for CI and potentially review/merge it? Please let me know if you have any questions on it :)
Thanks already!

@ToruNiina ToruNiina merged commit d39fd88 into ToruNiina:master Mar 7, 2022
@ToruNiina
Copy link
Owner

LGTM.

@ax3l ax3l deleted the topic-installEmbed branch March 7, 2022 18:36
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.

2 participants