summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorTravis A. Everett <travis.a.everett@gmail.com>2018-10-17 00:40:13 (GMT)
committerTravis A. Everett <travis.a.everett@gmail.com>2018-10-17 00:40:13 (GMT)
commite4f408eb4aad7fb035847616debe68fe115e2ae4 (patch)
treed666623f6a039f0e1f31b6f3675a916570e38135 /cmake
parenteec2d3b6a9f80715fb590b0fb67b7fe87ba5fee7 (diff)
downloadDoxygen-e4f408eb4aad7fb035847616debe68fe115e2ae4.zip
Doxygen-e4f408eb4aad7fb035847616debe68fe115e2ae4.tar.gz
Doxygen-e4f408eb4aad7fb035847616debe68fe115e2ae4.tar.bz2
sqlite3: require sqlite >= 3.9.0
The generated schema is malformed in versions below 3.9.0.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindSQLite3.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/FindSQLite3.cmake b/cmake/FindSQLite3.cmake
index 77b8eb4..45cc212 100644
--- a/cmake/FindSQLite3.cmake
+++ b/cmake/FindSQLite3.cmake
@@ -71,8 +71,16 @@ else (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
endif (SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)
if (SQLITE3_FOUND)
+
+ # Extract version from header file
+ find_file(SQLITE3_HEADER "sqlite3.h" HINTS ${SQLITE3_INCLUDE_DIRS})
+ if(SQLITE3_HEADER)
+ file(STRINGS "${SQLITE3_HEADER}" _DEF_TMP REGEX "^#define SQLITE_VERSION +\\\"[^\\\"]+\\\"")
+ string (REGEX REPLACE ".*\\\"(([0-9]+[.]?)+).*" "\\1" SQLITE3_VERSION "${_DEF_TMP}")
+ endif (SQLITE3_HEADER)
+
if (NOT Sqlite3_FIND_QUIETLY)
- message(STATUS "Found Sqlite3: ${SQLITE3_LIBRARIES}")
+ message(STATUS "Found Sqlite3: ${SQLITE3_LIBRARIES} (found version \"${SQLITE3_VERSION}\")")
endif (NOT Sqlite3_FIND_QUIETLY)
else (SQLITE3_FOUND)
if (Sqlite3_FIND_REQUIRED)