Files
CMake/Tests/RunCMake/ExportPackageInfo/BadArgs2.cmake
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
348 B
CMake

add_library(foo INTERFACE)
install(TARGETS foo EXPORT foo DESTINATION .)
export(EXPORT foo PACKAGE_INFO foo APPENDIX test VERSION 1.0)
export(EXPORT foo PACKAGE_INFO foo APPENDIX test DEFAULT_TARGETS foo)
export(EXPORT foo PACKAGE_INFO foo APPENDIX test DEFAULT_CONFIGURATIONS Release)
export(EXPORT foo PACKAGE_INFO foo APPENDIX test PROJECT foo)