aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/FindSqlite3.cmake
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 18:29:48 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 18:29:48 +0200
commit33e80dae7f48eac99d5c692d7429e37b11666c96 (patch)
treed6a738abe0adca833b6342bc58731dbe0037cad4 /cmake/Modules/FindSqlite3.cmake
parente5dc58e7103d46298bbca66b0a6a7d9d61146e7e (diff)
parent4f53619a15cd5a1cd18e8e3eb7c5eb21608b460e (diff)
downloadminetest-33e80dae7f48eac99d5c692d7429e37b11666c96.tar.gz
minetest-33e80dae7f48eac99d5c692d7429e37b11666c96.tar.bz2
minetest-33e80dae7f48eac99d5c692d7429e37b11666c96.zip
Merge branch 'master' of github.com:erlehmann/minetest-delta
Diffstat (limited to 'cmake/Modules/FindSqlite3.cmake')
-rw-r--r--cmake/Modules/FindSqlite3.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/Modules/FindSqlite3.cmake b/cmake/Modules/FindSqlite3.cmake
new file mode 100644
index 000000000..ecce6e38e
--- /dev/null
+++ b/cmake/Modules/FindSqlite3.cmake
@@ -0,0 +1,18 @@
+# Look for sqlite3, use our own if not found
+
+FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h)
+
+FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3)
+
+IF(SQLITE3_LIBRARY AND SQLITE3_INCLUDE_DIR)
+ SET( SQLITE3_FOUND TRUE )
+ENDIF(SQLITE3_LIBRARY AND SQLITE3_INCLUDE_DIR)
+
+IF(SQLITE3_FOUND)
+ MESSAGE(STATUS "Found system sqlite3 header file in ${SQLITE3_INCLUDE_DIR}")
+ MESSAGE(STATUS "Found system sqlite3 library ${SQLITE3_LIBRARY}")
+ELSE(SQLITE3_FOUND)
+ SET(SQLITE3_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/sqlite)
+ SET(SQLITE3_LIBRARY sqlite3)
+ MESSAGE(STATUS "Using project sqlite3 library")
+ENDIF(SQLITE3_FOUND)