[cmake] remove -I/usr/include/mysql for mysql.h
do not include -I/usr/include/mysql when testing for mysql.h
x-ref:
"Meson / CMake build issues"
@@ -333,15 +333,8 @@ endif()
if(WITH_MYSQL)
xconfig(mysql_config MYSQL_LDFLAGS MYSQL_CFLAGS)
-
- set(CMAKE_REQUIRED_INCLUDES /usr/include/mysql)
- check_include_files(mysql.h HAVE_MYSQL_H)
- set(CMAKE_REQUIRED_INCLUDES)
- if(HAVE_MYSQL_H)
check_library_exists(mysqlclient mysql_real_connect "" HAVE_MYSQL)
- endif()
else()
- unset(HAVE_MYSQL_H)
unset(HAVE_MYSQL)
endif()
@@ -1003,7 +996,7 @@ if(WITH_MAXMINDDB)
target_link_libraries(mod_maxminddb maxminddb)
endif()
-if(HAVE_MYSQL_H AND HAVE_MYSQL)
+if(HAVE_MYSQL)
add_and_install_library(mod_vhostdb_mysql "mod_vhostdb_mysql.c")
target_link_libraries(mod_vhostdb_mysql mysqlclient)
include_directories(/usr/include/mysql)
