mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 20:29:49 -05:00
ecf81c1bc1
Modify {export,install}(PACKAGE_INFO) commands to inherit version
information from the current project in situations where it seems
reasonable to do so. Add an option to explicitly request inheritance
from a specific project.
This leverages the recently added project(COMPAT_VERSION).
7 lines
310 B
CMake
7 lines
310 B
CMake
add_library(foo INTERFACE)
|
|
install(TARGETS foo EXPORT foo DESTINATION .)
|
|
install(PACKAGE_INFO test EXPORT foo COMPAT_VERSION 1.0)
|
|
install(PACKAGE_INFO test EXPORT foo VERSION_SCHEMA simple)
|
|
install(PACKAGE_INFO test EXPORT foo PROJECT foo NO_PROJECT_METADATA)
|
|
install(PACKAGE_INFO test EXPORT foo PROJECT bar)
|