Fix build
This commit is contained in:
parent
98a1f3ad63
commit
6755cb3a1b
|
@ -9,9 +9,9 @@ before_install:
|
|||
- sudo apt-get update
|
||||
- sudo apt-get install -y cmake valac libgee-0.8-dev libsqlite3-dev libgtk-3-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev
|
||||
install:
|
||||
- ./configure --with-tests --with-libsignal-in-tree $CONFIGURE_FLAGS
|
||||
- ./configure --with-tests --with-libomemo-in-tree $CONFIGURE_FLAGS
|
||||
- make
|
||||
script:
|
||||
- build/xmpp-vala-test
|
||||
- build/signal-protocol-vala-test
|
||||
- build/omemo-vala-test
|
||||
cache: ccache
|
||||
|
|
15
configure
vendored
15
configure
vendored
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
OPTS=`getopt -o "h" --long \
|
||||
help,fetch-only,no-debug,disable-fast-vapi,with-tests,release,with-libsignal-in-tree,\
|
||||
help,fetch-only,no-debug,disable-fast-vapi,with-tests,release,with-libsignal-in-tree,with-libomemo-in-tree,without-libomemo-in-tree\
|
||||
enable-plugin:,disable-plugin:,\
|
||||
prefix:,program-prefix:,exec-prefix:,lib-suffix:,\
|
||||
bindir:,libdir:,includedir:,datadir:,\
|
||||
|
@ -17,7 +17,7 @@ eval set -- "$OPTS"
|
|||
PREFIX=${PREFIX:-/usr/local}
|
||||
ENABLED_PLUGINS=
|
||||
DISABLED_PLUGINS=
|
||||
BUILD_LIBSIGNAL_IN_TREE=
|
||||
BUILD_LIBOMEMO_IN_TREE=yes
|
||||
BUILD_TESTS=
|
||||
BUILD_TYPE=Debug
|
||||
DISABLE_FAST_VAPI=
|
||||
|
@ -56,8 +56,7 @@ Configuration:
|
|||
without network access later and exit.
|
||||
--no-debug Build without debug symbols
|
||||
--release Configure to build an optimized release version
|
||||
--with-libsignal-in-tree Build libsignal-protocol-c in tree and link it
|
||||
statically.
|
||||
--with-libomemo-in-tree Build libomemo-c in tree and link it statically.
|
||||
--with-tests Also build tests.
|
||||
|
||||
Plugin configuration:
|
||||
|
@ -113,7 +112,9 @@ while true; do
|
|||
--valac ) VALA_EXECUTABLE="$2"; shift; shift ;;
|
||||
--valac-flags ) VALAC_FLAGS="$2"; shift; shift ;;
|
||||
--lib-suffix ) LIB_SUFFIX="$2"; shift; shift ;;
|
||||
--with-libsignal-in-tree ) BUILD_LIBSIGNAL_IN_TREE=yes; shift ;;
|
||||
--with-libsignal-in-tree ) BUILD_LIBOMEMO_IN_TREE=yes; shift ;;
|
||||
--with-libomemo-in-tree ) BUILD_LIBOMEMO_IN_TREE=yes; shift ;;
|
||||
--without-libomemo-in-tree ) BUILD_LIBOMEMO_IN_TREE=no; shift ;;
|
||||
--disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;;
|
||||
--no-debug ) NO_DEBUG=yes; shift ;;
|
||||
--fetch-only ) FETCH_ONLY=yes; shift ;;
|
||||
|
@ -145,7 +146,7 @@ while true; do
|
|||
esac
|
||||
done
|
||||
|
||||
if [ "$BUILD_LIBSIGNAL_IN_TREE" = "yes" ] || [ "$FETCH_ONLY" = "yes" ]; then
|
||||
if [ "$BUILD_LIBOMEMO_IN_TREE" = "yes" ] || [ "$FETCH_ONLY" = "yes" ]; then
|
||||
if [ -d ".git" ]; then
|
||||
git submodule update --init 2>/dev/null
|
||||
else
|
||||
|
@ -262,7 +263,7 @@ cmake -G "$cmake_type" \
|
|||
-DENABLED_PLUGINS="$ENABLED_PLUGINS" \
|
||||
-DDISABLED_PLUGINS="$DISABLED_PLUGINS" \
|
||||
-DBUILD_TESTS="$BUILD_TESTS" \
|
||||
-DBUILD_LIBSIGNAL_IN_TREE="$BUILD_LIBSIGNAL_IN_TREE" \
|
||||
-DBUILD_LIBOMEMO_IN_TREE="$BUILD_LIBOMEMO_IN_TREE" \
|
||||
-DVALA_EXECUTABLE="$VALAC" \
|
||||
-DCMAKE_VALA_FLAGS="$VALACFLAGS" \
|
||||
-DDISABLE_FAST_VAPI="$DISABLE_FAST_VAPI" \
|
||||
|
|
|
@ -33,42 +33,46 @@ set_property(TARGET curve25519 PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|||
set_property(TARGET protobuf-c PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET omemo-c PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set(OMEMO_VALA_C_HEADERS
|
||||
signal_protocol.h
|
||||
signal_protocol_types.h
|
||||
curve.h
|
||||
hkdf.h
|
||||
ratchet.h
|
||||
protocol.h
|
||||
session_state.h
|
||||
session_record.h
|
||||
session_pre_key.h
|
||||
session_builder.h
|
||||
session_cipher.h
|
||||
key_helper.h
|
||||
sender_key.h
|
||||
sender_key_state.h
|
||||
sender_key_record.h
|
||||
group_session_builder.h
|
||||
group_cipher.h
|
||||
fingerprint.h
|
||||
device_consistency.h
|
||||
)
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/exports/omemo-vala")
|
||||
|
||||
foreach(f ${OMEMO_VALA_C_HEADERS})
|
||||
list(APPEND C_HEADERS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/libomemo-c/src/${f}")
|
||||
list(APPEND C_HEADERS_TARGET "${CMAKE_BINARY_DIR}/exports/omemo/${f}")
|
||||
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/omemo/${f}"
|
||||
COMMAND
|
||||
cp "${CMAKE_CURRENT_SOURCE_DIR}/libomemo-c/src/${f}" "${CMAKE_BINARY_DIR}/exports/omemo/${f}"
|
||||
DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libomemo-c/src/${f}"
|
||||
COMMENT
|
||||
Copy header file omemo/${f}
|
||||
if(NOT BUILD_LIBOMEMO_IN_TREE)
|
||||
find_package(Omemo REQUIRED)
|
||||
else()
|
||||
set(OMEMO_C_HEADERS
|
||||
signal_protocol.h
|
||||
signal_protocol_types.h
|
||||
curve.h
|
||||
hkdf.h
|
||||
ratchet.h
|
||||
protocol.h
|
||||
session_state.h
|
||||
session_record.h
|
||||
session_pre_key.h
|
||||
session_builder.h
|
||||
session_cipher.h
|
||||
key_helper.h
|
||||
sender_key.h
|
||||
sender_key_state.h
|
||||
sender_key_record.h
|
||||
group_session_builder.h
|
||||
group_cipher.h
|
||||
fingerprint.h
|
||||
device_consistency.h
|
||||
)
|
||||
endforeach(f)
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/exports/omemo")
|
||||
|
||||
foreach(f ${OMEMO_C_HEADERS})
|
||||
list(APPEND C_HEADERS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/libomemo-c/src/${f}")
|
||||
list(APPEND C_HEADERS_TARGET "${CMAKE_BINARY_DIR}/exports/omemo/${f}")
|
||||
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/omemo/${f}"
|
||||
COMMAND
|
||||
cp "${CMAKE_CURRENT_SOURCE_DIR}/libomemo-c/src/${f}" "${CMAKE_BINARY_DIR}/exports/omemo/${f}"
|
||||
DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libomemo-c/src/${f}"
|
||||
COMMENT
|
||||
Copy header file omemo/${f}
|
||||
)
|
||||
endforeach(f)
|
||||
endif()
|
||||
|
||||
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")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef SIGNAL_PROTOCOL_VALA_HELPER
|
||||
#define SIGNAL_PROTOCOL_VALA_HELPER 1
|
||||
|
||||
#include <signal/signal_protocol.h>
|
||||
#include <omemo/signal_protocol.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue