diff options
Diffstat (limited to 'src/svnqt/cmakemodules/FindSqlite.cmake')
-rw-r--r-- | src/svnqt/cmakemodules/FindSqlite.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/svnqt/cmakemodules/FindSqlite.cmake b/src/svnqt/cmakemodules/FindSqlite.cmake new file mode 100644 index 0000000..3c50d33 --- /dev/null +++ b/src/svnqt/cmakemodules/FindSqlite.cmake @@ -0,0 +1,32 @@ +IF (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES) + SET(SQLITE_FOUND TRUE) +ELSE (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES) + INCLUDE(UsePkgConfig) + PKGCONFIG(sqlite3 _sqliteincdir _sqlitelibdir _sqlitelinkflags _sqlitecflags) + + FIND_PATH(SQLITE_INCLUDE_DIR sqlite3.h + ${_sqliteincdir} + /usr/include + /usr/local/include + ) + FIND_LIBRARY(SQLITE_LIBRARIES NAMES sqlite3 + PATHS + ${_sqlitelibdir} + /usr/lib + /usr/local/lib + ) + + IF (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES) + SET(SQLITE_FOUND TRUE) + ENDIF (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES) + + IF (SQLITE_FOUND) + MESSAGE(STATUS "Found sqlite3: ${SQLITE_LIBRARIES}") + ELSE (SQLITE_FOUND) + MESSAGE(STATUS "Could not find sqlite3") + ADD_DEFINITIONS(-DNO_SQLITE3) + ENDIF (SQLITE_FOUND) + + MARK_AS_ADVANCED(SQLITE_LIBRARIES SQLITE_INCLUDE_DIR) + +ENDIF (SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES) |