mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
This change introduces an additional property that may be set on a target to allow additional properties to be exported. Normally only a limited number of properties are exported. Additional properties may be exported by simply setting the `EXPORT_PROPERTIES` property on a target that is exported.
13 lines
341 B
CMake
13 lines
341 B
CMake
enable_language(CXX)
|
|
add_library(foo empty.cpp)
|
|
set_target_properties(foo PROPERTIES
|
|
INTERFACE_FOOBAR "Some string"
|
|
EXPORT_PROPERTIES "INTERFACE_FOOBAR"
|
|
)
|
|
export(TARGETS foo FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
|
|
install(TARGETS foo EXPORT fooExport
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib
|
|
)
|