1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 15:17:13 +02:00

Add MariaDB Connector/C as a built-in alternative (v3.2.3).

This commit is contained in:
Sandu Liviu Catalin
2021-09-21 20:59:01 +03:00
parent f192767853
commit b4bf96ce4b
372 changed files with 90819 additions and 11 deletions

View File

@ -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()

View File

@ -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)