Clarification request for add_libary(targ INTEFACE)
What is goal of add_libary(targ INTEFACE)?
Is it to support "inherited build properties" not dependent on the directory structure of CMake?
If goal is to support "inherited build properties" why does the following attempt to build a "template of build properties" for MATLAB mex libraries, something that is seemingly be a valid need, not work:
add_library( mex_interface INTERFACE ) set_target_properties( mex_interface PROPERTIES SUFFIX ".mex64" LINK_FLAGS /export:mex_function )
add_library( targ SHARED main.cpp )
add_library( targ2 SHARED main2.cpp )
target_link_libraries( targ1 mex_interface )
target_link_libraries( targ2 mex_interface )
with error:
CMake Error at CMakeLists.txt:45 (set_target_properties): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "SUFFIX" is not allowed.
CMake Error at CMakeLists.txt:45 (set_target_properties): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "LINK_FLAGS" is not allowed.