mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-31 05:01:47 +02:00
Add MariaDB Connector/C as a built-in alternative (v3.2.3).
This commit is contained in:
12
vendor/POCO/CMakeLists.txt
vendored
12
vendor/POCO/CMakeLists.txt
vendored
@@ -113,10 +113,16 @@ else()
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_MYSQL)
|
||||
find_package(MySQL REQUIRED)
|
||||
if (NOT ENABLE_BUILTIN_MYSQL_C)
|
||||
if(ENABLE_DATA_MYSQL)
|
||||
find_package(MySQL REQUIRED)
|
||||
else()
|
||||
find_package(MySQL)
|
||||
endif()
|
||||
else()
|
||||
find_package(MySQL)
|
||||
SET(MYSQL_FOUND TRUE)
|
||||
SET(MYSQL_LIBRARIES "mariadbclient")
|
||||
get_target_property(MYSQL_INCLUDE_DIRS mariadbclient INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
|
||||
if(MYSQL_FOUND)
|
||||
|
2
vendor/POCO/Data/CMakeLists.txt
vendored
2
vendor/POCO/Data/CMakeLists.txt
vendored
@@ -45,7 +45,7 @@ else(ENABLE_DATA_SQLITE)
|
||||
message(STATUS "SQLite Support Disabled")
|
||||
endif()
|
||||
|
||||
if(MYSQL_FOUND AND ENABLE_DATA_MYSQL)
|
||||
if((ENABLE_BUILTIN_MYSQL_C OR MYSQL_FOUND) AND ENABLE_DATA_MYSQL)
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
add_subdirectory(MySQL)
|
||||
else()
|
||||
|
14
vendor/POCO/Data/MySQL/CMakeLists.txt
vendored
14
vendor/POCO/Data/MySQL/CMakeLists.txt
vendored
@@ -20,8 +20,11 @@ set_target_properties(DataMySQL
|
||||
OUTPUT_NAME PocoDataMySQL
|
||||
DEFINE_SYMBOL MySQL_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
|
||||
if (ENABLE_BUILTIN_MYSQL_C)
|
||||
target_link_libraries(DataMySQL PUBLIC Poco::Data mariadbclient)
|
||||
else()
|
||||
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
|
||||
endif()
|
||||
target_include_directories(DataMySQL
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
@@ -43,8 +46,11 @@ if(UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
POCO_INSTALL(DataMySQL)
|
||||
POCO_GENERATE_PACKAGE(DataMySQL)
|
||||
# Meh...
|
||||
if (NOT ENABLE_BUILTIN_MYSQL_C)
|
||||
POCO_INSTALL(DataMySQL)
|
||||
POCO_GENERATE_PACKAGE(DataMySQL)
|
||||
endif()
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
|
Reference in New Issue
Block a user