[icinga-checkins] icinga.org: icinga2/master: Fix CMake not finding mysql libs on Windows

git at icinga.org git at icinga.org
Tue Feb 23 16:09:01 CET 2016


Module: icinga2
Branch: master
Commit: 0c837e30e81859dcdd4cefbe4483f525d1cb91ff
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=0c837e30e81859dcdd4cefbe4483f525d1cb91ff

Author: Jean Flach <jean-marcel.flach at netways.de>
Date:   Tue Feb 23 16:07:28 2016 +0100

Fix CMake not finding mysql libs on Windows

fixes #11208

---

 third-party/cmake/FindMySQL.cmake |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/third-party/cmake/FindMySQL.cmake b/third-party/cmake/FindMySQL.cmake
index d92b6c7..d243379 100644
--- a/third-party/cmake/FindMySQL.cmake
+++ b/third-party/cmake/FindMySQL.cmake
@@ -95,7 +95,12 @@ IF (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
   FIND_LIBRARY(MYSQL_ZLIB zlib PATHS ${MYSQL_LIB_DIR})
   FIND_LIBRARY(MYSQL_YASSL yassl PATHS ${MYSQL_LIB_DIR})
   FIND_LIBRARY(MYSQL_TAOCRYPT taocrypt PATHS ${MYSQL_LIB_DIR})
-  SET(MYSQL_CLIENT_LIBS mysqlclient_r)
+
+  IF (WIN32)
+    SET(MYSQL_CLIENT_LIBS libmysql)
+  ELSE (WIN32)
+    SET(MYSQL_CLIENT_LIBS mysqlclient_r)
+  ENDIF (WIN32)
   IF (MYSQL_ZLIB)
     SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} zlib)
   ENDIF (MYSQL_ZLIB)



More information about the icinga-checkins mailing list