diff --git a/CMakeLists.txt b/CMakeLists.txt index dc8d8e82..a6688cea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) add_compile_options(-g) endif() -# Include mingw runntime into the binary +# Include MINGW runtime into the binary if(GCC OR MINGW) if(BUILTIN_RUNTIMES) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index 552b552f..819f7f62 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -73,6 +73,12 @@ add_library(SqModule MODULE Misc/Vehicle.cpp Misc/Vehicle.hpp Misc/Weapon.cpp Misc/Weapon.hpp ) +# Include MINGW runtime into the binary +if(GCC OR MINGW) + if(BUILTIN_RUNTIMES) + target_link_libraries (SqModule -static gcc stdc++ winpthread -dynamic) + endif() +endif() # Link to libraries target_link_libraries(SqModule SqModSDK SimpleINI HashLib B64Lib AES256Lib WhirlpoolLib TinyDir PUGIXML SQLite MaxmindDB SimpleSocket) # Link to mysql client library