Skip to content

Commit

Permalink
refactor(cmake): add -static to mingw toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed May 20, 2024
1 parent c713881 commit ddcc20f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmake/mingw-x64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion cmake/mingw-x86.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

0 comments on commit ddcc20f

Please sign in to comment.