Commit 381744b0 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Handle msg storage option when building with CMake.

parent 570ed0f5
......@@ -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()
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment