diff options
author | Marvin W <git@larma.de> | 2019-01-02 15:24:03 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-01-02 15:36:41 +0100 |
commit | cdd4c0b854fd4d27fa1d9bd941df03888301780a (patch) | |
tree | 9a6643d693d9868c20da9d54e1e68b175e7d5571 | |
parent | 7012023d5997287b1ed300e03a4c5b91eb6c9c39 (diff) | |
download | dino-cdd4c0b854fd4d27fa1d9bd941df03888301780a.tar.gz dino-cdd4c0b854fd4d27fa1d9bd941df03888301780a.zip |
Find libqrencode using cmake/pkg-config logic
-rw-r--r-- | cmake/FindQrencode.cmake | 11 | ||||
-rw-r--r-- | plugins/omemo/CMakeLists.txt | 6 | ||||
-rw-r--r-- | plugins/omemo/vapi/libqrencode.vapi (renamed from plugins/omemo/vapi/qrencode.vapi) | 0 |
3 files changed, 15 insertions, 2 deletions
diff --git a/cmake/FindQrencode.cmake b/cmake/FindQrencode.cmake new file mode 100644 index 00000000..ccbf4f4e --- /dev/null +++ b/cmake/FindQrencode.cmake @@ -0,0 +1,11 @@ +include(PkgConfigWithFallback) +find_pkg_config_with_fallback(Qrencode + PKG_CONFIG_NAME libqrencode + LIB_NAMES qrencode + INCLUDE_NAMES qrencode.h +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Qrencode + REQUIRED_VARS Qrencode_LIBRARY + VERSION_VAR Qrencode_VERSION) diff --git a/plugins/omemo/CMakeLists.txt b/plugins/omemo/CMakeLists.txt index b2145be7..92d5cd51 100644 --- a/plugins/omemo/CMakeLists.txt +++ b/plugins/omemo/CMakeLists.txt @@ -10,6 +10,7 @@ find_packages(OMEMO_PACKAGES REQUIRED GObject GTK3 Soup + Qrencode ) set(RESOURCE_LIST @@ -57,17 +58,18 @@ CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/qlite.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi - ${CMAKE_CURRENT_SOURCE_DIR}/vapi/qrencode.vapi PACKAGES ${OMEMO_PACKAGES} GRESOURCES ${OMEMO_GRESOURCES_XML} +OPTIONS + --vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi ) add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\") add_library(omemo SHARED ${OMEMO_VALA_C} ${OMEMO_GRESOURCES_TARGET}) add_dependencies(omemo ${GETTEXT_PACKAGE}-translations) -target_link_libraries(omemo libdino signal-protocol-vala qrencode ${OMEMO_PACKAGES}) +target_link_libraries(omemo libdino signal-protocol-vala ${OMEMO_PACKAGES}) set_target_properties(omemo PROPERTIES PREFIX "") set_target_properties(omemo PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) diff --git a/plugins/omemo/vapi/qrencode.vapi b/plugins/omemo/vapi/libqrencode.vapi index fc77c855..fc77c855 100644 --- a/plugins/omemo/vapi/qrencode.vapi +++ b/plugins/omemo/vapi/libqrencode.vapi |