mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
df3e246bc1
Add import/export support and documentation for the SPDX_LICENSE target property. A target's license can be specified by setting this property to an SPDX license expression. CMake and CPS-format export files generated with `export()` or `install()` will retain the license information. CMake also imports the license property for imported targets. Closes: #26706
7 lines
253 B
CMake
7 lines
253 B
CMake
add_library(foo INTERFACE)
|
|
set_property(TARGET foo PROPERTY SPDX_LICENSE "BSD-3-Clause")
|
|
|
|
install(TARGETS foo EXPORT foo)
|
|
install(EXPORT foo DESTINATION lib/cmake/foo)
|
|
install(FILES foo-config.cmake.in RENAME foo-config.cmake DESTINATION lib/cmake/foo)
|