File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ target_link_libraries(${PROJECT_NAME}
1616
1717if (MINGW)
1818 target_link_libraries (${PROJECT_NAME} ws2_32)
19+ target_link_options (${PROJECT_NAME} PRIVATE -static -libgcc -static -libstdc++)
1920endif ()
2021
2122target_include_directories (${PROJECT_NAME} PUBLIC
Original file line number Diff line number Diff line change 1+ set (CMAKE_SYSTEM_NAME Windows)
2+ set (CMAKE_SYSTEM_PROCESSOR x86)
3+
4+ set (CMAKE_C_COMPILER i686-w64-mingw32-gcc)
5+ set (CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
6+
7+ set (CMAKE_SYSROOT /usr/i686-w64-mingw32)
8+ set (CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
9+
10+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
11+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
12+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13+ set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
14+
15+ add_compile_definitions (WINDOWS)
Original file line number Diff line number Diff line change 1+ set (CMAKE_SYSTEM_NAME Windows)
2+ set (CMAKE_SYSTEM_PROCESSOR x86_64)
3+
4+ set (CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
5+ set (CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
6+
7+ set (CMAKE_SYSROOT /usr/x86_64-w64-mingw32)
8+ set (CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
9+
10+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
11+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
12+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13+ set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
14+
15+ add_compile_definitions (WINDOWS)
You can’t perform that action at this time.
0 commit comments