2019-09-10 18:55:24 +00:00
|
|
|
find_package(GCrypt REQUIRED)
|
|
|
|
find_packages(CRYPTO_VALA_PACKAGES REQUIRED
|
|
|
|
GLib
|
|
|
|
GObject
|
|
|
|
GIO
|
2021-03-29 11:20:12 +00:00
|
|
|
Srtp2
|
2019-09-10 18:55:24 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
vala_precompile(CRYPTO_VALA_C
|
|
|
|
SOURCES
|
|
|
|
"src/cipher.vala"
|
|
|
|
"src/cipher_converter.vala"
|
|
|
|
"src/error.vala"
|
2021-03-23 14:05:50 +00:00
|
|
|
"src/random.vala"
|
2021-03-29 11:20:12 +00:00
|
|
|
"src/srtp.vala"
|
2019-09-10 18:55:24 +00:00
|
|
|
CUSTOM_VAPIS
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/gcrypt.vapi"
|
2021-03-29 11:20:12 +00:00
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi"
|
2019-09-10 18:55:24 +00:00
|
|
|
PACKAGES
|
|
|
|
${CRYPTO_VALA_PACKAGES}
|
2021-03-29 11:20:12 +00:00
|
|
|
OPTIONS
|
|
|
|
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi
|
2019-09-10 18:55:24 +00:00
|
|
|
GENERATE_VAPI
|
|
|
|
crypto-vala
|
|
|
|
GENERATE_HEADER
|
|
|
|
crypto-vala
|
|
|
|
)
|
|
|
|
|
2021-03-29 11:20:12 +00:00
|
|
|
set(CFLAGS ${VALA_CFLAGS})
|
2019-09-10 18:55:24 +00:00
|
|
|
add_definitions(${CFLAGS})
|
2021-03-29 11:20:12 +00:00
|
|
|
add_library(crypto-vala STATIC ${CRYPTO_VALA_C})
|
2019-09-10 18:55:24 +00:00
|
|
|
target_link_libraries(crypto-vala ${CRYPTO_VALA_PACKAGES} gcrypt)
|
|
|
|
set_property(TARGET crypto-vala PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|