Fix custom vapi integration

This commit is contained in:
Marvin W 2021-04-11 15:12:53 +02:00
parent e9ff660537
commit 4edab3c8d6
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
4 changed files with 10 additions and 15 deletions

View file

@ -1,9 +1,9 @@
find_package(GCrypt REQUIRED) find_package(GCrypt REQUIRED)
find_package(Srtp2 REQUIRED)
find_packages(CRYPTO_VALA_PACKAGES REQUIRED find_packages(CRYPTO_VALA_PACKAGES REQUIRED
GLib GLib
GObject GObject
GIO GIO
Srtp2
) )
vala_precompile(CRYPTO_VALA_C vala_precompile(CRYPTO_VALA_C
@ -18,8 +18,6 @@ CUSTOM_VAPIS
"${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi" "${CMAKE_CURRENT_SOURCE_DIR}/vapi/libsrtp2.vapi"
PACKAGES PACKAGES
${CRYPTO_VALA_PACKAGES} ${CRYPTO_VALA_PACKAGES}
OPTIONS
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi
GENERATE_VAPI GENERATE_VAPI
crypto-vala crypto-vala
GENERATE_HEADER GENERATE_HEADER
@ -29,6 +27,6 @@ GENERATE_HEADER
set(CFLAGS ${VALA_CFLAGS}) set(CFLAGS ${VALA_CFLAGS})
add_definitions(${CFLAGS}) add_definitions(${CFLAGS})
add_library(crypto-vala STATIC ${CRYPTO_VALA_C}) add_library(crypto-vala STATIC ${CRYPTO_VALA_C})
target_link_libraries(crypto-vala ${CRYPTO_VALA_PACKAGES} gcrypt) target_link_libraries(crypto-vala ${CRYPTO_VALA_PACKAGES} gcrypt libsrtp2)
set_property(TARGET crypto-vala PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET crypto-vala PROPERTY POSITION_INDEPENDENT_CODE ON)

View file

@ -1,11 +1,11 @@
find_package(Nice REQUIRED)
find_package(GnuTLS REQUIRED)
find_packages(ICE_PACKAGES REQUIRED find_packages(ICE_PACKAGES REQUIRED
Gee Gee
GLib GLib
GModule GModule
GnuTLS
GObject GObject
GTK3 GTK3
Nice
) )
vala_precompile(ICE_VALA_C vala_precompile(ICE_VALA_C
@ -21,15 +21,15 @@ CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/exports/dino.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi
${CMAKE_BINARY_DIR}/exports/qlite.vapi ${CMAKE_BINARY_DIR}/exports/qlite.vapi
${CMAKE_BINARY_DIR}/exports/crypto-vala.vapi ${CMAKE_BINARY_DIR}/exports/crypto-vala.vapi
${CMAKE_CURRENT_SOURCE_DIR}/vapi/nice.vapi
${CMAKE_CURRENT_SOURCE_DIR}/vapi/gnutls.vapi
PACKAGES PACKAGES
${ICE_PACKAGES} ${ICE_PACKAGES}
OPTIONS
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi
) )
add_definitions(${VALA_CFLAGS} -DG_LOG_DOMAIN="ice") add_definitions(${VALA_CFLAGS} -DG_LOG_DOMAIN="ice")
add_library(ice SHARED ${ICE_VALA_C}) add_library(ice SHARED ${ICE_VALA_C})
target_link_libraries(ice libdino crypto-vala ${ICE_PACKAGES}) target_link_libraries(ice libdino crypto-vala ${ICE_PACKAGES} nice gnutls)
set_target_properties(ice PROPERTIES PREFIX "") set_target_properties(ice PROPERTIES PREFIX "")
set_target_properties(ice PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) set_target_properties(ice PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/)

View file

@ -3,13 +3,13 @@ find_package(Gettext)
include(${GETTEXT_USE_FILE}) include(${GETTEXT_USE_FILE})
gettext_compile(${GETTEXT_PACKAGE} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/po TARGET_NAME ${GETTEXT_PACKAGE}-translations) gettext_compile(${GETTEXT_PACKAGE} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/po TARGET_NAME ${GETTEXT_PACKAGE}-translations)
find_package(Qrencode REQUIRED)
find_packages(OMEMO_PACKAGES REQUIRED find_packages(OMEMO_PACKAGES REQUIRED
Gee Gee
GLib GLib
GModule GModule
GObject GObject
GTK3 GTK3
Qrencode
) )
set(RESOURCE_LIST set(RESOURCE_LIST
@ -66,18 +66,17 @@ CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi
${CMAKE_BINARY_DIR}/exports/qlite.vapi ${CMAKE_BINARY_DIR}/exports/qlite.vapi
${CMAKE_BINARY_DIR}/exports/dino.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi
${CMAKE_CURRENT_SOURCE_DIR}/vapi/libqrencode.vapi
PACKAGES PACKAGES
${OMEMO_PACKAGES} ${OMEMO_PACKAGES}
GRESOURCES GRESOURCES
${OMEMO_GRESOURCES_XML} ${OMEMO_GRESOURCES_XML}
OPTIONS
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi
) )
add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DG_LOG_DOMAIN="OMEMO") add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DG_LOG_DOMAIN="OMEMO")
add_library(omemo SHARED ${OMEMO_VALA_C} ${OMEMO_GRESOURCES_TARGET}) add_library(omemo SHARED ${OMEMO_VALA_C} ${OMEMO_GRESOURCES_TARGET})
add_dependencies(omemo ${GETTEXT_PACKAGE}-translations) add_dependencies(omemo ${GETTEXT_PACKAGE}-translations)
target_link_libraries(omemo libdino signal-protocol-vala crypto-vala ${OMEMO_PACKAGES}) target_link_libraries(omemo libdino signal-protocol-vala crypto-vala ${OMEMO_PACKAGES} libqrencode)
set_target_properties(omemo PROPERTIES PREFIX "") set_target_properties(omemo PROPERTIES PREFIX "")
set_target_properties(omemo PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) set_target_properties(omemo PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/)

View file

@ -31,8 +31,6 @@ PACKAGES
${RTP_PACKAGES} ${RTP_PACKAGES}
DEFINITIONS DEFINITIONS
${RTP_DEFINITIONS} ${RTP_DEFINITIONS}
OPTIONS
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi
) )
add_definitions(${VALA_CFLAGS} -DG_LOG_DOMAIN="rtp" -I${CMAKE_CURRENT_SOURCE_DIR}/src) add_definitions(${VALA_CFLAGS} -DG_LOG_DOMAIN="rtp" -I${CMAKE_CURRENT_SOURCE_DIR}/src)