mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
Add `install_prep/<component>` convenience targets to the Ninja
generators to build dependencies of install components, and
`install_prep/all` to build the dependencies of all install components.
This is similar in flavor to commit ba6b6fbc24 (Ninja: Add Build
Dependencies for Tests, 2026-04-07), but here for the install command.
Co-authored-by: Tyler Yankee <tyler.yankee@kitware.com>
Issue: #27643
18 lines
382 B
CMake
18 lines
382 B
CMake
enable_language(C)
|
|
|
|
add_library(debug_only STATIC EXCLUDE_FROM_ALL lib.c)
|
|
install(TARGETS debug_only
|
|
ARCHIVE DESTINATION lib
|
|
COMPONENT Configured
|
|
CONFIGURATIONS Debug
|
|
)
|
|
|
|
add_library(release_only STATIC EXCLUDE_FROM_ALL lib.c)
|
|
install(TARGETS release_only
|
|
ARCHIVE DESTINATION lib
|
|
COMPONENT Configured
|
|
CONFIGURATIONS Release
|
|
)
|
|
|
|
add_library(unit_tests STATIC neverbuild.c)
|