2017-03-23 16:10:45 +00:00
|
|
|
find_packages(ENGINE_PACKAGES REQUIRED
|
|
|
|
GDKPixbuf2
|
|
|
|
Gee
|
|
|
|
GIO
|
|
|
|
GLib
|
|
|
|
GObject
|
2019-12-22 03:10:53 +00:00
|
|
|
ICU
|
2017-03-02 14:37:32 +00:00
|
|
|
)
|
|
|
|
|
2019-11-29 15:03:18 +00:00
|
|
|
set(ENGINE_DEFINITIONS "")
|
|
|
|
|
|
|
|
find_package(GIO)
|
|
|
|
if(GIO_VERSION VERSION_GREATER "2.60")
|
|
|
|
message(STATUS "ALPN support enabled")
|
|
|
|
set(ENGINE_DEFINITIONS ALPN_SUPPORT)
|
|
|
|
else()
|
|
|
|
message(STATUS "No ALPN support, needs GIO >= 2.60")
|
|
|
|
endif()
|
2019-12-22 03:10:53 +00:00
|
|
|
set(ENGINE_EXTRA_OPTIONS ${MAIN_EXTRA_OPTIONS} --vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi)
|
2019-11-29 15:03:18 +00:00
|
|
|
|
2017-03-02 14:37:32 +00:00
|
|
|
vala_precompile(ENGINE_VALA_C
|
|
|
|
SOURCES
|
2020-11-16 14:55:33 +00:00
|
|
|
"src/core/direct_tls_xmpp_stream.vala"
|
|
|
|
"src/core/io_xmpp_stream.vala"
|
|
|
|
"src/core/module_flag.vala"
|
|
|
|
"src/core/starttls_xmpp_stream.vala"
|
|
|
|
"src/core/stream_connect.vala"
|
|
|
|
"src/core/tls_xmpp_stream.vala"
|
|
|
|
"src/core/xmpp_stream.vala"
|
|
|
|
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/core/namespace_state.vala"
|
|
|
|
"src/core/stanza_attribute.vala"
|
|
|
|
"src/core/stanza_node.vala"
|
|
|
|
"src/core/stanza_reader.vala"
|
|
|
|
"src/core/stanza_writer.vala"
|
2017-08-07 19:44:22 +00:00
|
|
|
"src/core/xmpp_log.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
|
|
|
|
"src/module/bind.vala"
|
2019-09-28 19:40:43 +00:00
|
|
|
"src/module/bookmarks_provider.vala"
|
|
|
|
"src/module/conference.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/iq/module.vala"
|
|
|
|
"src/module/iq/stanza.vala"
|
2018-01-12 20:03:09 +00:00
|
|
|
"src/module/jid.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/message/module.vala"
|
|
|
|
"src/module/message/stanza.vala"
|
|
|
|
"src/module/presence/flag.vala"
|
|
|
|
"src/module/presence/module.vala"
|
|
|
|
"src/module/presence/stanza.vala"
|
|
|
|
"src/module/roster/flag.vala"
|
|
|
|
"src/module/roster/item.vala"
|
|
|
|
"src/module/roster/module.vala"
|
2017-05-21 21:30:30 +00:00
|
|
|
"src/module/roster/versioning_module.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/sasl.vala"
|
2017-06-20 23:07:06 +00:00
|
|
|
"src/module/session.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/stanza.vala"
|
|
|
|
"src/module/stanza_error.vala"
|
|
|
|
"src/module/stream_error.vala"
|
|
|
|
"src/module/util.vala"
|
|
|
|
|
2019-09-28 19:40:43 +00:00
|
|
|
"src/module/xep/0048_bookmarks.vala"
|
|
|
|
"src/module/xep/0048_conference.vala"
|
|
|
|
"src/module/xep/0402_bookmarks2.vala"
|
2017-05-30 20:17:41 +00:00
|
|
|
"src/module/xep/0004_data_forms.vala"
|
2021-03-19 21:46:39 +00:00
|
|
|
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0030_service_discovery/flag.vala"
|
2017-03-30 23:17:01 +00:00
|
|
|
"src/module/xep/0030_service_discovery/identity.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0030_service_discovery/info_result.vala"
|
2017-03-30 23:17:01 +00:00
|
|
|
"src/module/xep/0030_service_discovery/item.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0030_service_discovery/items_result.vala"
|
|
|
|
"src/module/xep/0030_service_discovery/module.vala"
|
2021-03-19 21:46:39 +00:00
|
|
|
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0045_muc/flag.vala"
|
|
|
|
"src/module/xep/0045_muc/module.vala"
|
2017-04-11 16:06:01 +00:00
|
|
|
"src/module/xep/0045_muc/status_code.vala"
|
2021-03-19 21:46:39 +00:00
|
|
|
|
2019-06-23 12:53:18 +00:00
|
|
|
"src/module/xep/0047_in_band_bytestreams.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0049_private_xml_storage.vala"
|
2022-07-08 14:33:40 +00:00
|
|
|
"src/module/xep/0059_result_set_management.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0054_vcard/module.vala"
|
|
|
|
"src/module/xep/0060_pubsub.vala"
|
2019-07-20 21:14:40 +00:00
|
|
|
"src/module/xep/0065_socks5_bytestreams.vala"
|
2017-10-22 15:24:16 +00:00
|
|
|
"src/module/xep/0066_out_of_band_data.vala"
|
2018-08-19 22:27:02 +00:00
|
|
|
"src/module/xep/0077_in_band_registration.vala"
|
2017-03-09 14:34:32 +00:00
|
|
|
"src/module/xep/0082_date_time_profiles.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0084_user_avatars.vala"
|
|
|
|
"src/module/xep/0085_chat_state_notifications.vala"
|
2020-09-03 20:52:07 +00:00
|
|
|
"src/module/xep/0115_entity_capabilities.vala"
|
2021-03-19 21:46:39 +00:00
|
|
|
|
|
|
|
"src/module/xep/0166_jingle/content.vala"
|
|
|
|
"src/module/xep/0166_jingle/content_description.vala"
|
|
|
|
"src/module/xep/0166_jingle/content_node.vala"
|
|
|
|
"src/module/xep/0166_jingle/content_security.vala"
|
|
|
|
"src/module/xep/0166_jingle/content_transport.vala"
|
|
|
|
"src/module/xep/0166_jingle/component.vala"
|
|
|
|
"src/module/xep/0166_jingle/jingle_flag.vala"
|
|
|
|
"src/module/xep/0166_jingle/jingle_module.vala"
|
|
|
|
"src/module/xep/0166_jingle/jingle_structs.vala"
|
|
|
|
"src/module/xep/0166_jingle/reason_element.vala"
|
|
|
|
"src/module/xep/0166_jingle/session.vala"
|
|
|
|
"src/module/xep/0166_jingle/session_info.vala"
|
|
|
|
|
|
|
|
"src/module/xep/0167_jingle_rtp/content_parameters.vala"
|
|
|
|
"src/module/xep/0167_jingle_rtp/content_type.vala"
|
|
|
|
"src/module/xep/0167_jingle_rtp/jingle_rtp_module.vala"
|
|
|
|
"src/module/xep/0167_jingle_rtp/payload_type.vala"
|
|
|
|
"src/module/xep/0167_jingle_rtp/session_info_type.vala"
|
|
|
|
"src/module/xep/0167_jingle_rtp/stream.vala"
|
|
|
|
|
|
|
|
"src/module/xep/0176_jingle_ice_udp/candidate.vala"
|
|
|
|
"src/module/xep/0176_jingle_ice_udp/jingle_ice_udp_module.vala"
|
|
|
|
"src/module/xep/0176_jingle_ice_udp/transport_parameters.vala"
|
|
|
|
|
2021-11-04 16:33:08 +00:00
|
|
|
"src/module/xep/0177_jingle_raw_udp.vala"
|
|
|
|
|
2021-04-25 17:49:10 +00:00
|
|
|
"src/module/xep/0384_omemo/omemo_encryptor.vala"
|
|
|
|
"src/module/xep/0384_omemo/omemo_decryptor.vala"
|
|
|
|
|
2019-06-23 12:53:18 +00:00
|
|
|
"src/module/xep/0184_message_delivery_receipts.vala"
|
2017-10-05 19:04:39 +00:00
|
|
|
"src/module/xep/0191_blocking_command.vala"
|
2017-08-12 21:14:50 +00:00
|
|
|
"src/module/xep/0198_stream_management.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0199_ping.vala"
|
|
|
|
"src/module/xep/0203_delayed_delivery.vala"
|
2021-03-21 11:41:32 +00:00
|
|
|
"src/module/xep/0215_external_service_discovery.vala"
|
2019-06-23 12:53:18 +00:00
|
|
|
"src/module/xep/0234_jingle_file_transfer.vala"
|
2021-01-12 22:10:45 +00:00
|
|
|
"src/module/xep/0249_direct_muc_invitations.vala"
|
2019-07-20 21:14:40 +00:00
|
|
|
"src/module/xep/0260_jingle_socks5_bytestreams.vala"
|
2019-06-23 12:53:18 +00:00
|
|
|
"src/module/xep/0261_jingle_in_band_bytestreams.vala"
|
2021-11-04 16:33:08 +00:00
|
|
|
"src/module/xep/0272_muji.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0280_message_carbons.vala"
|
2022-07-08 14:33:40 +00:00
|
|
|
"src/module/xep/0297_stanza_forwarding.vala"
|
2021-11-04 16:33:08 +00:00
|
|
|
"src/module/xep/0298_coin.vala"
|
2020-04-03 20:49:59 +00:00
|
|
|
"src/module/xep/0308_last_message_correction.vala"
|
2017-08-16 09:44:42 +00:00
|
|
|
"src/module/xep/0313_message_archive_management.vala"
|
2022-07-08 14:33:40 +00:00
|
|
|
"src/module/xep/0313_2_message_archive_management.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/0333_chat_markers.vala"
|
2019-05-11 22:09:50 +00:00
|
|
|
"src/module/xep/0334_message_processing_hints.vala"
|
2021-03-21 11:41:32 +00:00
|
|
|
"src/module/xep/0353_jingle_message_initiation.vala"
|
2022-01-19 15:54:56 +00:00
|
|
|
"src/module/xep/0353_call_invite_message.vala"
|
2019-12-18 17:23:31 +00:00
|
|
|
"src/module/xep/0359_unique_stable_stanza_ids.vala"
|
2018-11-14 17:17:10 +00:00
|
|
|
"src/module/xep/0363_http_file_upload.vala"
|
2018-05-28 14:19:51 +00:00
|
|
|
"src/module/xep/0380_explicit_encryption.vala"
|
2019-09-10 18:56:00 +00:00
|
|
|
"src/module/xep/0391_jingle_encrypted_transports.vala"
|
2020-08-14 14:42:56 +00:00
|
|
|
"src/module/xep/0410_muc_self_ping.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
"src/module/xep/pixbuf_storage.vala"
|
2019-09-01 16:18:25 +00:00
|
|
|
|
|
|
|
"src/util.vala"
|
2017-03-02 14:37:32 +00:00
|
|
|
PACKAGES
|
|
|
|
${ENGINE_PACKAGES}
|
|
|
|
GENERATE_VAPI
|
2017-03-10 16:01:45 +00:00
|
|
|
xmpp-vala
|
2017-03-02 14:37:32 +00:00
|
|
|
GENERATE_HEADER
|
2017-03-10 16:01:45 +00:00
|
|
|
xmpp-vala
|
2019-12-17 22:52:05 +00:00
|
|
|
CUSTOM_VAPIS
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/glib_fixes.vapi"
|
2019-11-29 15:03:18 +00:00
|
|
|
DEFINITIONS
|
|
|
|
${ENGINE_DEFINITIONS}
|
2019-12-22 03:10:53 +00:00
|
|
|
OPTIONS
|
|
|
|
${ENGINE_EXTRA_OPTIONS}
|
2017-03-02 14:37:32 +00:00
|
|
|
)
|
|
|
|
|
2017-03-10 16:01:45 +00:00
|
|
|
add_custom_target(xmpp-vala-vapi
|
2017-03-02 14:37:32 +00:00
|
|
|
DEPENDS
|
2017-03-11 22:20:25 +00:00
|
|
|
${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi
|
2017-03-23 16:10:45 +00:00
|
|
|
${CMAKE_BINARY_DIR}/exports/xmpp-vala.deps
|
2017-03-02 14:37:32 +00:00
|
|
|
)
|
|
|
|
|
2019-09-10 18:56:00 +00:00
|
|
|
add_definitions(${VALA_CFLAGS} -DG_LOG_DOMAIN="xmpp-vala")
|
2017-04-23 08:01:40 +00:00
|
|
|
add_library(xmpp-vala SHARED ${ENGINE_VALA_C})
|
|
|
|
add_dependencies(xmpp-vala xmpp-vala-vapi)
|
|
|
|
target_link_libraries(xmpp-vala ${ENGINE_PACKAGES})
|
|
|
|
set_target_properties(xmpp-vala PROPERTIES VERSION 0.1 SOVERSION 0)
|
|
|
|
|
2017-03-23 16:10:45 +00:00
|
|
|
install(TARGETS xmpp-vala ${TARGET_INSTALL})
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/xmpp-vala.deps DESTINATION ${VAPI_INSTALL_DIR})
|
2017-06-20 23:07:06 +00:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/exports/xmpp-vala.h DESTINATION ${INCLUDE_INSTALL_DIR})
|
2017-05-13 15:43:51 +00:00
|
|
|
|
|
|
|
if(BUILD_TESTS)
|
|
|
|
vala_precompile(ENGINE_TEST_VALA_C
|
|
|
|
SOURCES
|
|
|
|
"tests/common.vala"
|
|
|
|
"tests/testcase.vala"
|
|
|
|
|
2019-12-22 03:10:53 +00:00
|
|
|
"tests/jid.vala"
|
2017-05-13 15:43:51 +00:00
|
|
|
"tests/stanza.vala"
|
2019-09-01 16:18:25 +00:00
|
|
|
"tests/util.vala"
|
2017-05-13 15:43:51 +00:00
|
|
|
CUSTOM_VAPIS
|
|
|
|
${CMAKE_BINARY_DIR}/exports/xmpp-vala_internal.vapi
|
|
|
|
PACKAGES
|
|
|
|
${ENGINE_PACKAGES}
|
2019-12-22 03:10:53 +00:00
|
|
|
OPTIONS
|
|
|
|
${ENGINE_EXTRA_OPTIONS}
|
2017-05-13 15:43:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_definitions(${VALA_CFLAGS})
|
|
|
|
add_executable(xmpp-vala-test ${ENGINE_TEST_VALA_C})
|
|
|
|
target_link_libraries(xmpp-vala-test xmpp-vala ${SIGNAL_PROTOCOL_PACKAGES})
|
|
|
|
endif(BUILD_TESTS)
|