aboutsummaryrefslogtreecommitdiff
path: root/plugins/signal-protocol/CMakeLists.txt
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2023-06-19 14:08:57 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2023-10-06 15:25:12 +0200
commit6eb1b53e60a12f82c8d47a5824bf9cee954ccdc2 (patch)
tree13a13ef08fcd74bc1685454730b72693806b76f0 /plugins/signal-protocol/CMakeLists.txt
parente2d801b5f74b60c38a75310066c48468c8a4bc93 (diff)
downloaddino-6eb1b53e60a12f82c8d47a5824bf9cee954ccdc2.tar.gz
dino-6eb1b53e60a12f82c8d47a5824bf9cee954ccdc2.zip
Merge `signal-protocol` into `omemo` plugin
Same reasoning as for the `openpgp` plugin.
Diffstat (limited to 'plugins/signal-protocol/CMakeLists.txt')
-rw-r--r--plugins/signal-protocol/CMakeLists.txt91
1 files changed, 0 insertions, 91 deletions
diff --git a/plugins/signal-protocol/CMakeLists.txt b/plugins/signal-protocol/CMakeLists.txt
deleted file mode 100644
index b3cfae9d..00000000
--- a/plugins/signal-protocol/CMakeLists.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-find_package(GCrypt REQUIRED)
-find_packages(SIGNAL_PROTOCOL_PACKAGES REQUIRED
- Gee
- GLib
- GObject
-)
-
-vala_precompile(SIGNAL_PROTOCOL_VALA_C
-SOURCES
- "src/context.vala"
- "src/simple_iks.vala"
- "src/simple_ss.vala"
- "src/simple_pks.vala"
- "src/simple_spks.vala"
- "src/store.vala"
- "src/util.vala"
-CUSTOM_VAPIS
- ${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-public.vapi
- ${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-native.vapi
-PACKAGES
- ${SIGNAL_PROTOCOL_PACKAGES}
-GENERATE_VAPI
- signal-protocol-vala
-GENERATE_HEADER
- signal-protocol-vala
-)
-
-set(C_HEADERS_SRC "")
-set(C_HEADERS_TARGET "")
-
-# libsignal-protocol-c has a history of breaking compatibility on the patch level
-# we'll have to check compatibility for every new release
-# distro maintainers may update this dependency after compatibility tests
-find_package(SignalProtocol 2.3.2 REQUIRED)
-
-list(APPEND C_HEADERS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/signal_helper.h")
-list(APPEND C_HEADERS_TARGET "${CMAKE_BINARY_DIR}/exports/signal_helper.h")
-
-add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/signal_helper.h"
-COMMAND
- cp "${CMAKE_CURRENT_SOURCE_DIR}/src/signal_helper.h" "${CMAKE_BINARY_DIR}/exports/signal_helper.h"
-DEPENDS
- "${CMAKE_CURRENT_SOURCE_DIR}/src/signal_helper.h"
-COMMENT
- Copy header file signal_helper.h
-)
-
-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/exports/signal-protocol.vapi
-COMMAND
- cat "${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-public.vapi" "${CMAKE_BINARY_DIR}/exports/signal-protocol-vala.vapi" > "${CMAKE_BINARY_DIR}/exports/signal-protocol.vapi"
-DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-public.vapi
- ${CMAKE_BINARY_DIR}/exports/signal-protocol-vala.vapi
-)
-
-add_custom_target(signal-protocol-vapi
-DEPENDS
- ${CMAKE_BINARY_DIR}/exports/signal-protocol.vapi
- ${CMAKE_BINARY_DIR}/exports/signal-protocol-vala.h
- ${C_HEADERS_TARGET}
-)
-
-set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/libsignal-protocol-c/src -I${CMAKE_CURRENT_SOURCE_DIR}/src)
-add_definitions(${CFLAGS})
-add_library(signal-protocol-vala STATIC ${SIGNAL_PROTOCOL_VALA_C} ${CMAKE_CURRENT_SOURCE_DIR}/src/signal_helper.c)
-add_dependencies(signal-protocol-vala signal-protocol-vapi)
-target_link_libraries(signal-protocol-vala ${SIGNAL_PROTOCOL_PACKAGES} gcrypt signal-protocol-c m)
-set_property(TARGET signal-protocol-vala PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-if(BUILD_TESTS)
- vala_precompile(SIGNAL_TEST_VALA_C
- SOURCES
- "tests/common.vala"
- "tests/testcase.vala"
-
- "tests/curve25519.vala"
- "tests/hkdf.vala"
- "tests/session_builder.vala"
- CUSTOM_VAPIS
- ${CMAKE_BINARY_DIR}/exports/signal-protocol-vala_internal.vapi
- ${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-public.vapi
- ${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-native.vapi
- PACKAGES
- ${SIGNAL_PROTOCOL_PACKAGES}
- )
-
- set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_BINARY_DIR}/signal-protocol)
- add_executable(signal-protocol-vala-test ${SIGNAL_TEST_VALA_C})
- add_dependencies(signal-protocol-vala-test signal-protocol-vala)
- target_link_libraries(signal-protocol-vala-test signal-protocol-vala ${SIGNAL_PROTOCOL_PACKAGES})
-endif(BUILD_TESTS)