2010-08-07 09:10:44 -04:00
|
|
|
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
|
|
|
#
|
|
|
|
# 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 17:37:29 -04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
2010-08-13 12:08:06 -04:00
|
|
|
|
2012-05-21 17:37:29 -04:00
|
|
|
configure_file(config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h)
|
2010-08-13 12:08:06 -04:00
|
|
|
|
2015-07-18 03:05:26 -04: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()
|
|
|
|
|
|
|
|
configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
|
|
|
|
|
2010-08-07 09:10:44 -04:00
|
|
|
set(keepassx_SOURCES
|
2012-07-16 03:54:04 -04:00
|
|
|
core/AutoTypeAssociations.cpp
|
2011-12-25 13:17:40 -05:00
|
|
|
core/Config.cpp
|
2017-01-08 19:33:21 -05:00
|
|
|
core/CsvParser.cpp
|
2010-08-07 09:10:44 -04:00
|
|
|
core/Database.cpp
|
2010-09-19 15:22:24 -04:00
|
|
|
core/DatabaseIcons.cpp
|
2010-09-13 17:24:36 -04:00
|
|
|
core/Endian.cpp
|
2010-08-07 09:10:44 -04:00
|
|
|
core/Entry.cpp
|
2012-04-14 09:38:20 -04:00
|
|
|
core/EntryAttachments.cpp
|
|
|
|
core/EntryAttributes.cpp
|
2014-05-15 17:48:54 -04:00
|
|
|
core/EntrySearcher.cpp
|
2012-07-18 14:44:28 -04:00
|
|
|
core/FilePath.cpp
|
2013-03-29 18:36:07 -04:00
|
|
|
core/Global.h
|
2010-08-07 09:10:44 -04:00
|
|
|
core/Group.cpp
|
2014-01-07 15:56:58 -05:00
|
|
|
core/InactivityTimer.cpp
|
2012-07-12 16:26:41 -04:00
|
|
|
core/ListDeleter.h
|
2010-08-07 09:10:44 -04:00
|
|
|
core/Metadata.cpp
|
2013-03-12 16:54:05 -04:00
|
|
|
core/PasswordGenerator.cpp
|
2017-03-04 09:10:50 -05:00
|
|
|
core/PassphraseGenerator.cpp
|
2012-08-01 04:35:37 -04:00
|
|
|
core/SignalMultiplexer.cpp
|
2012-08-15 16:47:41 -04:00
|
|
|
core/TimeDelta.cpp
|
2010-08-07 09:10:44 -04:00
|
|
|
core/TimeInfo.cpp
|
2014-05-16 05:48:30 -04:00
|
|
|
core/ToDbExporter.cpp
|
2012-04-10 09:31:47 -04:00
|
|
|
core/Tools.cpp
|
2014-05-17 19:33:22 -04:00
|
|
|
core/Translator.cpp
|
2010-08-07 09:10:44 -04:00
|
|
|
core/Uuid.cpp
|
2010-09-11 13:49:30 -04:00
|
|
|
crypto/Crypto.cpp
|
|
|
|
crypto/CryptoHash.cpp
|
|
|
|
crypto/Random.cpp
|
|
|
|
crypto/SymmetricCipher.cpp
|
2010-11-21 10:19:27 -05:00
|
|
|
crypto/SymmetricCipherBackend.h
|
|
|
|
crypto/SymmetricCipherGcrypt.cpp
|
2015-07-14 16:14:34 -04:00
|
|
|
format/CsvExporter.cpp
|
2012-05-08 16:03:59 -04:00
|
|
|
format/KeePass1.h
|
|
|
|
format/KeePass1Reader.cpp
|
2010-10-08 10:36:40 -04:00
|
|
|
format/KeePass2.h
|
2011-07-06 18:08:37 -04:00
|
|
|
format/KeePass2RandomStream.cpp
|
2010-09-13 17:24:36 -04:00
|
|
|
format/KeePass2Reader.cpp
|
2016-01-28 17:07:04 -05:00
|
|
|
format/KeePass2Repair.cpp
|
2010-09-25 06:41:00 -04:00
|
|
|
format/KeePass2Writer.cpp
|
2010-08-31 08:39:35 -04:00
|
|
|
format/KeePass2XmlReader.cpp
|
|
|
|
format/KeePass2XmlWriter.cpp
|
2012-05-02 09:37:21 -04:00
|
|
|
gui/AboutDialog.cpp
|
2012-05-17 18:35:24 -04:00
|
|
|
gui/Application.cpp
|
2017-02-21 19:05:24 -05:00
|
|
|
gui/CategoryListWidget.cpp
|
2012-01-13 11:52:37 -05:00
|
|
|
gui/ChangeMasterKeyWidget.cpp
|
2012-05-26 10:20:32 -04:00
|
|
|
gui/Clipboard.cpp
|
2017-02-27 20:25:56 -05:00
|
|
|
gui/CloneDialog.cpp
|
2012-06-28 03:21:15 -04:00
|
|
|
gui/DatabaseOpenWidget.cpp
|
2016-01-28 17:07:04 -05:00
|
|
|
gui/DatabaseRepairWidget.cpp
|
2012-04-19 10:20:20 -04:00
|
|
|
gui/DatabaseSettingsWidget.cpp
|
2011-12-30 12:43:24 -05:00
|
|
|
gui/DatabaseTabWidget.cpp
|
2010-08-24 16:26:52 -04:00
|
|
|
gui/DatabaseWidget.cpp
|
2014-05-17 05:16:27 -04:00
|
|
|
gui/DatabaseWidgetStateSync.cpp
|
2012-04-24 05:09:40 -04:00
|
|
|
gui/DialogyWidget.cpp
|
2012-05-16 03:54:21 -04:00
|
|
|
gui/DragTabBar.cpp
|
2012-05-14 12:18:31 -04:00
|
|
|
gui/EditWidget.cpp
|
2012-05-15 07:02:05 -04:00
|
|
|
gui/EditWidgetIcons.cpp
|
2012-10-29 17:41:37 -04:00
|
|
|
gui/EditWidgetProperties.cpp
|
2011-12-25 19:21:29 -05:00
|
|
|
gui/FileDialog.cpp
|
2012-05-09 04:46:22 -04:00
|
|
|
gui/IconModels.cpp
|
2012-06-28 03:21:15 -04:00
|
|
|
gui/KeePass1OpenWidget.cpp
|
2017-02-09 20:11:43 -05:00
|
|
|
gui/KMessageWidget.cpp
|
2012-05-20 14:14:15 -04:00
|
|
|
gui/LineEdit.cpp
|
2010-09-19 10:59:32 -04:00
|
|
|
gui/MainWindow.cpp
|
2013-10-08 16:09:20 -04:00
|
|
|
gui/MessageBox.cpp
|
2015-01-19 15:16:21 -05:00
|
|
|
gui/MessageWidget.cpp
|
2014-01-12 10:57:01 -05:00
|
|
|
gui/PasswordEdit.cpp
|
2013-03-10 17:23:10 -04:00
|
|
|
gui/PasswordGeneratorWidget.cpp
|
2012-05-27 05:09:52 -04:00
|
|
|
gui/SettingsWidget.cpp
|
2016-11-02 21:01:02 -04:00
|
|
|
gui/SearchWidget.cpp
|
2012-07-22 15:56:31 -04:00
|
|
|
gui/SortFilterHideProxyModel.cpp
|
2017-04-13 06:05:36 -04:00
|
|
|
gui/SetupTotpDialog.cpp
|
|
|
|
gui/TotpDialog.cpp
|
2012-10-12 06:12:00 -04:00
|
|
|
gui/UnlockDatabaseWidget.cpp
|
2016-11-11 16:26:07 -05:00
|
|
|
gui/UnlockDatabaseDialog.cpp
|
2012-05-27 14:06:03 -04:00
|
|
|
gui/WelcomeWidget.cpp
|
2017-01-08 19:33:21 -05:00
|
|
|
gui/csvImport/CsvImportWidget.cpp
|
|
|
|
gui/csvImport/CsvImportWizard.cpp
|
|
|
|
gui/csvImport/CsvParserModel.cpp
|
2012-07-16 11:39:20 -04:00
|
|
|
gui/entry/AutoTypeAssociationsModel.cpp
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EditEntryWidget.cpp
|
2013-10-03 10:26:01 -04:00
|
|
|
gui/entry/EditEntryWidget_p.h
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EntryAttachmentsModel.cpp
|
|
|
|
gui/entry/EntryAttributesModel.cpp
|
2012-05-15 14:12:05 -04:00
|
|
|
gui/entry/EntryHistoryModel.cpp
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EntryModel.cpp
|
|
|
|
gui/entry/EntryView.cpp
|
|
|
|
gui/group/EditGroupWidget.cpp
|
|
|
|
gui/group/GroupModel.cpp
|
|
|
|
gui/group/GroupView.cpp
|
2010-09-13 17:24:36 -04:00
|
|
|
keys/CompositeKey.cpp
|
2013-10-03 10:26:01 -04:00
|
|
|
keys/CompositeKey_p.h
|
2014-05-26 03:41:54 -04:00
|
|
|
keys/drivers/YubiKey.h
|
2011-12-21 17:22:07 -05:00
|
|
|
keys/FileKey.cpp
|
2010-10-08 10:36:40 -04:00
|
|
|
keys/Key.h
|
2010-09-13 17:24:36 -04:00
|
|
|
keys/PasswordKey.cpp
|
2014-05-26 05:06:26 -04:00
|
|
|
keys/YkChallengeResponseKey.cpp
|
2010-09-13 17:24:36 -04:00
|
|
|
streams/HashedBlockStream.cpp
|
|
|
|
streams/LayeredStream.cpp
|
2010-09-23 16:27:59 -04:00
|
|
|
streams/qtiocompressor.cpp
|
2012-09-25 16:33:36 -04:00
|
|
|
streams/StoreDataStream.cpp
|
2010-09-13 17:24:36 -04:00
|
|
|
streams/SymmetricCipherStream.cpp
|
2017-05-03 19:54:19 -04:00
|
|
|
totp/base32.h
|
|
|
|
totp/base32.cpp
|
2017-04-13 06:05:36 -04:00
|
|
|
totp/totp.h
|
|
|
|
totp/totp.cpp
|
2010-08-07 09:10:44 -04:00
|
|
|
)
|
|
|
|
|
2012-10-23 08:52:59 -04:00
|
|
|
set(keepassx_SOURCES_MAINEXE
|
|
|
|
main.cpp
|
|
|
|
)
|
|
|
|
|
2010-09-19 10:59:32 -04:00
|
|
|
set(keepassx_FORMS
|
2012-05-02 09:37:21 -04:00
|
|
|
gui/AboutDialog.ui
|
2012-01-13 11:52:37 -05:00
|
|
|
gui/ChangeMasterKeyWidget.ui
|
2017-02-27 20:25:56 -05:00
|
|
|
gui/CloneDialog.ui
|
2017-01-08 19:33:21 -05:00
|
|
|
gui/csvImport/CsvImportWidget.ui
|
2012-06-28 03:21:15 -04:00
|
|
|
gui/DatabaseOpenWidget.ui
|
2012-04-19 10:20:20 -04:00
|
|
|
gui/DatabaseSettingsWidget.ui
|
2017-02-21 19:05:24 -05:00
|
|
|
gui/CategoryListWidget.ui
|
2012-05-14 12:18:31 -04:00
|
|
|
gui/EditWidget.ui
|
2012-05-15 06:31:49 -04:00
|
|
|
gui/EditWidgetIcons.ui
|
2012-10-29 14:26:24 -04:00
|
|
|
gui/EditWidgetProperties.ui
|
2010-09-19 10:59:32 -04:00
|
|
|
gui/MainWindow.ui
|
2013-03-10 17:23:10 -04:00
|
|
|
gui/PasswordGeneratorWidget.ui
|
2012-05-19 05:53:32 -04:00
|
|
|
gui/SearchWidget.ui
|
2012-05-27 18:09:54 -04:00
|
|
|
gui/SettingsWidgetGeneral.ui
|
2012-05-27 05:09:52 -04:00
|
|
|
gui/SettingsWidgetSecurity.ui
|
2017-04-13 06:05:36 -04:00
|
|
|
gui/SetupTotpDialog.ui
|
|
|
|
gui/TotpDialog.ui
|
2012-05-27 14:06:03 -04:00
|
|
|
gui/WelcomeWidget.ui
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EditEntryWidgetAdvanced.ui
|
2012-07-16 11:40:28 -04:00
|
|
|
gui/entry/EditEntryWidgetAutoType.ui
|
2012-05-15 14:12:05 -04:00
|
|
|
gui/entry/EditEntryWidgetHistory.ui
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EditEntryWidgetMain.ui
|
|
|
|
gui/group/EditGroupWidgetMain.ui
|
2010-09-19 10:59:32 -04:00
|
|
|
)
|
|
|
|
|
2017-02-25 11:11:02 -05: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 13:57:24 -05:00
|
|
|
|
2017-02-15 18:44:20 -05:00
|
|
|
add_subdirectory(http)
|
2016-12-04 13:57:24 -05:00
|
|
|
if(WITH_XC_HTTP)
|
2017-03-02 18:44:01 -05:00
|
|
|
set(keepasshttp_LIB keepasshttp qhttp Qt5::Network)
|
2016-12-04 13:57:24 -05: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 15:14:39 -05: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 08:52:59 -04:00
|
|
|
if(MINGW)
|
|
|
|
set(keepassx_SOURCES_MAINEXE
|
|
|
|
${keepassx_SOURCES_MAINEXE}
|
|
|
|
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
|
|
|
endif()
|
|
|
|
|
2017-02-20 19:06:32 -05:00
|
|
|
if(WITH_XC_YUBIKEY)
|
2014-05-26 03:41:54 -04:00
|
|
|
set(keepassx_SOURCES ${keepassx_SOURCES} keys/drivers/YubiKey.cpp)
|
|
|
|
else()
|
|
|
|
set(keepassx_SOURCES ${keepassx_SOURCES} keys/drivers/YubiKeyStub.cpp)
|
|
|
|
endif()
|
|
|
|
|
2015-07-22 10:59:38 -04:00
|
|
|
qt5_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
2010-09-19 10:59:32 -04:00
|
|
|
|
2016-11-23 21:59:24 -05:00
|
|
|
add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp)
|
|
|
|
target_link_libraries(zxcvbn)
|
|
|
|
|
2016-12-13 15:14:39 -05: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 17:37:29 -04:00
|
|
|
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
2010-08-07 09:10:44 -04:00
|
|
|
|
2017-02-15 18:44:20 -05:00
|
|
|
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
|
|
|
target_link_libraries(keepassx_core
|
|
|
|
${keepasshttp_LIB}
|
|
|
|
${autotype_LIB}
|
2017-03-06 07:51:52 -05:00
|
|
|
${YUBIKEY_LIBRARIES}
|
2016-11-23 21:59:24 -05:00
|
|
|
zxcvbn
|
2015-07-22 10:59:38 -04:00
|
|
|
Qt5::Core
|
2015-07-22 11:22:31 -04:00
|
|
|
Qt5::Concurrent
|
2015-07-22 10:59:38 -04:00
|
|
|
Qt5::Widgets
|
2012-05-21 17:37:29 -04:00
|
|
|
${GCRYPT_LIBRARIES}
|
2017-01-25 19:15:12 -05:00
|
|
|
${GPGERROR_LIBRARIES}
|
2012-05-21 17:37:29 -04:00
|
|
|
${ZLIB_LIBRARIES})
|
2017-02-15 18:44:20 -05:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(keepassx_core Qt5::DBus)
|
|
|
|
endif()
|
2012-05-21 14:24:06 -04:00
|
|
|
|
2017-02-19 16:23:04 -05:00
|
|
|
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})
|
2017-02-15 18:44:20 -05:00
|
|
|
target_link_libraries(${PROGNAME} keepassx_core)
|
2012-05-21 14:24:06 -04:00
|
|
|
|
2013-03-29 11:27:02 -04:00
|
|
|
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
|
|
|
|
2012-05-21 14:24:06 -04:00
|
|
|
if(APPLE)
|
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
|
|
|
set_target_properties(${PROGNAME} PROPERTIES
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
|
|
|
endif()
|
|
|
|
|
2012-01-08 14:29:13 -05:00
|
|
|
install(TARGETS ${PROGNAME}
|
2012-05-21 17:37:29 -04:00
|
|
|
BUNDLE DESTINATION . COMPONENT Runtime
|
|
|
|
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
|
2012-05-21 14:24:06 -04:00
|
|
|
|
2015-07-22 10:59:38 -04:00
|
|
|
if(APPLE)
|
2012-05-21 14:24:06 -04:00
|
|
|
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 04:24:01 -04:00
|
|
|
set(CPACK_STRIP_FILES ON)
|
2016-11-03 00:05:30 -04:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION_NUM}")
|
2012-10-22 14:40:03 -04:00
|
|
|
include(CPack)
|
2012-05-21 14:24:06 -04:00
|
|
|
|
2016-11-08 16:13:57 -05:00
|
|
|
if(NOT DEFINED QT_BINARY_DIR)
|
|
|
|
set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
|
|
|
|
endif()
|
|
|
|
add_custom_command(TARGET ${PROGNAME}
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
|
|
|
COMMENT "Deploying app bundle")
|
2012-05-21 14:24:06 -04:00
|
|
|
endif()
|
2012-10-22 14:40:03 -04:00
|
|
|
|
2016-11-08 16:13:57 -05:00
|
|
|
if(MINGW)
|
2017-01-26 14:08:53 -05:00
|
|
|
string(REPLACE "AMD" "Win" OUTPUT_FILE_POSTFIX "${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
2017-01-24 22:37:02 -05:00
|
|
|
set(CPACK_GENERATOR "ZIP;NSIS")
|
2012-10-22 14:40:03 -04:00
|
|
|
set(CPACK_STRIP_FILES ON)
|
2017-01-26 14:08:53 -05: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 14:42:27 -05: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")
|
|
|
|
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
|
2017-01-27 14:42:27 -05: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")
|
|
|
|
set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}")
|
|
|
|
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe")
|
2012-10-22 14:40:03 -04:00
|
|
|
include(CPack)
|
|
|
|
|
2016-11-08 16:13:57 -05:00
|
|
|
install(CODE "
|
|
|
|
set(gp_tool \"objdump\")
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
|
2012-10-22 14:40:03 -04:00
|
|
|
include(DeployQt4)
|
2017-01-26 14:08:53 -05: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 14:40:03 -04:00
|
|
|
endif()
|