mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 05:11:15 -06:00
Add support for specifying CPS's supplemental `description` and `website` attributes. Add ability to inherit these from the `project()`, similar to how version information can be inherited.
33 lines
648 B
CMake
33 lines
648 B
CMake
project(foo
|
|
VERSION 1.2.3
|
|
COMPAT_VERSION 1.1.0
|
|
DESCRIPTION "Sample package"
|
|
HOMEPAGE_URL "https://www.example.com/package/foo"
|
|
)
|
|
|
|
add_library(foo INTERFACE)
|
|
install(TARGETS foo EXPORT foo DESTINATION .)
|
|
|
|
# Test inheriting from project matching package name.
|
|
export(
|
|
EXPORT foo
|
|
PACKAGE_INFO foo
|
|
)
|
|
|
|
# Test inheriting from a specified project.
|
|
export(
|
|
EXPORT foo
|
|
PROJECT foo
|
|
PACKAGE_INFO test1
|
|
)
|
|
|
|
# Test that inheriting doesn't override explicitly specified metadata.
|
|
export(
|
|
EXPORT foo
|
|
PROJECT foo
|
|
PACKAGE_INFO test2
|
|
VERSION 1.4.7
|
|
DESCRIPTION "Don't inherit"
|
|
HOMEPAGE_URL "https://www.example.com/package/bar"
|
|
)
|