fixing runtime dependencies for cases with multiple values
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user