2010-08-07 15:10:44 +02:00
|
|
|
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
2017-06-09 23:40:36 +02:00
|
|
|
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
2010-08-07 15:10:44 +02:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 2 or (at your option)
|
|
|
|
# version 3 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2012-05-21 23:37:29 +02:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
2010-08-13 18:08:06 +02:00
|
|
|
|
2012-05-21 23:37:29 +02:00
|
|
|
configure_file(config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h)
|
2010-08-13 18:08:06 +02:00
|
|
|
|
2015-07-18 09:05:26 +02:00
|
|
|
include(GetGitRevisionDescription)
|
|
|
|
get_git_head_revision(GIT_REFSPEC GIT_HEAD)
|
|
|
|
git_describe(GIT_DESCRIBE --long)
|
|
|
|
|
|
|
|
if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
|
|
|
|
set(GIT_HEAD "")
|
|
|
|
set(GIT_DESCRIBE "")
|
|
|
|
endif()
|
|
|
|
|
2017-06-28 15:18:24 +02:00
|
|
|
find_library(ZXCVBN_LIBRARIES zxcvbn)
|
|
|
|
if(NOT ZXCVBN_LIBRARIES)
|
2017-06-28 14:58:29 +02:00
|
|
|
add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp)
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zxcvbn)
|
2017-06-28 15:18:24 +02:00
|
|
|
set(ZXCVBN_LIBRARIES zxcvbn)
|
|
|
|
endif(NOT ZXCVBN_LIBRARIES)
|
2017-06-28 14:58:29 +02:00
|
|
|
|
2015-07-18 09:05:26 +02:00
|
|
|
configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
|
|
|
|
|
2010-08-07 15:10:44 +02:00
|
|
|
set(keepassx_SOURCES
|
2012-07-16 09:54:04 +02:00
|
|
|
core/AutoTypeAssociations.cpp
|
2011-12-25 19:17:40 +01:00
|
|
|
core/Config.cpp
|
2017-01-09 01:33:21 +01:00
|
|
|
core/CsvParser.cpp
|
2010-08-07 15:10:44 +02:00
|
|
|
core/Database.cpp
|
2010-09-19 21:22:24 +02:00
|
|
|
core/DatabaseIcons.cpp
|
2010-09-13 23:24:36 +02:00
|
|
|
core/Endian.cpp
|
2010-08-07 15:10:44 +02:00
|
|
|
core/Entry.cpp
|
2012-04-14 15:38:20 +02:00
|
|
|
core/EntryAttachments.cpp
|
|
|
|
core/EntryAttributes.cpp
|
2014-05-15 23:48:54 +02:00
|
|
|
core/EntrySearcher.cpp
|
2012-07-18 20:44:28 +02:00
|
|
|
core/FilePath.cpp
|
2013-03-29 23:36:07 +01:00
|
|
|
core/Global.h
|
2010-08-07 15:10:44 +02:00
|
|
|
core/Group.cpp
|
2014-01-07 21:56:58 +01:00
|
|
|
core/InactivityTimer.cpp
|
2012-07-12 22:26:41 +02:00
|
|
|
core/ListDeleter.h
|
2010-08-07 15:10:44 +02:00
|
|
|
core/Metadata.cpp
|
2013-03-12 21:54:05 +01:00
|
|
|
core/PasswordGenerator.cpp
|
2017-03-04 15:10:50 +01:00
|
|
|
core/PassphraseGenerator.cpp
|
2012-08-01 10:35:37 +02:00
|
|
|
core/SignalMultiplexer.cpp
|
2016-12-24 01:04:43 +01:00
|
|
|
core/ScreenLockListener.cpp
|
|
|
|
core/ScreenLockListener.h
|
|
|
|
core/ScreenLockListenerPrivate.h
|
|
|
|
core/ScreenLockListenerPrivate.cpp
|
2012-08-15 22:47:41 +02:00
|
|
|
core/TimeDelta.cpp
|
2010-08-07 15:10:44 +02:00
|
|
|
core/TimeInfo.cpp
|
2014-05-16 11:48:30 +02:00
|
|
|
core/ToDbExporter.cpp
|
2012-04-10 15:31:47 +02:00
|
|
|
core/Tools.cpp
|
2014-05-18 01:33:22 +02:00
|
|
|
core/Translator.cpp
|
2010-08-07 15:10:44 +02:00
|
|
|
core/Uuid.cpp
|
2017-09-24 16:00:12 -06:00
|
|
|
core/Base32.h
|
|
|
|
core/Base32.cpp
|
2017-10-21 22:38:24 +02:00
|
|
|
cli/Utils.cpp
|
|
|
|
cli/Utils.h
|
2010-09-11 19:49:30 +02:00
|
|
|
crypto/Crypto.cpp
|
|
|
|
crypto/CryptoHash.cpp
|
|
|
|
crypto/Random.cpp
|
|
|
|
crypto/SymmetricCipher.cpp
|
2010-11-21 16:19:27 +01:00
|
|
|
crypto/SymmetricCipherBackend.h
|
|
|
|
crypto/SymmetricCipherGcrypt.cpp
|
2015-07-14 22:14:34 +02:00
|
|
|
format/CsvExporter.cpp
|
2012-05-08 22:03:59 +02:00
|
|
|
format/KeePass1.h
|
|
|
|
format/KeePass1Reader.cpp
|
2010-10-08 16:36:40 +02:00
|
|
|
format/KeePass2.h
|
2011-07-07 00:08:37 +02:00
|
|
|
format/KeePass2RandomStream.cpp
|
2010-09-13 23:24:36 +02:00
|
|
|
format/KeePass2Reader.cpp
|
2016-01-28 23:07:04 +01:00
|
|
|
format/KeePass2Repair.cpp
|
2010-09-25 12:41:00 +02:00
|
|
|
format/KeePass2Writer.cpp
|
2010-08-31 14:39:35 +02:00
|
|
|
format/KeePass2XmlReader.cpp
|
|
|
|
format/KeePass2XmlWriter.cpp
|
2012-05-02 15:37:21 +02:00
|
|
|
gui/AboutDialog.cpp
|
2012-05-18 00:35:24 +02:00
|
|
|
gui/Application.cpp
|
2017-02-22 01:05:24 +01:00
|
|
|
gui/CategoryListWidget.cpp
|
2012-01-13 17:52:37 +01:00
|
|
|
gui/ChangeMasterKeyWidget.cpp
|
2012-05-26 16:20:32 +02:00
|
|
|
gui/Clipboard.cpp
|
2017-02-27 20:25:56 -05:00
|
|
|
gui/CloneDialog.cpp
|
2012-06-28 09:21:15 +02:00
|
|
|
gui/DatabaseOpenWidget.cpp
|
2016-01-28 23:07:04 +01:00
|
|
|
gui/DatabaseRepairWidget.cpp
|
2012-04-19 16:20:20 +02:00
|
|
|
gui/DatabaseSettingsWidget.cpp
|
2011-12-30 18:43:24 +01:00
|
|
|
gui/DatabaseTabWidget.cpp
|
2010-08-24 22:26:52 +02:00
|
|
|
gui/DatabaseWidget.cpp
|
2014-05-17 11:16:27 +02:00
|
|
|
gui/DatabaseWidgetStateSync.cpp
|
2017-08-17 21:02:21 +02:00
|
|
|
gui/DetailsWidget.cpp
|
2012-04-24 11:09:40 +02:00
|
|
|
gui/DialogyWidget.cpp
|
2012-05-16 09:54:21 +02:00
|
|
|
gui/DragTabBar.cpp
|
2012-05-14 18:18:31 +02:00
|
|
|
gui/EditWidget.cpp
|
2012-05-15 13:02:05 +02:00
|
|
|
gui/EditWidgetIcons.cpp
|
2012-10-29 22:41:37 +01:00
|
|
|
gui/EditWidgetProperties.cpp
|
2011-12-26 01:21:29 +01:00
|
|
|
gui/FileDialog.cpp
|
2012-05-09 10:46:22 +02:00
|
|
|
gui/IconModels.cpp
|
2012-06-28 09:21:15 +02:00
|
|
|
gui/KeePass1OpenWidget.cpp
|
2017-02-10 02:11:43 +01:00
|
|
|
gui/KMessageWidget.cpp
|
2012-05-20 20:14:15 +02:00
|
|
|
gui/LineEdit.cpp
|
2010-09-19 16:59:32 +02:00
|
|
|
gui/MainWindow.cpp
|
2013-10-08 22:09:20 +02:00
|
|
|
gui/MessageBox.cpp
|
2015-01-19 20:16:21 +00:00
|
|
|
gui/MessageWidget.cpp
|
2014-01-12 16:57:01 +01:00
|
|
|
gui/PasswordEdit.cpp
|
2013-03-10 22:23:10 +01:00
|
|
|
gui/PasswordGeneratorWidget.cpp
|
2012-05-27 11:09:52 +02:00
|
|
|
gui/SettingsWidget.cpp
|
2016-11-02 21:01:02 -04:00
|
|
|
gui/SearchWidget.cpp
|
2012-07-22 21:56:31 +02:00
|
|
|
gui/SortFilterHideProxyModel.cpp
|
2017-04-13 07:05:36 -03:00
|
|
|
gui/SetupTotpDialog.cpp
|
|
|
|
gui/TotpDialog.cpp
|
2012-10-12 12:12:00 +02:00
|
|
|
gui/UnlockDatabaseWidget.cpp
|
2016-11-11 22:26:07 +01:00
|
|
|
gui/UnlockDatabaseDialog.cpp
|
2012-05-27 20:06:03 +02:00
|
|
|
gui/WelcomeWidget.cpp
|
2017-01-09 01:33:21 +01:00
|
|
|
gui/csvImport/CsvImportWidget.cpp
|
|
|
|
gui/csvImport/CsvImportWizard.cpp
|
|
|
|
gui/csvImport/CsvParserModel.cpp
|
2012-07-16 17:39:20 +02:00
|
|
|
gui/entry/AutoTypeAssociationsModel.cpp
|
2012-05-16 10:16:32 +02:00
|
|
|
gui/entry/EditEntryWidget.cpp
|
2013-10-03 16:26:01 +02:00
|
|
|
gui/entry/EditEntryWidget_p.h
|
2012-05-16 10:16:32 +02:00
|
|
|
gui/entry/EntryAttachmentsModel.cpp
|
|
|
|
gui/entry/EntryAttributesModel.cpp
|
2012-05-15 20:12:05 +02:00
|
|
|
gui/entry/EntryHistoryModel.cpp
|
2012-05-16 10:16:32 +02:00
|
|
|
gui/entry/EntryModel.cpp
|
|
|
|
gui/entry/EntryView.cpp
|
|
|
|
gui/group/EditGroupWidget.cpp
|
|
|
|
gui/group/GroupModel.cpp
|
|
|
|
gui/group/GroupView.cpp
|
2010-09-13 23:24:36 +02:00
|
|
|
keys/CompositeKey.cpp
|
2013-10-03 16:26:01 +02:00
|
|
|
keys/CompositeKey_p.h
|
2014-05-26 00:41:54 -07:00
|
|
|
keys/drivers/YubiKey.h
|
2011-12-21 23:22:07 +01:00
|
|
|
keys/FileKey.cpp
|
2010-10-08 16:36:40 +02:00
|
|
|
keys/Key.h
|
2010-09-13 23:24:36 +02:00
|
|
|
keys/PasswordKey.cpp
|
2014-05-26 02:06:26 -07:00
|
|
|
keys/YkChallengeResponseKey.cpp
|
2010-09-13 23:24:36 +02:00
|
|
|
streams/HashedBlockStream.cpp
|
|
|
|
streams/LayeredStream.cpp
|
2010-09-23 22:27:59 +02:00
|
|
|
streams/qtiocompressor.cpp
|
2012-09-25 22:33:36 +02:00
|
|
|
streams/StoreDataStream.cpp
|
2010-09-13 23:24:36 +02:00
|
|
|
streams/SymmetricCipherStream.cpp
|
2017-04-13 07:05:36 -03:00
|
|
|
totp/totp.h
|
|
|
|
totp/totp.cpp
|
2010-08-07 15:10:44 +02:00
|
|
|
)
|
2016-12-24 01:04:43 +01:00
|
|
|
if(APPLE)
|
|
|
|
set(keepassx_SOURCES ${keepassx_SOURCES}
|
|
|
|
core/ScreenLockListenerMac.h
|
|
|
|
core/ScreenLockListenerMac.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
set(keepassx_SOURCES ${keepassx_SOURCES}
|
|
|
|
core/ScreenLockListenerDBus.h
|
|
|
|
core/ScreenLockListenerDBus.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
if(MINGW)
|
|
|
|
set(keepassx_SOURCES ${keepassx_SOURCES}
|
|
|
|
core/ScreenLockListenerWin.h
|
|
|
|
core/ScreenLockListenerWin.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2010-08-07 15:10:44 +02:00
|
|
|
|
2012-10-23 14:52:59 +02:00
|
|
|
set(keepassx_SOURCES_MAINEXE
|
|
|
|
main.cpp
|
|
|
|
)
|
|
|
|
|
2017-02-25 17:11:02 +01:00
|
|
|
add_feature_info(AutoType WITH_XC_AUTOTYPE "Automatic password typing")
|
|
|
|
add_feature_info(KeePassHTTP WITH_XC_HTTP "Browser integration compatible with ChromeIPass and PassIFox")
|
|
|
|
add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response")
|
2016-12-04 19:57:24 +01:00
|
|
|
|
2017-02-16 00:44:20 +01:00
|
|
|
add_subdirectory(http)
|
2016-12-04 19:57:24 +01:00
|
|
|
if(WITH_XC_HTTP)
|
2017-03-02 18:44:01 -05:00
|
|
|
set(keepasshttp_LIB keepasshttp qhttp Qt5::Network)
|
2016-12-04 19:57:24 +01:00
|
|
|
endif()
|
|
|
|
|
2016-12-27 22:24:22 -05:00
|
|
|
add_subdirectory(autotype)
|
2017-01-30 19:18:35 -05:00
|
|
|
add_subdirectory(cli)
|
2016-12-27 22:24:22 -05:00
|
|
|
|
2016-12-13 21:14:39 +01:00
|
|
|
set(autotype_SOURCES
|
|
|
|
core/Tools.cpp
|
|
|
|
autotype/AutoType.cpp
|
|
|
|
autotype/AutoTypeAction.cpp
|
|
|
|
autotype/AutoTypePlatformPlugin.h
|
|
|
|
autotype/AutoTypeSelectDialog.cpp
|
|
|
|
autotype/AutoTypeSelectView.cpp
|
|
|
|
autotype/ShortcutWidget.cpp
|
|
|
|
autotype/WildcardMatcher.cpp
|
|
|
|
autotype/WindowSelectComboBox.cpp
|
|
|
|
autotype/test/AutoTypeTestInterface.h
|
|
|
|
)
|
|
|
|
|
2012-10-23 14:52:59 +02:00
|
|
|
if(MINGW)
|
|
|
|
set(keepassx_SOURCES_MAINEXE
|
|
|
|
${keepassx_SOURCES_MAINEXE}
|
|
|
|
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
|
|
|
endif()
|
|
|
|
|
2017-02-21 01:06:32 +01:00
|
|
|
if(WITH_XC_YUBIKEY)
|
2017-05-06 11:50:05 -04:00
|
|
|
list(APPEND keepassx_SOURCES keys/drivers/YubiKey.cpp)
|
2014-05-26 00:41:54 -07:00
|
|
|
else()
|
2017-05-06 11:50:05 -04:00
|
|
|
list(APPEND keepassx_SOURCES keys/drivers/YubiKeyStub.cpp)
|
2014-05-26 00:41:54 -07:00
|
|
|
endif()
|
|
|
|
|
2016-12-13 21:14:39 +01:00
|
|
|
add_library(autotype STATIC ${autotype_SOURCES})
|
|
|
|
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
|
|
|
|
|
2016-12-27 22:24:22 -05:00
|
|
|
set(autotype_LIB autotype)
|
|
|
|
|
2012-05-21 23:37:29 +02:00
|
|
|
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
2010-08-07 15:10:44 +02:00
|
|
|
|
2017-02-16 00:44:20 +01:00
|
|
|
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
|
|
|
target_link_libraries(keepassx_core
|
|
|
|
${keepasshttp_LIB}
|
|
|
|
${autotype_LIB}
|
2017-03-06 13:51:52 +01:00
|
|
|
${YUBIKEY_LIBRARIES}
|
2017-06-28 15:18:24 +02:00
|
|
|
${ZXCVBN_LIBRARIES}
|
2015-07-22 16:59:38 +02:00
|
|
|
Qt5::Core
|
2016-07-25 06:41:13 +02:00
|
|
|
Qt5::Network
|
2015-07-22 17:22:31 +02:00
|
|
|
Qt5::Concurrent
|
2015-07-22 16:59:38 +02:00
|
|
|
Qt5::Widgets
|
2012-05-21 23:37:29 +02:00
|
|
|
${GCRYPT_LIBRARIES}
|
2017-01-26 01:15:12 +01:00
|
|
|
${GPGERROR_LIBRARIES}
|
2012-05-21 23:37:29 +02:00
|
|
|
${ZLIB_LIBRARIES})
|
2017-05-04 22:52:10 +02:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
target_link_libraries(keepassx_core "-framework Foundation")
|
2017-10-15 16:27:07 -06:00
|
|
|
if(Qt5MacExtras_FOUND)
|
|
|
|
target_link_libraries(keepassx_core Qt5::MacExtras)
|
|
|
|
endif()
|
2017-05-04 22:52:10 +02:00
|
|
|
endif()
|
2017-02-16 00:44:20 +01:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(keepassx_core Qt5::DBus)
|
|
|
|
endif()
|
2017-05-04 22:52:10 +02:00
|
|
|
if(MINGW)
|
|
|
|
target_link_libraries(keepassx_core Wtsapi32.lib)
|
|
|
|
endif()
|
2012-05-21 20:24:06 +02:00
|
|
|
|
2017-02-19 22:23:04 +01:00
|
|
|
if(MINGW)
|
|
|
|
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()
|
|
|
|
|
2017-05-06 01:49:52 +08:00
|
|
|
add_executable(${PROGNAME} WIN32 ${keepassx_SOURCES_MAINEXE} ${WIN32_ProductVersionFiles})
|
2017-02-16 00:44:20 +01:00
|
|
|
target_link_libraries(${PROGNAME} keepassx_core)
|
2012-05-21 20:24:06 +02:00
|
|
|
|
2013-03-29 16:27:02 +01:00
|
|
|
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
|
|
|
|
2017-05-06 01:49:52 +08:00
|
|
|
if(APPLE AND WITH_APP_BUNDLE)
|
2012-05-21 20:24:06 +02:00
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
|
|
|
set_target_properties(${PROGNAME} PROPERTIES
|
2017-05-06 01:49:52 +08:00
|
|
|
MACOSX_BUNDLE ON
|
2012-05-21 20:24:06 +02:00
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
|
|
|
|
|
|
|
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
|
|
|
|
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"
|
|
|
|
DESTINATION "${DATA_INSTALL_DIR}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CPACK_GENERATOR "DragNDrop")
|
|
|
|
set(CPACK_DMG_FORMAT "UDBZ")
|
|
|
|
set(CPACK_DMG_VOLUME_NAME "${PROGNAME}")
|
|
|
|
set(CPACK_SYSTEM_NAME "OSX")
|
2012-10-27 10:24:01 +02:00
|
|
|
set(CPACK_STRIP_FILES ON)
|
2017-05-06 11:50:05 -04:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
|
2012-10-22 20:40:03 +02:00
|
|
|
include(CPack)
|
2012-05-21 20:24:06 +02:00
|
|
|
|
2016-11-08 22:13:57 +01:00
|
|
|
add_custom_command(TARGET ${PROGNAME}
|
|
|
|
POST_BUILD
|
2017-10-15 16:27:07 -06:00
|
|
|
COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app
|
2016-11-08 22:13:57 +01:00
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
|
|
|
COMMENT "Deploying app bundle")
|
2012-05-21 20:24:06 +02:00
|
|
|
endif()
|
2012-10-22 20:40:03 +02:00
|
|
|
|
2017-10-15 16:27:07 -06:00
|
|
|
install(TARGETS ${PROGNAME}
|
|
|
|
BUNDLE DESTINATION . COMPONENT Runtime
|
|
|
|
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
|
|
|
|
|
2016-11-08 22:13:57 +01:00
|
|
|
if(MINGW)
|
2017-06-25 17:15:20 -04:00
|
|
|
if(${CMAKE_SIZEOF_VOID_P} EQUAL "8")
|
|
|
|
set(OUTPUT_FILE_POSTFIX "Win64")
|
|
|
|
else()
|
|
|
|
set(OUTPUT_FILE_POSTFIX "Win32")
|
|
|
|
endif()
|
|
|
|
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_GENERATOR "ZIP;NSIS")
|
2012-10-22 20:40:03 +02:00
|
|
|
set(CPACK_STRIP_FILES ON)
|
2017-01-26 20:08:53 +01:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
|
|
|
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION})
|
|
|
|
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
2017-01-27 20:42:27 +01:00
|
|
|
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.GPL-2")
|
2017-06-25 17:15:20 -04:00
|
|
|
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
|
2017-01-27 20:42:27 +01:00
|
|
|
set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")
|
|
|
|
set(CPACK_NSIS_INSTALLED_ICON_NAME "\\\\${PROGNAME}.exe")
|
|
|
|
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}/share/windows/installer-wizard.bmp")
|
|
|
|
set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP}")
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROGNAME}.lnk' '$INSTDIR\\\\${PROGNAME}.exe'")
|
|
|
|
set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\$START_MENU\\\\${PROGNAME}.lnk'")
|
|
|
|
set(CPACK_NSIS_URL_INFO_ABOUT "https://keepassxc.org")
|
2017-06-25 17:15:20 -04:00
|
|
|
set(CPACK_NSIS_DISPLAY_NAME ${PROGNAME})
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}")
|
|
|
|
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe")
|
2012-10-22 20:40:03 +02:00
|
|
|
include(CPack)
|
|
|
|
|
2016-11-08 22:13:57 +01:00
|
|
|
install(CODE "
|
|
|
|
set(gp_tool \"objdump\")
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
|
2012-10-22 20:40:03 +02:00
|
|
|
include(DeployQt4)
|
2017-01-26 20:08:53 +01:00
|
|
|
install_qt4_executable(${PROGNAME}.exe)
|
|
|
|
add_custom_command(TARGET ${PROGNAME} POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${Qt5Core_DIR}/../../../share/qt5/plugins/platforms/qwindows$<$<CONFIG:Debug>:d>.dll
|
|
|
|
$<TARGET_FILE_DIR:${PROGNAME}>)
|
|
|
|
install(FILES $<TARGET_FILE_DIR:${PROGNAME}>/qwindows$<$<CONFIG:Debug>:d>.dll DESTINATION "platforms")
|
2012-10-22 20:40:03 +02:00
|
|
|
endif()
|