Files
CMake/Tests/RunCMake/ExportPackageInfo/Appendix.cmake
Matthew Woehlke 755a24ccae CPS: Add export support for [default_]license
Add `LICENSE` and `DEFAULT_LICENSE` arguments to the `PACKAGE_INFO`
modes of the `install` and `export` commands. If not otherwise
specified, the `LICENSE` will be taken from the project's
`SPDX_LICENSE`, if available.
2025-06-20 14:01:25 -04:00

19 lines
406 B
CMake

add_library(mammal INTERFACE)
add_library(canine INTERFACE)
target_link_libraries(canine INTERFACE mammal)
install(TARGETS mammal EXPORT mammal DESTINATION .)
install(TARGETS canine EXPORT canine DESTINATION .)
export(
EXPORT mammal
PACKAGE_INFO foo
VERSION 1.0
DEFAULT_LICENSE "LGPL-3.0-or-later")
export(
EXPORT canine
PACKAGE_INFO foo
APPENDIX dog
DEFAULT_LICENSE "GPL-3.0-or-later")