Skip to content

Commit

Permalink
config_type
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Jul 2, 2024
1 parent cb2fdc6 commit d5014c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Config.cmake/mergestaticlibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ function(merge_static_libs outlib)
message(FATAL_ERROR "Merge_static_libs can only process static libraries\n\tlibraries: ${lib}\n\tlibtype ${libtype}")
endif()
if(multiconfig)
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
foreach(config_type ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${config_type}" CONFIG_TYPE)
get_target_property(libfile ${lib} "IMPORTED_LOCATION_${CONFIG_TYPE}")
message(STATUS "CONFIG_TYPE=${CONFIG_TYPE} libfile=${libfile}")
message(STATUS "${lib}=${lib} CONFIG_TYPE=${CONFIG_TYPE} libfile=${libfile}")
if (libfile)
list(APPEND libfiles_${CONFIG_TYPE} ${libfile})
list(APPEND libfiles ${libfile})
Expand All @@ -56,7 +57,8 @@ function(merge_static_libs outlib)
# Now the easy part for MSVC and for MAC
if(MSVC)
# lib.exe does the merging of libraries just need to conver the list into string
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
foreach(config_type ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${config_type}" CONFIG_TYPE)
set(flags "")
foreach(lib ${libfiles_${CONFIG_TYPE}})
set(flags "${flags} ${lib}")
Expand Down

0 comments on commit d5014c3

Please sign in to comment.