Merge branch 'develop' into feature/yubikey

This commit is contained in:
Janek Bevendorff 2017-02-20 20:24:38 +01:00
commit a27147a75e
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
79 changed files with 8006 additions and 758 deletions

View file

@ -153,24 +153,9 @@ set(keepassx_FORMS
add_feature_info(KeePassHTTP WITH_XC_HTTP "KeePassHTTP support for ChromeIPass and PassIFox")
add_feature_info(Autotype WITH_XC_AUTOTYPE "Auto-type passwords in Input fields")
add_subdirectory(http)
if(WITH_XC_HTTP)
set(keepasshttp_SOURCES
http/AccessControlDialog.cpp
http/EntryConfig.cpp
http/HttpPasswordGeneratorWidget.cpp
http/HttpSettings.cpp
http/OptionDialog.cpp
http/Protocol.cpp
http/Server.cpp
http/Service.cpp
)
set(keepasshttp_FORMS
http/AccessControlDialog.ui
http/HttpPasswordGeneratorWidget.ui
http/OptionDialog.ui
)
set(keepasshttp_LIB keepasshttp)
qt5_wrap_ui(keepasshttp_SOURCES ${keepasshttp_FORMS})
set(keepasshttp_LIB keepasshttp)
endif()
add_subdirectory(autotype)
@ -205,24 +190,19 @@ qt5_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp)
target_link_libraries(zxcvbn)
if(WITH_XC_HTTP)
add_library(keepasshttp STATIC ${keepasshttp_SOURCES})
target_link_libraries(keepasshttp ${MHD_LIBRARIES} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
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)
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
target_link_libraries(${PROGNAME}
keepassx_core
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
target_link_libraries(keepassx_core
${keepasshttp_LIB}
${autotype_LIB}
zxcvbn
qhttp
Qt5::Core
Qt5::Concurrent
Qt5::Widgets
@ -230,6 +210,29 @@ target_link_libraries(${PROGNAME}
${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES})
if (UNIX AND NOT APPLE)
target_link_libraries(keepassx_core Qt5::DBus)
endif()
if(MINGW)
string(REPLACE "." ";" VERSION_LIST ${KEEPASSXC_VERSION})
list(GET VERSION_LIST 0 KEEPASSXC_VERSION_MAJOR)
list(GET VERSION_LIST 1 KEEPASSXC_VERSION_MINOR)
list(GET VERSION_LIST 2 KEEPASSXC_VERSION_PATCH)
include(GenerateProductVersion)
generate_product_version(
WIN32_ProductVersionFiles
NAME "KeePassXC"
COMPANY_NAME "KeePassXC Team"
VERSION_MAJOR ${KEEPASSXC_VERSION_MAJOR}
VERSION_MINOR ${KEEPASSXC_VERSION_MINOR}
VERSION_PATCH ${KEEPASSXC_VERSION_PATCH}
)
endif()
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE} ${WIN32_ProductVersionFiles})
target_link_libraries(${PROGNAME} keepassx_core)
if(YUBIKEY_FOUND)
target_link_libraries(keepassx_core ${YUBIKEY_LIBRARIES})