File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,6 +340,24 @@ if(LSLTEMPLATE_BUILD_GUI)
340340 endif ()
341341endif ()
342342
343+ # =============================================================================
344+ # MinGW Runtime Deployment
345+ # Copy MinGW runtime DLLs so executables work outside the build environment
346+ # =============================================================================
347+ if (MINGW)
348+ get_filename_component (MINGW_BIN_DIR "${CMAKE_CXX_COMPILER} " DIRECTORY )
349+ set (MINGW_RUNTIME_DLLS
350+ "${MINGW_BIN_DIR} /libgcc_s_seh-1.dll"
351+ "${MINGW_BIN_DIR} /libstdc++-6.dll"
352+ "${MINGW_BIN_DIR} /libwinpthread-1.dll"
353+ )
354+ foreach (_dll ${MINGW_RUNTIME_DLLS} )
355+ if (EXISTS "${_dll} " )
356+ install (FILES "${_dll} " DESTINATION "${INSTALL_BINDIR} " )
357+ endif ()
358+ endforeach ()
359+ endif ()
360+
343361# =============================================================================
344362# macOS: Code Sign
345363# This runs after Qt deployment. We sign the entire bundle with entitlements.
You can’t perform that action at this time.
0 commit comments