Files
Matthew Woehlke 34343922a5 install: Add ability to generate CPS from install(EXPORT)
Add the ability to generate CPS package information when install(EXPORT)
is used. This relies on additional information to be passed to CMake,
and is intended as a way of getting CPS out of existing projects without
needing to make changes to the projects' CMakeLists.txt. (Particularly,
this feature is intended for package distributors, not project authors.)
2025-11-11 11:51:58 -05:00

13 lines
326 B
CMake

set(CMAKE_INSTALL_EXPORTS_AS_PACKAGE_INFO
cow:Farm/l/cps
pig:Farm/laextra/cps
)
add_library(Cow INTERFACE)
add_library(Pig INTERFACE)
install(TARGETS Cow EXPORT cow)
install(TARGETS Pig EXPORT pig)
install(EXPORT cow FILE farm-targets.cmake DESTINATION .)
install(EXPORT pig FILE farm-targets-extra.cmake DESTINATION .)