Index: cmake/modules/SingleMultiSource.cmake =================================================================== --- cmake/modules/SingleMultiSource.cmake +++ cmake/modules/SingleMultiSource.cmake @@ -63,12 +63,9 @@ # append_ldflags - add flags to the LDFLAGS for target. macro(append_ldflags target flags) if(NOT "${${flags}}" STREQUAL "") - get_target_property(old_ldflags ${target} LINK_FLAGS) - if(${old_ldflags} STREQUAL "old_ldflags-NOTFOUND") - set(old_ldflags) - endif() - string(REPLACE ";" " " s "${old_ldflags};${${flags}}") - set_target_properties(${target} PROPERTIES LINK_FLAGS ${s}) + foreach(var IN LISTS ${flags}) + target_link_libraries(${target} ${var}) + endforeach() endif() endmacro()