diff --git a/CMakeLists.txt b/CMakeLists.txt index d66df50..325fd37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,4 +15,5 @@ if(WIN32) # find_library(ws2_32_library NAMES libws2_32.a HINTS /usr/x86_64-w64-mingw32/lib) target_link_libraries(hoymilesClient_exec "/usr/x86_64-w64-mingw32/lib/libws2_32.a") set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES}-static-libgcc -static-lstdc++ -lwsock32 -lw2_32") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive") endif(WIN32) \ No newline at end of file