Corrected autotype lib building for Windows

This commit is contained in:
Jonathan White 2016-12-27 22:24:22 -05:00
parent 07a41f58d7
commit 0e65b9b9f8
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01
4 changed files with 9 additions and 10 deletions

View File

@ -169,6 +169,8 @@ if(WITH_XC_HTTP)
qt5_wrap_ui(keepasshttp_SOURCES ${keepasshttp_FORMS})
endif()
add_subdirectory(autotype)
set(autotype_SOURCES
core/Tools.cpp
autotype/AutoType.cpp
@ -181,7 +183,6 @@ set(autotype_SOURCES
autotype/WindowSelectComboBox.cpp
autotype/test/AutoTypeTestInterface.h
)
set(autotype_LIB autotype)
if(MINGW)
set(keepassx_SOURCES_MAINEXE
@ -202,6 +203,8 @@ endif()
add_library(autotype STATIC ${autotype_SOURCES})
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
set(autotype_LIB autotype)
add_library(keepassx_core STATIC ${keepassx_SOURCES})
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
target_link_libraries(keepassx_core zxcvbn ${keepasshttp_LIB} ${autotype_LIB} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
@ -210,8 +213,6 @@ add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
target_link_libraries(${PROGNAME}
keepassx_core
zxcvbn
${keepasshttp_LIB}
${autotype_LIB}
Qt5::Core
Qt5::Concurrent
Qt5::Widgets
@ -231,8 +232,6 @@ install(TARGETS ${PROGNAME}
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
add_subdirectory(autotype)
if(APPLE)
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"

View File

@ -3,4 +3,4 @@ set(autotype_test_SOURCES
)
add_library(keepassx-autotype-test MODULE ${autotype_test_SOURCES})
target_link_libraries(keepassx-autotype-test testautotype keepassx_core ${autotype_LIB} Qt5::Core Qt5::Widgets)
target_link_libraries(keepassx-autotype-test keepassx_core ${autotype_LIB} Qt5::Core Qt5::Widgets)

View File

@ -3,7 +3,7 @@ set(autotype_win_SOURCES
)
add_library(keepassx-autotype-windows MODULE ${autotype_win_SOURCES})
target_link_libraries(keepassx-autotype-windows ${PROGNAME} Qt5::Core Qt5::Widgets)
target_link_libraries(keepassx-autotype-windows keepassx_core ${autotype_LIB} Qt5::Core Qt5::Widgets)
install(TARGETS keepassx-autotype-windows
BUNDLE DESTINATION . COMPONENT Runtime
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)

View File

@ -24,9 +24,9 @@
#if defined(Q_OS_WIN)
# if defined(KEEPASSX_BUILDING_CORE)
# define KEEPASSX_EXPORT Q_DECL_EXPORT
# else
# define KEEPASSX_EXPORT Q_DECL_IMPORT
# else
# define KEEPASSX_EXPORT Q_DECL_EXPORT
# endif
#else
# define KEEPASSX_EXPORT Q_DECL_EXPORT