for STATIC libraries, target_link_libraries always populates INTERFACE_LINK_LIBRARIES
Hi,
I discovered the command target_link_libraries ignores PRIVATE keyword and always populates INTERFACE_LINK_LIBRARIES.
For instance if I write:
add_library(testT STATIC utils.cpp)
target_link_libraries(testT PRIVATE othertarget)
get_target_property(interface testT INTERFACE_LINK_LIBRARIES)
message("${interface}")
add_library(testD SHARED test.cpp)
target_link_libraries(testD PRIVATE othertarget)
get_target_property(interface testD INTERFACE_LINK_LIBRARIES)
message("${interface}")
I see
$<LINK_ONLY:othertarget>
interface-NOTFOUND
Is it intended behavior? I whould have expect that testT have access to includes from othertarget but that nothing was transfered to the dependencies of testT.
Best Regards