mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Fix built-in runtimes.
Avoid having to share mingw runtimes with the binary by embedding them in the binary via static linking.
This commit is contained in:
parent
fb4fc71169
commit
4e5aa5a292
@ -28,7 +28,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug)
|
|||||||
add_compile_options(-g)
|
add_compile_options(-g)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Include mingw runntime into the binary
|
# Include MINGW runtime into the binary
|
||||||
if(GCC OR MINGW)
|
if(GCC OR MINGW)
|
||||||
if(BUILTIN_RUNTIMES)
|
if(BUILTIN_RUNTIMES)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
|
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
|
||||||
|
@ -73,6 +73,12 @@ add_library(SqModule MODULE
|
|||||||
Misc/Vehicle.cpp Misc/Vehicle.hpp
|
Misc/Vehicle.cpp Misc/Vehicle.hpp
|
||||||
Misc/Weapon.cpp Misc/Weapon.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
|
# Link to libraries
|
||||||
target_link_libraries(SqModule SqModSDK SimpleINI HashLib B64Lib AES256Lib WhirlpoolLib TinyDir PUGIXML SQLite MaxmindDB SimpleSocket)
|
target_link_libraries(SqModule SqModSDK SimpleINI HashLib B64Lib AES256Lib WhirlpoolLib TinyDir PUGIXML SQLite MaxmindDB SimpleSocket)
|
||||||
# Link to mysql client library
|
# Link to mysql client library
|
||||||
|
Loading…
Reference in New Issue
Block a user