summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-01-04 18:23:31 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-01-04 18:24:31 -0500
commit6ea696d1113e38ac2639074ba50b72e6a0180959 (patch)
treebeab0ed279b32c1f1a933297ae2334dd8991a41d
parentdf3624944133854d00caa9519e114cf3b9259c22 (diff)
downloadlighttpd-git-6ea696d1113e38ac2639074ba50b72e6a0180959.tar.gz
[cmake] remove -I/usr/include/mysql for mysql.h (#3181)
do not include -I/usr/include/mysql when testing for mysql.h x-ref: "Meson / CMake build issues" https://redmine.lighttpd.net/issues/3181
-rw-r--r--src/CMakeLists.txt11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 91f3fd1c..ea04d118 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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()
+ check_library_exists(mysqlclient mysql_real_connect "" HAVE_MYSQL)
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)