Files
Taylor SasserandTyler Yankee 0ea2d28b54 Ninja: Add install_prep targets for minimal builds
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
2026-10-12 12:23:46 -04:00

18 lines
411 B
CMake

enable_language(C)
add_library(runtime_helper STATIC lib.c)
add_executable(runtime EXCLUDE_FROM_ALL runtime.c)
target_link_libraries(runtime PRIVATE runtime_helper)
install(TARGETS runtime
RUNTIME DESTINATION bin
COMPONENT Runtime
)
add_library(other_component STATIC neverbuild.c)
install(TARGETS other_component
ARCHIVE DESTINATION lib
COMPONENT Other
)
add_library(unit_tests STATIC neverbuild.c)