Skip to content

build!: flatten install paths and fix subproject consumption - #87

Merged
ptsouchlos merged 1 commit into
mainfrom
build/flatten-install-tree
Sep 10, 2026
Merged

ptsouchlos merged 1 commit into
mainfrom
build/flatten-install-tree

Conversation

@ptsouchlos

Copy link
Copy Markdown
Owner

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.

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.
@ptsouchlos
ptsouchlos merged commit 198e7c2 into main Sep 10, 2026
12 checks passed
@ptsouchlos
ptsouchlos deleted the build/flatten-install-tree branch September 10, 2026 19:20
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.

1 participant