build: signal-protocol-c

This commit is contained in:
vae 2021-05-11 23:17:57 +03:00
parent f94c3dac14
commit bc66ab7e52
Signed by: vae
GPG Key ID: A9A33351400E00E5
4 changed files with 13 additions and 29 deletions

View File

@ -43,8 +43,14 @@ else ()
target_link_libraries(squawk PRIVATE QXmpp::QXmpp) target_link_libraries(squawk PRIVATE QXmpp::QXmpp)
endif () endif ()
# Signal
if (NOT SYSTEM_SIGNAL) if (NOT SYSTEM_SIGNAL)
add_subdirectory(external/signal-protocol-c) add_subdirectory(external/signal-protocol-c)
add_dependencies(squawk signal-protocol-c)
target_link_libraries(squawk PRIVATE signal-protocol-c)
else ()
find_package(Signal REQUIRED)
target_link_libraries(squawk PRIVATE Signal::Signal)
endif () endif ()
## KIO ## KIO
@ -73,9 +79,6 @@ if (WITH_KWALLET)
endif () endif ()
endif () endif ()
## Signal (TODO)
# find_package(Signal REQUIRED)
## LMDB ## LMDB
find_package(LMDB REQUIRED) find_package(LMDB REQUIRED)

View File

@ -1,25 +1 @@
cmake_minimum_required(VERSION 3.3) target_sources(squawk PRIVATE signal.h signal.cpp)
project(qomemo)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_AUTOMOC ON)
find_package(Qt5Core CONFIG REQUIRED)
find_package(Qt5Xml CONFIG REQUIRED)
find_package(LMDB REQUIRED)
set(qomemo_SRC signal.h)
add_library(qomemo STATIC ${qomemo_SRC})
if(SYSTEM_QXMPP)
get_target_property(QXMPP_INTERFACE_INCLUDE_DIRECTORIES QXmpp::QXmpp INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(qomemo PUBLIC ${QXMPP_INTERFACE_INCLUDE_DIRECTORIES})
endif()
target_include_directories(qomemo PUBLIC ${CMAKE_SOURCE_DIR}/external/signal-protocol-c/src)
target_link_libraries(qomemo Qt5::Core)
target_link_libraries(qomemo Qt5::Xml)
target_link_libraries(qomemo qxmpp)
target_link_libraries(qomemo lmdb)

5
qomemo/signal.cpp Normal file
View File

@ -0,0 +1,5 @@
/*
* Created by victoria on 2021-05-11.
*/
#include "signal.h"

View File

@ -4,7 +4,7 @@
#pragma once #pragma once
#include <signal_protocol.h> #include <signal/signal_protocol.h>
namespace Signal namespace Signal
{ {