diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CMakeLists.txt | 8 | ||||
-rw-r--r-- | plugins/gpgme-vala/CMakeLists.txt | 20 | ||||
-rw-r--r-- | plugins/omemo/CMakeLists.txt | 29 | ||||
-rw-r--r-- | plugins/openpgp/CMakeLists.txt | 30 | ||||
-rw-r--r-- | plugins/signal-protocol/CMakeLists.txt | 30 |
5 files changed, 39 insertions, 78 deletions
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9a3b9763..1eb3dbb1 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,9 +1,9 @@ -if(NOT WITHOUT_OPENPGP) +if(PLUGIN_ENABLED_openpgp) add_subdirectory(gpgme-vala) add_subdirectory(openpgp) -endif(NOT WITHOUT_OPENPGP) +endif(PLUGIN_ENABLED_openpgp) -if(NOT WITHOUT_OMEMO) +if(PLUGIN_ENABLED_omemo) add_subdirectory(omemo) add_subdirectory(signal-protocol) -endif(NOT WITHOUT_OMEMO) +endif(PLUGIN_ENABLED_omemo) 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" diff --git a/plugins/omemo/CMakeLists.txt b/plugins/omemo/CMakeLists.txt index 4a040f19..7f031714 100644 --- a/plugins/omemo/CMakeLists.txt +++ b/plugins/omemo/CMakeLists.txt @@ -1,17 +1,11 @@ -find_package(Vala REQUIRED) -find_package(PkgConfig REQUIRED) -include(${VALA_USE_FILE}) - -set(OMEMO_PACKAGES - gee-0.8 - glib-2.0 - gtk+-3.0 - gmodule-2.0 - sqlite3 +find_packages(OMEMO_PACKAGES REQUIRED + Gee + GLib + GModule + GObject + GTK3 ) -pkg_check_modules(OMEMO REQUIRED ${OMEMO_PACKAGES}) - vala_precompile(OMEMO_VALA_C SOURCES src/account_settings_entry.vala @@ -35,16 +29,13 @@ CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/dino.vapi PACKAGES ${OMEMO_PACKAGES} -OPTIONS - --target-glib=2.38 - ${GLOBAL_DEBUG_FLAGS} - --thread ) -set(CFLAGS ${VALA_CFLAGS} ${OMEMO_CFLAGS}) -add_definitions(${CFLAGS}) +add_definitions(${VALA_CFLAGS}) add_library(omemo SHARED ${OMEMO_VALA_C}) add_dependencies(omemo dino-vapi signal-protocol-vapi) -target_link_libraries(omemo libdino signal-protocol-vala) +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/) + +install(TARGETS omemo ${PLUGIN_INSTALL})
\ No newline at end of file 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 diff --git a/plugins/signal-protocol/CMakeLists.txt b/plugins/signal-protocol/CMakeLists.txt index de95adc6..6a283b9b 100644 --- a/plugins/signal-protocol/CMakeLists.txt +++ b/plugins/signal-protocol/CMakeLists.txt @@ -1,21 +1,15 @@ -add_subdirectory(libsignal-protocol-c) +add_subdirectory(libsignal-protocol-c EXCLUDE_FROM_ALL) set_property(TARGET curve25519 PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET protobuf-c PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET signal-protocol-c PROPERTY POSITION_INDEPENDENT_CODE ON) -find_package(Vala REQUIRED) -find_package(PkgConfig REQUIRED) find_package(OpenSSL REQUIRED) -include(${VALA_USE_FILE}) - -set(SIGNAL_PROTOCOL_PACKAGES - glib-2.0 - gee-0.8 - gobject-2.0 +find_packages(SIGNAL_PROTOCOL_PACKAGES REQUIRED + Gee + GLib + GObject ) -pkg_check_modules(SIGNAL_PROTOCOL REQUIRED ${SIGNAL_PROTOCOL_PACKAGES}) - vala_precompile(SIGNAL_PROTOCOL_VALA_C SOURCES "src/context.vala" @@ -34,16 +28,13 @@ GENERATE_VAPI signal-protocol-vala GENERATE_HEADER signal-protocol-vala -OPTIONS - ${GLOBAL_DEBUG_FLAGS} - --thread ) -set(CFLAGS ${VALA_CFLAGS} ${SIGNAL_PROTOCOL_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/libsignal-protocol-c/src -I${CMAKE_CURRENT_SOURCE_DIR}/src) +set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/libsignal-protocol-c/src -I${CMAKE_CURRENT_SOURCE_DIR}/src) add_definitions(${CFLAGS}) add_library(signal-protocol-vala ${SIGNAL_PROTOCOL_VALA_C} ${CMAKE_CURRENT_SOURCE_DIR}/src/signal_helper.c) add_dependencies(signal-protocol-vala signal-protocol-c) -target_link_libraries(signal-protocol-vala ${SIGNAL_PROTOCOL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY} signal-protocol-c -lm) +target_link_libraries(signal-protocol-vala ${SIGNAL_PROTOCOL_PACKAGES} ${OPENSSL_CRYPTO_LIBRARY} signal-protocol-c -lm) set_property(TARGET signal-protocol-vala PROPERTY POSITION_INDEPENDENT_CODE ON) set(SIGNAL_PROTOCOL_C_HEADERS @@ -126,13 +117,10 @@ if(BUILD_TESTING) ${CMAKE_CURRENT_SOURCE_DIR}/vapi/signal-protocol-native.vapi PACKAGES ${SIGNAL_PROTOCOL_PACKAGES} - OPTIONS - ${GLOBAL_DEBUG_FLAGS} - --thread ) - set(CFLAGS ${VALA_CFLAGS} ${SIGNAL_PROTOCOL_CFLAGS} -I${CMAKE_CURRENT_BINARY_DIR}/signal-protocol) + set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_BINARY_DIR}/signal-protocol) add_executable(signal-protocol-vala-test ${SIGNAL_TEST_VALA_C}) add_dependencies(signal-protocol-vala-test signal-protocol-vala signal-protocol-vapi) - target_link_libraries(signal-protocol-vala-test signal-protocol-vala) + target_link_libraries(signal-protocol-vala-test signal-protocol-vala ${SIGNAL_PROTOCOL_PACKAGES}) endif(BUILD_TESTING)
\ No newline at end of file |