aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-05-07 18:19:28 +0000
committerSaturneric <[email protected]>2022-05-07 18:47:03 +0000
commit038bfab9a5f1e616891286b8d735d5b72c26c87b (patch)
tree761a5a93a756cf9e92a7dca6c674183da965a842 /src
parentfix: add GenerateExportHeader for all platfrom (diff)
downloadGpgFrontend-038bfab9a5f1e616891286b8d735d5b72c26c87b.tar.gz
GpgFrontend-038bfab9a5f1e616891286b8d735d5b72c26c87b.zip
fix: use custom build gpgme lib
1. gpgme version of apt is too old.
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt13
-rw-r--r--src/core/GpgFrontendCoreExport.h42
2 files changed, 53 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 78f0b546..81078d4f 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -50,8 +50,17 @@ target_include_directories(gpgfrontend_core PUBLIC
${CMAKE_SOURCE_DIR}/third_party/easyloggingpp/src)
target_sources(gpgfrontend_core PUBLIC
${CMAKE_SOURCE_DIR}/third_party/easyloggingpp/src/easylogging++.cc)
-# link gnupg libraries
-target_link_libraries(gpgfrontend_core gpgme assuan gpg-error)
+
+if(LINUX AND GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE)
+ # froce to link gnupg static libraries for deb
+ find_library(GPG_ERROR_LIB libgpg-error.a)
+ find_library(ASSUAN_LIB libassuan.a)
+ find_library(GPGME_LIB libgpgme.a)
+ target_link_libraries(gpgfrontend_core ${GPGME_LIB} ${ASSUAN_LIB} ${GPG_ERROR_LIB})
+else()
+ # link gnupg libraries
+ target_link_libraries(gpgfrontend_core gpgme assuan gpg-error)
+endif()
# link openssl
target_link_libraries(gpgfrontend_core OpenSSL::SSL OpenSSL::Crypto)
# link Qt AES
diff --git a/src/core/GpgFrontendCoreExport.h b/src/core/GpgFrontendCoreExport.h
new file mode 100644
index 00000000..1422bddb
--- /dev/null
+++ b/src/core/GpgFrontendCoreExport.h
@@ -0,0 +1,42 @@
+
+#ifndef GPGFRONTEND_CORE_EXPORT_H
+#define GPGFRONTEND_CORE_EXPORT_H
+
+#ifdef GPGFRONTEND_CORE_STATIC_DEFINE
+# define GPGFRONTEND_CORE_EXPORT
+# define GPGFRONTEND_CORE_NO_EXPORT
+#else
+# ifndef GPGFRONTEND_CORE_EXPORT
+# ifdef gpgfrontend_core_EXPORTS
+ /* We are building this library */
+# define GPGFRONTEND_CORE_EXPORT __attribute__((visibility("default")))
+# else
+ /* We are using this library */
+# define GPGFRONTEND_CORE_EXPORT __attribute__((visibility("default")))
+# endif
+# endif
+
+# ifndef GPGFRONTEND_CORE_NO_EXPORT
+# define GPGFRONTEND_CORE_NO_EXPORT __attribute__((visibility("hidden")))
+# endif
+#endif
+
+#ifndef GPGFRONTEND_CORE_DEPRECATED
+# define GPGFRONTEND_CORE_DEPRECATED __attribute__ ((__deprecated__))
+#endif
+
+#ifndef GPGFRONTEND_CORE_DEPRECATED_EXPORT
+# define GPGFRONTEND_CORE_DEPRECATED_EXPORT GPGFRONTEND_CORE_EXPORT GPGFRONTEND_CORE_DEPRECATED
+#endif
+
+#ifndef GPGFRONTEND_CORE_DEPRECATED_NO_EXPORT
+# define GPGFRONTEND_CORE_DEPRECATED_NO_EXPORT GPGFRONTEND_CORE_NO_EXPORT GPGFRONTEND_CORE_DEPRECATED
+#endif
+
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef GPGFRONTEND_CORE_NO_DEPRECATED
+# define GPGFRONTEND_CORE_NO_DEPRECATED
+# endif
+#endif
+
+#endif /* GPGFRONTEND_CORE_EXPORT_H */