diff options
-rw-r--r-- | src/cmake/cmake.d/03-macros.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmake/cmake.d/03-macros.cmake b/src/cmake/cmake.d/03-macros.cmake index 2d961a4..3ca6311 100644 --- a/src/cmake/cmake.d/03-macros.cmake +++ b/src/cmake/cmake.d/03-macros.cmake @@ -365,9 +365,12 @@ macro(project_targets_populate) ${TYPE} STREQUAL "INTERFACE_LIBRARY" OR ${TYPE} STREQUAL "EXECUTABLE" ) - set_property(TARGET ${TARGET} APPEND PROPERTY LINK_LIBRARIES ${link_libraries}) + foreach(linked_lib ${link_libraries}) + if(NOT ${linked_lib} STREQUAL ${TARGET}) + set_property(TARGET ${TARGET} APPEND PROPERTY LINK_LIBRARIES ${linked_lib}) + endif() + endforeach(linked_lib ${${link_libraries}}) endif() - get_target_property(SUBTYPE ${TARGET} LABELS) if(SUBTYPE) get_target_property(P ${TARGET} PREFIX) |