CMake: use the target property OUTPUT_NAME instead of LOCATION in wx_get_dependencies
This commit is contained in:
parent
ad9175d79b
commit
537564ae19
@ -33,12 +33,12 @@ macro(wx_get_dependencies var lib)
|
|||||||
get_target_property(deps ${lib} LINK_LIBRARIES)
|
get_target_property(deps ${lib} LINK_LIBRARIES)
|
||||||
foreach(dep IN LISTS deps)
|
foreach(dep IN LISTS deps)
|
||||||
if(TARGET ${dep})
|
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()
|
else()
|
||||||
set(dep_path ${dep})
|
get_filename_component(dep_name ${dep} NAME)
|
||||||
endif()
|
endif()
|
||||||
get_filename_component(name ${dep_path} NAME)
|
wx_string_append(${var} "${dep_name} ")
|
||||||
wx_string_append(${var} "${name} ")
|
|
||||||
endforeach()
|
endforeach()
|
||||||
string(STRIP ${${var}} ${var})
|
string(STRIP ${${var}} ${var})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user