diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/core/GpgFrontendCoreExport.h | 42 |
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 */ |