fixing runtime dependencies for cases with multiple values

This commit is contained in:
pappeste
2021-06-10 14:48:09 -07:00
parent 47c3c3a5d0
commit 355c5ced1f
2 changed files with 10 additions and 8 deletions
-1
View File
@@ -104,7 +104,6 @@ ly_add_target(
3rdParty::Qt::Gui
3rdParty::Qt::Widgets
3rdParty::Qt::Concurrent
3rdParty::Qt::WebEngineWidgets
3rdParty::tiff
3rdParty::squish-ccr
3rdParty::zlib
@@ -113,12 +113,13 @@ function(ly_get_runtime_dependencies ly_RUNTIME_DEPENDENCIES ly_TARGET)
set(imported_property IMPORTED_LOCATION)
endif()
set(target_locations)
get_target_property(current_target_locations ${ly_TARGET} ${imported_property})
if(current_target_locations)
string(APPEND target_locations ${current_target_locations})
unset(target_locations)
get_target_property(target_locations ${ly_TARGET} ${imported_property})
if(target_locations)
list(APPEND all_runtime_dependencies ${target_locations})
else()
# Check if the property exists for configurations
unset(target_locations)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)
unset(current_target_locations)
@@ -129,6 +130,7 @@ function(ly_get_runtime_dependencies ly_RUNTIME_DEPENDENCIES ly_TARGET)
# try to use the mapping
get_target_property(mapped_conf ${ly_TARGET} MAP_IMPORTED_CONFIG_${UCONF})
if(mapped_conf)
unset(current_target_locations)
get_target_property(current_target_locations ${ly_TARGET} ${imported_property}_${mapped_conf})
if(current_target_locations)
string(APPEND target_locations $<$<CONFIG:${conf}>:${current_target_locations}>)
@@ -136,10 +138,11 @@ function(ly_get_runtime_dependencies ly_RUNTIME_DEPENDENCIES ly_TARGET)
endif()
endif()
endforeach()
if(target_locations)
list(APPEND all_runtime_dependencies ${target_locations})
endif()
endif()
if(target_locations)
list(APPEND all_runtime_dependencies ${target_locations})
endif()
endif()
endif()