1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-19 03:57:14 +01:00

Update CMakeLists.txt

This commit is contained in:
Sandu Liviu Catalin 2021-02-01 03:20:06 +02:00
parent 318bcf10c5
commit 0cdb18af25

View File

@ -34,13 +34,11 @@ if(WIN32)
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
endif() endif()
if(UNIX)
include(CheckSymbolExists)
# Some instalations don't have mysql_reset_connection() even if their version indicates otherwise # Some instalations don't have mysql_reset_connection() even if their version indicates otherwise
CHECK_SYMBOL_EXISTS(mysql_reset_connection "${MYSQL_INCLUDE_DIR}/mysql.h" HAVE_MYSQL_RESET_CONNECTION) # Debian 9 (Stretch) is one such example
if(UNIX)
if(HAVE_MYSQL_RESET_CONNECTION) file(STRINGS "${MYSQL_INCLUDE_DIR}/mysql.h" lines REGEX "mysql_reset_connection")
message(status "Found: mysql_reset_connection") if(lines)
target_compile_definitions(DataMySQL PRIVATE HAVE_MYSQL_RESET_CONNECTION) target_compile_definitions(DataMySQL PRIVATE HAVE_MYSQL_RESET_CONNECTION)
endif() endif()
endif() endif()