aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/toolchain.windows.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/toolchain.windows.cmake b/cmake/toolchain.windows.cmake
index 4a4f2718..3ff6cbaa 100644
--- a/cmake/toolchain.windows.cmake
+++ b/cmake/toolchain.windows.cmake
@@ -11,6 +11,12 @@ SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_C_COMPILER "gcc.exe")
SET(CMAKE_CXX_COMPILER "g++.exe")
+set(LINKER_FLAGS "-static -static-libgcc -static-libstdc++")
+
+set(CMAKE_SHARED_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE)
+set(CMAKE_MODULE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE)
+
# here is the target environment located
#SET(CMAKE_FIND_ROOT_PATH "/usr/${HOST}")