mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-22 06:31:29 -06:00
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.
19 lines
406 B
CMake
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")
|