Files
CMake/Tests/RunCMake/InstallPackageInfo/BadArgs1.cmake
T
Matthew Woehlke ecf81c1bc1 CPS: Get metadata from project
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).
2025-06-02 10:31:36 -04:00

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)