Rex Dieter a87e29
From b60702e0b7041c56a3cb52c209204d28406f3ce5 Mon Sep 17 00:00:00 2001
Rex Dieter a87e29
From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
Rex Dieter a87e29
Date: Wed, 13 Aug 2014 14:43:04 +0300
Rex Dieter adf30a
Subject: [PATCH 01/30] FindSqlite: Use CMAKE_FLAGS the right way in
Rex Dieter a87e29
 try_compile().
Rex Dieter a87e29
Rex Dieter a87e29
This fixes f90774f1 ("Check whether Sqlite is compiled with
Rex Dieter a87e29
SQLITE_ENABLE_UNLOCK_NOTIFY"), so that SQLITE_INCLUDE_DIR is really
Rex Dieter a87e29
passed to the try_compile() call. So far, it was just a NOP and the
Rex Dieter a87e29
compilation only worked if sqlite3.h was in a directory the compiler
Rex Dieter a87e29
uses automatically.
Rex Dieter a87e29
Rex Dieter a87e29
try_compile()'s syntax is a bit complicated, and CMAKE_FLAGS expects a
Rex Dieter a87e29
series of arguments as if they had been passed to the command line, so
Rex Dieter a87e29
instead of "CMAKE_FLAGS INCLUDE_DIRECTORIES /some/dir" one needs to use
Rex Dieter a87e29
"CMAKE_FLAGS -DINCLUDE_DIRECTORIES:PATH=/some/dir".
Rex Dieter a87e29
Rex Dieter a87e29
REVIEW: 119762
Rex Dieter a87e29
---
Rex Dieter a87e29
 cmake/modules/FindSqlite.cmake | 2 +-
Rex Dieter a87e29
 1 file changed, 1 insertion(+), 1 deletion(-)
Rex Dieter a87e29
Rex Dieter a87e29
diff --git a/cmake/modules/FindSqlite.cmake b/cmake/modules/FindSqlite.cmake
Rex Dieter a87e29
index ad8cdb4..c43a7b5 100644
Rex Dieter a87e29
--- a/cmake/modules/FindSqlite.cmake
Rex Dieter a87e29
+++ b/cmake/modules/FindSqlite.cmake
Rex Dieter a87e29
@@ -94,7 +94,7 @@ if(EXISTS ${SQLITE_INCLUDE_DIR}/sqlite3.h)
Rex Dieter a87e29
                 ${CMAKE_BINARY_DIR}/sqlite_check_unlock_notify
Rex Dieter a87e29
                 ${CMAKE_BINARY_DIR}/sqlite_check_unlock_notify.cpp
Rex Dieter a87e29
                 LINK_LIBRARIES ${SQLITE_LIBRARIES}
Rex Dieter a87e29
-                CMAKE_FLAGS INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIR})
Rex Dieter a87e29
+                CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${SQLITE_INCLUDE_DIR}")
Rex Dieter a87e29
     if (NOT SQLITE_HAS_UNLOCK_NOTIFY)
Rex Dieter a87e29
         message(STATUS "Sqlite ${SQLITE_VERSION} was found, but it is not compiled with -DSQLITE_ENABLE_UNLOCK_NOTIFY")
Rex Dieter a87e29
     endif()
Rex Dieter a87e29
-- 
Rex Dieter adf30a
2.1.0
Rex Dieter a87e29