mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
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.)
13 lines
326 B
CMake
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 .)
|