Browse code

Add check for mysql_version.h header

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

Peter Lemenkov authored on 03/08/2012 09:56:23
Showing 1 changed files
... ...
@@ -15,3 +15,12 @@ ELSE(MYSQLPP_FOUND)
15 15
 		MESSAGE(FATAL_ERROR "Could NOT find mysql++ development files")
16 16
 	ENDIF (MySQLpp_FIND_REQUIRED)
17 17
 ENDIF(MYSQLPP_FOUND)
18
+
19
+# Check for buried mysql_version.h
20
+FIND_PATH(MYSQL_INCLUDE_MYSQL_VERSION_H mysql_version.h)
21
+IF(NOT MYSQL_INCLUDE_MYSQL_VERSION_H)
22
+	FIND_PATH(MYSQL_INCLUDE_BURIED_MYSQL_VERSION_H mysql/mysql_version.h)
23
+	IF(MYSQL_INCLUDE_BURIED_MYSQL_VERSION_H)
24
+		ADD_DEFINITIONS(-DMYSQLPP_MYSQL_HEADERS_BURIED)
25
+	ENDIF(MYSQL_INCLUDE_BURIED_MYSQL_VERSION_H)
26
+ENDIF(NOT MYSQL_INCLUDE_MYSQL_VERSION_H)
Browse code

Split off some library-specific search rules for CMake from main file

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

Peter Lemenkov authored on 02/10/2010 07:55:11
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,17 @@
1
+FIND_PATH(MYSQLPP_INCLUDE_DIR mysql++/mysql++.h)
2
+FIND_LIBRARY(MYSQLPP_LIBRARIES NAMES mysqlpp)
3
+
4
+IF(MYSQLPP_INCLUDE_DIR AND MYSQLPP_LIBRARIES)
5
+	SET(MYSQLPP_FOUND TRUE)
6
+ENDIF(MYSQLPP_INCLUDE_DIR AND MYSQLPP_LIBRARIES)
7
+
8
+IF(MYSQLPP_FOUND)
9
+	IF (NOT MySQLpp_FIND_QUIETLY)
10
+		MESSAGE(STATUS "Found mysql++ includes:	${MYSQLPP_INCLUDE_DIR}/mysql++/mysql++.h")
11
+		MESSAGE(STATUS "Found mysql++ library: ${MYSQLPP_LIBRARIES}")
12
+	ENDIF (NOT MySQLpp_FIND_QUIETLY)
13
+ELSE(MYSQLPP_FOUND)
14
+	IF (MySQLpp_FIND_REQUIRED)
15
+		MESSAGE(FATAL_ERROR "Could NOT find mysql++ development files")
16
+	ENDIF (MySQLpp_FIND_REQUIRED)
17
+ENDIF(MYSQLPP_FOUND)