1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Make MySQL optional.

Only windows for now.
This commit is contained in:
Sandu Liviu Catalin 2020-03-22 18:57:00 +02:00
parent d79922d725
commit b08e9a2f3a
3 changed files with 6 additions and 3 deletions

View File

@ -4,6 +4,7 @@ project(SqMod)
# Several plugin options # Several plugin options
option(BUILTIN_RUNTIMES "Include the MinGW runtime into the binary itself." ON) option(BUILTIN_RUNTIMES "Include the MinGW runtime into the binary itself." ON)
option(FORCE_32BIT_BIN "Create a 32-bit executable binary if the compiler defaults to 64-bit." OFF) option(FORCE_32BIT_BIN "Create a 32-bit executable binary if the compiler defaults to 64-bit." OFF)
option(ENABLE_MYSQL "Enable the MySQL library." OFF)
# Default to c++14 standard # Default to c++14 standard
if(CMAKE_VERSION VERSION_LESS "3.1") if(CMAKE_VERSION VERSION_LESS "3.1")

View File

@ -77,7 +77,9 @@ target_link_libraries(SqModule VCMP Squirrel Sqrat SqSDK)
# Link to third-party libraries # Link to third-party libraries
target_link_libraries(SqModule SimpleINI HashLib B64Lib AES256Lib WhirlpoolLib TinyDir PUGIXML SQLite MaxmindDB) target_link_libraries(SqModule SimpleINI HashLib B64Lib AES256Lib WhirlpoolLib TinyDir PUGIXML SQLite MaxmindDB)
# Link to mysql client library # Link to mysql client library
target_link_libraries(SqModule mariadbclient) if(WIN32 AND ENABLE_MYSQL)
target_link_libraries(SqModule mariadbclient)
endif()
# #
if(FORCE_32BIT_BIN) if(FORCE_32BIT_BIN)
set_target_properties(SqModule PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32") set_target_properties(SqModule PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")

View File

@ -8,6 +8,6 @@ add_subdirectory(SQLite)
add_subdirectory(TinyDir) add_subdirectory(TinyDir)
add_subdirectory(Whirlpool) add_subdirectory(Whirlpool)
# Build our own mysql client on windows # Build our own mysql client on windows
if(WIN32) if(WIN32 AND ENABLE_MYSQL)
add_subdirectory(MDBC) add_subdirectory(MDBC)
endif(WIN32) endif()