diff --git a/cmake/FindLibGPGError.cmake b/cmake/FindLibGPGError.cmake new file mode 100644 index 000000000..fe9ef9123 --- /dev/null +++ b/cmake/FindLibGPGError.cmake @@ -0,0 +1,9 @@ + +find_path(GPGERROR_INCLUDE_DIR gpg-error.h) + +find_library(GPGERROR_LIBRARIES gpg-error) + +mark_as_advanced(GPGERROR_LIBRARIES GPGERROR_INCLUDE_DIR) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibGPGError DEFAULT_MSG GPGERROR_LIBRARIES GPGERROR_INCLUDE_DIR) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22ca342c1..b843de85a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -218,6 +218,7 @@ target_link_libraries(${PROGNAME} Qt5::Widgets Qt5::Network ${GCRYPT_LIBRARIES} + ${GPGERROR_LIBRARIES} ${ZLIB_LIBRARIES}) set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON) diff --git a/src/main.cpp b/src/main.cpp index a94d65eaa..224e54d1e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,16 @@ #include "gui/MainWindow.h" #include "gui/MessageBox.h" +#ifdef QT_STATIC +#include + +#ifdef Q_OS_WIN +Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) +#elif Q_OS_LINUX +Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) +#endif +#endif + int main(int argc, char** argv) { #ifdef QT_NO_DEBUG diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0ea73b2fe..5840a5b4b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -92,6 +92,7 @@ set(TEST_LIBRARIES Qt5::Widgets Qt5::Test ${GCRYPT_LIBRARIES} + ${GPGERROR_LIBRARIES} ${ZLIB_LIBRARIES} ) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 846e39230..83f00b4bc 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -20,6 +20,7 @@ target_link_libraries(kdbx-extract keepassx_core Qt5::Core ${GCRYPT_LIBRARIES} + ${GPGERROR_LIBRARIES} ${ZLIB_LIBRARIES}) add_executable(kdbx-merge kdbx-merge.cpp) @@ -27,6 +28,7 @@ target_link_libraries(kdbx-merge keepassx_core Qt5::Core ${GCRYPT_LIBRARIES} + ${GPGERROR_LIBRARIES} ${ZLIB_LIBRARIES})