aboutsummaryrefslogtreecommitdiff
path: root/plugins/crypto-vala/CMakeLists.txt
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2021-03-29 13:20:12 +0200
committerMarvin W <git@larma.de>2021-03-29 13:20:12 +0200
commit5e58f2988382fffb70602cf308f6686b4731f0da (patch)
tree0e2ea3c441aaad189b3ad9ba200420d294f5061f /plugins/crypto-vala/CMakeLists.txt
parentc7d1ee4dc5a08715ed68ed69e918f5ec9cbd4b40 (diff)
downloaddino-5e58f2988382fffb70602cf308f6686b4731f0da.tar.gz
dino-5e58f2988382fffb70602cf308f6686b4731f0da.zip
Migrate to libsrtp2
Diffstat (limited to 'plugins/crypto-vala/CMakeLists.txt')
-rw-r--r--plugins/crypto-vala/CMakeLists.txt34
1 files changed, 7 insertions, 27 deletions
diff --git a/plugins/crypto-vala/CMakeLists.txt b/plugins/crypto-vala/CMakeLists.txt
index f97b0d31..4a8da241 100644
--- a/plugins/crypto-vala/CMakeLists.txt
+++ b/plugins/crypto-vala/CMakeLists.txt
@@ -3,6 +3,7 @@ find_packages(CRYPTO_VALA_PACKAGES REQUIRED
GLib
GObject
GIO
+ Srtp2
)
vala_precompile(CRYPTO_VALA_C
@@ -11,44 +12,23 @@ SOURCES
"src/cipher_converter.vala"
"src/error.vala"
"src/random.vala"
- "src/srtp.vapi"
+ "src/srtp.vala"
CUSTOM_VAPIS
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/gcrypt.vapi"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi"
PACKAGES
${CRYPTO_VALA_PACKAGES}
+OPTIONS
+ --vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi
GENERATE_VAPI
crypto-vala
GENERATE_HEADER
crypto-vala
)
-add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/srtp.h"
-COMMAND
- cp "${CMAKE_CURRENT_SOURCE_DIR}/src/srtp.h" "${CMAKE_BINARY_DIR}/exports/srtp.h"
-DEPENDS
- "${CMAKE_CURRENT_SOURCE_DIR}/src/srtp.h"
-COMMENT
- Copy header file srtp.h
-)
-
-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/exports/crypto.vapi
-COMMAND
- cat "${CMAKE_BINARY_DIR}/exports/crypto-vala.vapi" "${CMAKE_CURRENT_SOURCE_DIR}/src/srtp.vapi" > "${CMAKE_BINARY_DIR}/exports/crypto.vapi"
-DEPENDS
- ${CMAKE_BINARY_DIR}/exports/crypto-vala.vapi
- ${CMAKE_CURRENT_SOURCE_DIR}/src/srtp.vapi
-)
-
-add_custom_target(crypto-vapi
-DEPENDS
- ${CMAKE_BINARY_DIR}/exports/crypto.vapi
- ${CMAKE_BINARY_DIR}/exports/srtp.h
-)
-
-set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/src)
+set(CFLAGS ${VALA_CFLAGS})
add_definitions(${CFLAGS})
-add_library(crypto-vala STATIC ${CRYPTO_VALA_C} src/srtp.c)
-add_dependencies(crypto-vala crypto-vapi)
+add_library(crypto-vala STATIC ${CRYPTO_VALA_C})
target_link_libraries(crypto-vala ${CRYPTO_VALA_PACKAGES} gcrypt)
set_property(TARGET crypto-vala PROPERTY POSITION_INDEPENDENT_CODE ON)