Blob Blame Raw
From d56f60341f1cdd1337ed140e9cff99618a174450 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 3 Aug 2012 13:56:23 +0400
Subject: [PATCH 15/18] Add check for mysql_version.h header

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
 cmake/FindMySQLpp.cmake | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/cmake/FindMySQLpp.cmake b/cmake/FindMySQLpp.cmake
index 94050c9..248624c 100644
--- a/cmake/FindMySQLpp.cmake
+++ b/cmake/FindMySQLpp.cmake
@@ -15,3 +15,12 @@ ELSE(MYSQLPP_FOUND)
 		MESSAGE(FATAL_ERROR "Could NOT find mysql++ development files")
 	ENDIF (MySQLpp_FIND_REQUIRED)
 ENDIF(MYSQLPP_FOUND)
+
+# Check for buried mysql_version.h
+FIND_PATH(MYSQL_INCLUDE_MYSQL_VERSION_H mysql_version.h)
+IF(NOT MYSQL_INCLUDE_MYSQL_VERSION_H)
+	FIND_PATH(MYSQL_INCLUDE_BURIED_MYSQL_VERSION_H mysql/mysql_version.h)
+	IF(MYSQL_INCLUDE_BURIED_MYSQL_VERSION_H)
+		ADD_DEFINITIONS(-DMYSQLPP_MYSQL_HEADERS_BURIED)
+	ENDIF(MYSQL_INCLUDE_BURIED_MYSQL_VERSION_H)
+ENDIF(NOT MYSQL_INCLUDE_MYSQL_VERSION_H)
-- 
1.8.0