aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 16 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f28c2849..ed0cc130c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -317,6 +317,18 @@ IF(PCRE_LIBRARY_DIRS)
LINK_DIRECTORIES("${PCRE_LIBRARY_DIRS}")
ENDIF(PCRE_LIBRARY_DIRS)
+# Find optional sqlite3 support
+pkg_check_modules(SQLITE sqlite3)
+IF(SQLITE_FOUND)
+ SET(WITH_SQLITE 1)
+ENDIF(SQLITE_FOUND)
+IF(SQLITE_INCLUDE_DIRS)
+ INCLUDE_DIRECTORIES("${SQLITE_INCLUDE_DIRS}")
+ENDIF(SQLITE_INCLUDE_DIRS)
+IF(SQLITE_LIBRARY_DIRS)
+ LINK_DIRECTORIES("${SQLITE_LIBRARY_DIRS}")
+ENDIF(SQLITE_LIBRARY_DIRS)
+
IF(ENABLE_STATIC MATCHES "ON")
pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.12)
ELSE(ENABLE_STATIC MATCHES "ON")
@@ -816,11 +828,14 @@ ENDIF(LIBJUDY_LIBRARY)
IF(LIBDB_LIBRARY)
TARGET_LINK_LIBRARIES(rspamd db)
ENDIF(LIBDB_LIBRARY)
+IF(SQLITE_LIBRARIES)
+ TARGET_LINK_LIBRARIES(rspamd ${SQLITE_LIBRARIES})
+ENDIF(SQLITE_LIBRARIES)
TARGET_LINK_LIBRARIES(rspamd event)
IF(HAVE_LIBEVENT2)
TARGET_LINK_LIBRARIES(rspamd event_pthreads)
ENDIF(HAVE_LIBEVENT2)
-TARGET_LINK_LIBRARIES(rspamd pcre)
+TARGET_LINK_LIBRARIES(rspamd ${PCRE_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd ${CMAKE_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd ${GLIB2_LIBRARIES})