mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-23 21:21:08 -05:00
Fix Windows linker and runtime errors when building against static Qt
This commit is contained in:
parent
1310b34e9c
commit
292ed892c1
9
cmake/FindLibGPGError.cmake
Normal file
9
cmake/FindLibGPGError.cmake
Normal file
@ -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)
|
@ -218,6 +218,7 @@ target_link_libraries(${PROGNAME}
|
|||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::Network
|
Qt5::Network
|
||||||
${GCRYPT_LIBRARIES}
|
${GCRYPT_LIBRARIES}
|
||||||
|
${GPGERROR_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES})
|
${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
||||||
|
10
src/main.cpp
10
src/main.cpp
@ -28,6 +28,16 @@
|
|||||||
#include "gui/MainWindow.h"
|
#include "gui/MainWindow.h"
|
||||||
#include "gui/MessageBox.h"
|
#include "gui/MessageBox.h"
|
||||||
|
|
||||||
|
#ifdef QT_STATIC
|
||||||
|
#include <QtPlugin>
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
|
||||||
|
#elif Q_OS_LINUX
|
||||||
|
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
#ifdef QT_NO_DEBUG
|
#ifdef QT_NO_DEBUG
|
||||||
|
@ -92,6 +92,7 @@ set(TEST_LIBRARIES
|
|||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::Test
|
Qt5::Test
|
||||||
${GCRYPT_LIBRARIES}
|
${GCRYPT_LIBRARIES}
|
||||||
|
${GPGERROR_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ target_link_libraries(kdbx-extract
|
|||||||
keepassx_core
|
keepassx_core
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
${GCRYPT_LIBRARIES}
|
${GCRYPT_LIBRARIES}
|
||||||
|
${GPGERROR_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES})
|
${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
add_executable(kdbx-merge kdbx-merge.cpp)
|
add_executable(kdbx-merge kdbx-merge.cpp)
|
||||||
@ -27,6 +28,7 @@ target_link_libraries(kdbx-merge
|
|||||||
keepassx_core
|
keepassx_core
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
${GCRYPT_LIBRARIES}
|
${GCRYPT_LIBRARIES}
|
||||||
|
${GPGERROR_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES})
|
${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user