Repository navigation
build!: flatten install paths and fix subproject consumption - #87
Merged
Merged
Conversation
Install layout is now lib/cmake/thread-pool (config, config-version, targets) plus include/thread_pool headers, with no version-suffixed directories, so find_package and vcpkg need no path patching. The new TP_INSTALL option gates all install rules and defaults to the top-level project, so consuming thread-pool via add_subdirectory no longer pulls in test dependencies or install rules. PROJECT_VERSION_TWEAK is normalised to 0 so the installed version header never defines an empty macro. Also tidy the normalization check to if(NOT PROJECT_VERSION_TWEAK) (an empty string is already falsy in if()), and scope the CMakePackageConfigHelpers include to the TP_INSTALL block since its only consumers already live there; only GNUInstallDirs needs to run early, for the always-active INSTALL_INTERFACE generator expression. Note that installed CMake config files move from the old version-suffixed lib directory to lib/cmake/thread-pool. This is a breaking change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Install layout is now lib/cmake/thread-pool (config, config-version, targets) plus include/thread_pool headers, with no version-suffixed directories, so find_package and vcpkg need no path patching. The new TP_INSTALL option gates all install rules and defaults to the top-level project, so consuming thread-pool via add_subdirectory no longer pulls in test dependencies or install rules. PROJECT_VERSION_TWEAK
is normalised to 0 so the installed version header never defines an empty macro.
Also tidy the normalization check to if(NOT PROJECT_VERSION_TWEAK) (an empty string is already falsy in if()), and scope the CMakePackageConfigHelpers include to the TP_INSTALL block since its only consumers already live there; only GNUInstallDirs needs to run early, for the always-active INSTALL_INTERFACE generator expression.
Note that installed CMake config files move from the old version-suffixed lib directory to lib/cmake/thread-pool. This is a breaking change.