From e6f89f8751e6e65d4a36a125cc3fe398098ba504 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 23 Mar 2017 17:10:45 +0100 Subject: New CMake - add install and uninstall targets - compatibility for systems without pkg-config --- plugins/gpgme-vala/CMakeLists.txt | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'plugins/gpgme-vala') diff --git a/plugins/gpgme-vala/CMakeLists.txt b/plugins/gpgme-vala/CMakeLists.txt index b5b13c69..14cef3d2 100644 --- a/plugins/gpgme-vala/CMakeLists.txt +++ b/plugins/gpgme-vala/CMakeLists.txt @@ -1,15 +1,10 @@ -find_package(Vala REQUIRED) -find_package(PkgConfig REQUIRED) find_package(GPGME REQUIRED) -include(${VALA_USE_FILE}) - -set(GPGME_VALA_PACKAGES - gee-0.8 - glib-2.0 +find_packages(GPGME_VALA_PACKAGES REQUIRED + Gee + GLib + GObject ) -pkg_check_modules(GPGME_VALA REQUIRED ${GPGME_VALA_PACKAGES}) - vala_precompile(GPGME_VALA_C SOURCES "src/gpgme_helper.vala" @@ -23,15 +18,12 @@ GENERATE_VAPI gpgme-vala GENERATE_HEADER gpgme-vala -OPTIONS - ${GLOBAL_DEBUG_FLAGS} - --thread ) -set(CFLAGS ${VALA_CFLAGS} ${GPGME_VALA_CFLAGS} ${GPGME_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/src) +set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/src) add_definitions(${CFLAGS}) add_library(gpgme-vala ${GPGME_VALA_C} src/gpgme_fix.c) -target_link_libraries(gpgme-vala ${GPGME_VALA_LIBRARIES} ${GPGME_LIBRARIES}) +target_link_libraries(gpgme-vala ${GPGME_VALA_PACKAGES} gpgme) set_property(TARGET gpgme-vala PROPERTY POSITION_INDEPENDENT_CODE ON) add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/gpgme_fix.h" -- cgit v1.2.3-70-g09d2