aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-23 17:10:45 +0100
committerMarvin W <git@larma.de>2017-03-23 17:16:08 +0100
commite6f89f8751e6e65d4a36a125cc3fe398098ba504 (patch)
tree54acce89355ee07b05db761d6d0dad8dad4e0f36 /plugins/openpgp
parentef0483765a0fd567f25b1f0af6df04e8973e5624 (diff)
downloaddino-e6f89f8751e6e65d4a36a125cc3fe398098ba504.tar.gz
dino-e6f89f8751e6e65d4a36a125cc3fe398098ba504.zip
New CMake
- add install and uninstall targets - compatibility for systems without pkg-config
Diffstat (limited to 'plugins/openpgp')
-rw-r--r--plugins/openpgp/CMakeLists.txt30
1 files changed, 10 insertions, 20 deletions
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