1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +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,15 +34,13 @@ if(WIN32)
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
endif()
# Some instalations don't have mysql_reset_connection() even if their version indicates otherwise
# Debian 9 (Stretch) is one such example
if(UNIX)
include(CheckSymbolExists)
# 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)
if(HAVE_MYSQL_RESET_CONNECTION)
message(status "Found: mysql_reset_connection")
file(STRINGS "${MYSQL_INCLUDE_DIR}/mysql.h" lines REGEX "mysql_reset_connection")
if(lines)
target_compile_definitions(DataMySQL PRIVATE HAVE_MYSQL_RESET_CONNECTION)
endif()
endif()
endif()
POCO_INSTALL(DataMySQL)