Allow setting EXPORT_PROPERTIES on exported INTERFACE targets
Hi,
I have the following sample project which I would like to work.
cmake_minimum_required(VERSION 3.14.0)
project(exported_props LANGUAGES CXX)
add_library(foo INTERFACE)
set_target_properties(foo PROPERTIES INTERFACE_DISABLED_FEATURES feat1)
set_target_properties(foo PROPERTIES EXPORT_PROPERTIES "INTERFACE_DISABLED_FEATURES")
install(TARGETS foo EXPORT bar)
install(EXPORT bar DESTINATION ${CMAKE_BINARY_DIR})
When I invoke CMake on the project I get
CMake Error at CMakeLists.txt:6 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "EXPORT_PROPERTIES" is not allowed.
Commenting out the EXPORT_PROPERTIES line makes the project configure, but of course when installing, the created bar.cmake file will not contain my custom INTERFACE property INTERFACE_DISABLED_FEATURES.
Would it be possible to support this?
The use case is for building Qt, where we have a global interface target which passes information about which features were enabled or disabled while building Qt. All library targets then link against the interface target, and can thus have access to the feature information.