Files
CMake/Tests/RunCMake/ExportPackageInfo/Metadata.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

16 lines
400 B
CMake

add_library(foo INTERFACE)
install(TARGETS foo EXPORT foo DESTINATION .)
export(
EXPORT foo
PACKAGE_INFO foo
VERSION 1.2.3
VERSION_SCHEMA simple
COMPAT_VERSION 1.2.0
DEFAULT_TARGETS foo
DEFAULT_CONFIGURATIONS release debug
LICENSE "BSD-3-Clause AND CC-BY-SA-4.0"
DEFAULT_LICENSE "BSD-3-Clause"
DESCRIPTION "Sample package"
HOMEPAGE_URL "https://www.example.com/package/foo"
)