File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -164,14 +164,17 @@ function(bundle_static_library name deps)
164164 )
165165
166166 elseif (CMAKE_C_COMPILER_ID MATCHES "^MSVC$" )
167- message (STATUS "Dumping all CMAKE variables..." )
168- get_cmake_property (_variableNames VARIABLES )
169- list (SORT _variableNames)
170- foreach (_variableName ${_variableNames} )
171- message (STATUS "${_variableName} =${${_variableName} }" )
167+ foreach (tgt IN LISTS deps)
168+ list (APPEND static_libs_full_names $<TARGET_FILE:${tgt} >)
172169 endforeach ()
173170
174- message (FATAL_ERROR "Don't know how to proceed with compiler ${CMAKE_C_COMPILER_ID} !" )
171+ add_custom_command (
172+ COMMAND ${CMAKE_AR} /OUT:${tgt_full_name} ${static_libs_full_names}
173+ OUTPUT ${tgt_full_name}
174+ COMMENT "Bundling ${name} "
175+ VERBATIM
176+ COMMAND_EXPAND_LISTS
177+ )
175178 else ()
176179 message (FATAL_ERROR "Unknown bundling for C compiler ${CMAKE_C_COMPILER_ID} !" )
177180 endif ()
You can’t perform that action at this time.
0 commit comments