CMake/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake
Stephen Kelly b8dc7fad23 Genex: Disallow LINKER_LANGUAGE only when used on a static library.
For shared libraries and executables, the linker_language is
indepenedent of the linked libraries.
2013-07-26 16:58:25 +02:00

5 lines
159 B
CMake

add_library(foo STATIC empty.cpp)
add_library(bar STATIC empty.cpp)
target_link_libraries(foo $<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,anything>:bar>)