mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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
348 B
CMake
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)
|