aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMelvin Keskin <melvo@olomono.de>2022-05-09 21:45:49 +0200
committerLinus Jahn <lnj@kaidan.im>2022-08-13 15:55:03 +0200
commitceb62dd9d0d86bc8327ace116930962cf7fad1e9 (patch)
tree35bdcccf3e1bebddadcdab6205383975ca66e4c4 /CMakeLists.txt
parentec0669845b9072ea6cdc0fefb66f1d07511386a4 (diff)
Implement XEP-0384: OMEMO Encryption v0.8
This implements XEP-0384 in version v0.8 with a manager and storage classes to be user-implemented for persistant storage. The license of the code is LGPL-2.1-or-later as usual. However since libomemo-c (libsignal-protocol-c) is GPL-3.0, the built binary is always licensed under GPL-3.0. Having our code LGPL licensed will make it avoids relicensing in the future in case we port it to an LGPL compatible omemo library. Closes #133. Co-authored-by: Linus Jahn <lnj@kaidan.im>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16569284..5f0a3f97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ option(BUILD_TESTS "Build tests." ON)
option(BUILD_INTERNAL_TESTS "Build internal tests." OFF)
option(BUILD_DOCUMENTATION "Build API documentation." OFF)
option(BUILD_EXAMPLES "Build examples." ON)
-
+option(BUILD_OMEMO "Build the OMEMO module" OFF)
option(WITH_GSTREAMER "Build with GStreamer support for Jingle" OFF)
add_definitions(
@@ -36,6 +36,20 @@ add_definitions(
-DQT_NO_FOREACH
)
+if(BUILD_OMEMO)
+ add_definitions(-DBUILD_OMEMO)
+
+ # libomemo-c
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(OmemoC REQUIRED IMPORTED_TARGET libomemo-c)
+
+ # QCA
+ find_package(Qca-qt${QT_VERSION_MAJOR} REQUIRED)
+ if(${QT_VERSION_MAJOR} EQUAL 6)
+ find_package(Qt6Core5Compat REQUIRED)
+ endif()
+endif()
+
add_subdirectory(src)
if(BUILD_TESTS)