From 38ca2d53099c6b2b8ca424027a05acab665d6416 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Mon, 27 Oct 2025 18:56:38 +0100 Subject: [PATCH] Windows: link static c++/gcc --- cmake/windows-mingw-x86_64.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/windows-mingw-x86_64.cmake b/cmake/windows-mingw-x86_64.cmake index a422ebc..6a9443a 100644 --- a/cmake/windows-mingw-x86_64.cmake +++ b/cmake/windows-mingw-x86_64.cmake @@ -9,3 +9,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +# Force Static linked c++ and libgcc +set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++")