diff --git a/CMakeLists.txt b/CMakeLists.txt index 85a86bf42..390812533 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,12 @@ if(ENABLE_TUNNEL) set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support." FORCE) endif() endif() +if(ENABLE_MSG_STORAGE) + find_package(Sqlite3) + if(NOT SQLITE3_FOUND) + message(FATAL_ERROR "Could not find the sqlite3 library!") + endif() +endif() if(ENABLE_NOTIFY) find_package(Notify) if(NOTIFY_FOUND) @@ -107,6 +113,10 @@ include_directories( ${MS2_INCLUDE_DIRS} ${XML2_INCLUDE_DIRS} ) +if(SQLITE3_FOUND) + include_directories(${SQLITE3_INCLUDE_DIRS}) + add_definitions("-DMSG_STORAGE_ENABLED") +endif() if(ENABLE_TUNNEL) include_directories(${TUNNEL_INCLUDE_DIRS}) endif() diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index cb417a612..92689dcb8 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -117,6 +117,9 @@ set(LIBS ${MS2_LIBRARIES} ${XML2_LIBRARIES} ) +if(SQLITE3_FOUND) + list(APPEND LIBS ${SQLITE3_LIBRARIES}) +endif() if(ENABLE_TUNNEL) list(APPEND LIBS ${TUNNEL_LIBRARIES}) endif()