Files
CMake/Tests/RunCMake/export/ForbiddenToExportInterfaceProperties.cmake
Wouter Klouwen 6db61f0725 Export: allow exporting of additional properties
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.
2018-03-16 09:00:56 -04:00

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
)