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/openpgp/CMakeLists.txt | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'plugins/openpgp') diff --git a/plugins/openpgp/CMakeLists.txt b/plugins/openpgp/CMakeLists.txt index 09a4ca7f..9a1a9d46 100644 --- a/plugins/openpgp/CMakeLists.txt +++ b/plugins/openpgp/CMakeLists.txt @@ -1,18 +1,11 @@ -find_package(Vala REQUIRED) -find_package(PkgConfig REQUIRED) -include(${VALA_USE_FILE}) -include(GlibCompileResourcesSupport) - -set(OPENPGP_PACKAGES - gee-0.8 - glib-2.0 - gtk+-3.0 - gmodule-2.0 - sqlite3 +find_packages(OPENPGP_PACKAGES REQUIRED + Gee + GLib>=2.38 + GModule + GObject + GTK3 ) -pkg_check_modules(OPENPGP REQUIRED ${OPENPGP_PACKAGES}) - set(RESOURCE_LIST account_settings_item.ui ) @@ -47,16 +40,13 @@ PACKAGES ${OPENPGP_PACKAGES} GRESOURCES ${OPENPGP_GRESOURCES_XML} -OPTIONS - --target-glib=2.38 - ${GLOBAL_DEBUG_FLAGS} - --thread ) -set(CFLAGS ${VALA_CFLAGS} ${OPENPGP_CFLAGS}) -add_definitions(${CFLAGS}) +add_definitions(${VALA_CFLAGS}) add_library(openpgp SHARED ${OPENPGP_VALA_C} ${OPENPGP_GRESOURCES_TARGET}) add_dependencies(openpgp dino-vapi gpgme-vapi) -target_link_libraries(openpgp libdino gpgme-vala) +target_link_libraries(openpgp libdino gpgme-vala ${OPENPGP_PACKAGES}) set_target_properties(openpgp PROPERTIES PREFIX "") set_target_properties(openpgp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) + +install(TARGETS openpgp ${PLUGIN_INSTALL}) \ No newline at end of file -- cgit v1.2.3-70-g09d2