meson: Add crypto-vala library

This commit is contained in:
hrxi 2023-06-12 23:43:23 +02:00 committed by fiaxh
parent 7dd12e7dec
commit 7dd0e0aa4a
5 changed files with 29 additions and 1 deletions

View file

@ -14,7 +14,7 @@ SOURCES
"src/random.vala" "src/random.vala"
"src/srtp.vala" "src/srtp.vala"
CUSTOM_VAPIS CUSTOM_VAPIS
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/gcrypt.vapi" "${CMAKE_CURRENT_SOURCE_DIR}/vapi/libgcrypt.vapi"
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi" "${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi"
PACKAGES PACKAGES
${CRYPTO_VALA_PACKAGES} ${CRYPTO_VALA_PACKAGES}

View file

@ -0,0 +1,2 @@
gio-2.0
glib-2.0

23
crypto-vala/meson.build Normal file
View file

@ -0,0 +1,23 @@
dependencies = [
dep_gio,
dep_glib,
dep_libgcrypt,
dep_libsrtp2,
]
sources = files(
'src/cipher.vala',
'src/cipher_converter.vala',
'src/error.vala',
'src/random.vala',
'src/srtp.vala',
)
c_args = [
'-DG_LOG_DOMAIN="crypto-vala"',
]
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
lib_crypto_vala = library('crypto-vala', sources, c_args: c_args, vala_args: vala_args, dependencies: dependencies, version: '0.0', install: true, install_dir: [true, true, true])
dep_crypto_vala = declare_dependency(link_with: lib_crypto_vala, include_directories: include_directories('.'))
install_data('crypto-vala.deps', install_dir: get_option('datadir') / 'vala/vapi') # TODO: workaround for https://github.com/mesonbuild/meson/issues/9756

View file

@ -15,6 +15,8 @@ dep_gtk4 = dependency('gtk4')
dep_icu_uc = dependency('icu-uc') dep_icu_uc = dependency('icu-uc')
dep_libadwaita = dependency('libadwaita-1') dep_libadwaita = dependency('libadwaita-1')
dep_libcanberra = dependency('libcanberra') dep_libcanberra = dependency('libcanberra')
dep_libgcrypt = dependency('libgcrypt')
dep_libsrtp2 = dependency('libsrtp2')
dep_libsoup = dependency('libsoup-3.0') dep_libsoup = dependency('libsoup-3.0')
dep_m = meson.get_compiler('c').find_library('m', required: false) dep_m = meson.get_compiler('c').find_library('m', required: false)
dep_sqlite3 = dependency('sqlite3', version: '>=3.24') dep_sqlite3 = dependency('sqlite3', version: '>=3.24')
@ -26,4 +28,5 @@ subdir('qlite')
subdir('xmpp-vala') subdir('xmpp-vala')
subdir('libdino') subdir('libdino')
subdir('main') subdir('main')
subdir('crypto-vala')
subdir('plugins') subdir('plugins')