From ddcc20fc3b4d628145194d880772bc2d5f58a9d9 Mon Sep 17 00:00:00 2001 From: Curve Date: Mon, 20 May 2024 17:57:18 +0200 Subject: [PATCH] refactor(cmake): add `-static` to mingw toolchain --- cmake/mingw-x64.cmake | 1 + cmake/mingw-x86.cmake | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/mingw-x64.cmake b/cmake/mingw-x64.cmake index 99668f6..707557b 100644 --- a/cmake/mingw-x64.cmake +++ b/cmake/mingw-x64.cmake @@ -5,6 +5,7 @@ add_compile_definitions(-DNTDDI_VERSION=0x0A000005) set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-c++) +set(CMAKE_CXX_FLAGS "-static") set(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32/") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) diff --git a/cmake/mingw-x86.cmake b/cmake/mingw-x86.cmake index 7fbc6f5..ca8f8c4 100644 --- a/cmake/mingw-x86.cmake +++ b/cmake/mingw-x86.cmake @@ -5,9 +5,10 @@ add_compile_definitions(-DNTDDI_VERSION=0x0A000005) set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER i686-w64-mingw32-c++) +set(CMAKE_CXX_FLAGS "-static") set(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32/") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)