File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,7 +134,28 @@ if(MINGW)
134134 target_link_libraries (OMSimulatorLib_static PUBLIC shlwapi )
135135endif ()
136136
137-
137+ ## copy dependent DLL's for mingw artifacts
138+ if (ICU_FOUND)
139+ message (STATUS "ICU_LIBRARIES_FOUND: ${ICU_LIBRARIES} " )
140+ if (MINGW)
141+ list (GET ICU_LIBRARIES 0 ICU_PATH)
142+ get_filename_component (DLL_DIR "${ICU_PATH} /../../bin" ABSOLUTE )
143+ message (STATUS "DLL_DIR: ${DLL_DIR} " )
144+ # collect all DLLs matching the pattern
145+ file (GLOB DLL_LIST
146+ "${DLL_DIR} /libicuuc*.dll"
147+ "${DLL_DIR} /libicudt*.dll"
148+ "${DLL_DIR} /libstdc++*.dll" )
149+ # Check if the DLL_LIST is not empty before installing
150+ if (DLL_LIST)
151+ # Install the files from the list to the 'bin' directory
152+ install (FILES ${DLL_LIST} DESTINATION ${CMAKE_INSTALL_PREFIX} /bin)
153+ message (STATUS "Copied files from: ${DLL_LIST} to ${CMAKE_INSTALL_PREFIX} /bin" )
154+ else ()
155+ message (WARNING "No DLLs found matching the pattern" )
156+ endif ()
157+ endif ()
158+ endif ()
138159
139160install (TARGETS OMSimulatorLib)
140161install (TARGETS OMSimulatorLib_static)
You can’t perform that action at this time.
0 commit comments