File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,6 +299,24 @@ if(EGIAMP_BUILD_GUI)
299299 endif ()
300300endif ()
301301
302+ # =============================================================================
303+ # MinGW Runtime Deployment
304+ # Copy MinGW runtime DLLs so executables work outside the build environment
305+ # =============================================================================
306+ if (MINGW)
307+ get_filename_component (MINGW_BIN_DIR "${CMAKE_CXX_COMPILER} " DIRECTORY )
308+ set (MINGW_RUNTIME_DLLS
309+ "${MINGW_BIN_DIR} /libgcc_s_seh-1.dll"
310+ "${MINGW_BIN_DIR} /libstdc++-6.dll"
311+ "${MINGW_BIN_DIR} /libwinpthread-1.dll"
312+ )
313+ foreach (_dll ${MINGW_RUNTIME_DLLS} )
314+ if (EXISTS "${_dll} " )
315+ install (FILES "${_dll} " DESTINATION "${INSTALL_BINDIR} " )
316+ endif ()
317+ endforeach ()
318+ endif ()
319+
302320# =============================================================================
303321# macOS: Code signing
304322# =============================================================================
You can’t perform that action at this time.
0 commit comments