diff --git a/build/cmake/config.cmake b/build/cmake/config.cmake index 39a4257d9d..90277f3955 100644 --- a/build/cmake/config.cmake +++ b/build/cmake/config.cmake @@ -33,12 +33,12 @@ macro(wx_get_dependencies var lib) get_target_property(deps ${lib} LINK_LIBRARIES) foreach(dep IN LISTS deps) if(TARGET ${dep}) - get_target_property(dep_path ${dep} LOCATION) + get_target_property(dep_name ${dep} OUTPUT_NAME) + set(dep_name "-l${dep_name}") else() - set(dep_path ${dep}) + get_filename_component(dep_name ${dep} NAME) endif() - get_filename_component(name ${dep_path} NAME) - wx_string_append(${var} "${name} ") + wx_string_append(${var} "${dep_name} ") endforeach() string(STRIP ${${var}} ${var}) endif()