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-12 16:33:20 -04:00
|
|
|
autotype/AutoType.cpp
|
|
|
|
autotype/AutoTypeAction.cpp
|
2013-03-29 18:36:07 -04:00
|
|
|
autotype/AutoTypePlatformPlugin.h
|
2012-07-21 16:17:48 -04:00
|
|
|
autotype/AutoTypeSelectDialog.cpp
|
|
|
|
autotype/AutoTypeSelectView.cpp
|
2012-07-12 16:33:20 -04:00
|
|
|
autotype/ShortcutWidget.cpp
|
2012-07-22 08:04:50 -04:00
|
|
|
autotype/WildcardMatcher.cpp
|
2012-07-20 06:08:09 -04:00
|
|
|
autotype/WindowSelectComboBox.cpp
|
2013-03-29 18:36:07 -04:00
|
|
|
autotype/test/AutoTypeTestInterface.h
|
2012-07-16 03:54:04 -04:00
|
|
|
core/AutoTypeAssociations.cpp
|
2011-12-25 13:17:40 -05:00
|
|
|
core/Config.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
|
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
|
2012-01-13 11:52:37 -05:00
|
|
|
gui/ChangeMasterKeyWidget.cpp
|
2012-05-26 10:20:32 -04:00
|
|
|
gui/Clipboard.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
|
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
|
2014-01-12 10:57:01 -05:00
|
|
|
gui/PasswordEdit.cpp
|
2013-03-10 17:23:10 -04:00
|
|
|
gui/PasswordGeneratorWidget.cpp
|
2014-01-12 17:33:36 -05:00
|
|
|
gui/PasswordComboBox.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
|
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
|
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
|
2013-04-11 17:19:00 -04:00
|
|
|
http/AccessControlDialog.cpp
|
|
|
|
http/EntryConfig.cpp
|
2014-03-22 18:07:43 -04:00
|
|
|
http/HttpPasswordGeneratorWidget.cpp
|
2013-04-17 13:19:07 -04:00
|
|
|
http/HttpSettings.cpp
|
|
|
|
http/OptionDialog.cpp
|
2013-04-11 14:03:00 -04:00
|
|
|
http/Protocol.cpp
|
|
|
|
http/Server.cpp
|
|
|
|
http/Service.cpp
|
2010-09-13 17:24:36 -04:00
|
|
|
keys/CompositeKey.cpp
|
2013-10-03 10:26:01 -04:00
|
|
|
keys/CompositeKey_p.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
|
|
|
|
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
|
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
|
2012-06-28 03:21:15 -04:00
|
|
|
gui/DatabaseOpenWidget.ui
|
2012-04-19 10:20:20 -04:00
|
|
|
gui/DatabaseSettingsWidget.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
|
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
|
2013-04-11 17:19:00 -04:00
|
|
|
http/AccessControlDialog.ui
|
2014-03-22 18:07:43 -04:00
|
|
|
http/HttpPasswordGeneratorWidget.ui
|
2013-04-17 13:19:07 -04:00
|
|
|
http/OptionDialog.ui
|
2010-09-19 10:59:32 -04:00
|
|
|
)
|
|
|
|
|
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()
|
|
|
|
|
2015-07-22 10:59:38 -04:00
|
|
|
qt5_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
2010-09-19 10:59:32 -04:00
|
|
|
|
2012-05-21 17:37:29 -04:00
|
|
|
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
2013-03-29 11:27:02 -04:00
|
|
|
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
2016-04-03 10:25:01 -04:00
|
|
|
target_link_libraries(keepassx_core Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
|
2010-08-07 09:10:44 -04:00
|
|
|
|
2012-10-23 08:52:59 -04:00
|
|
|
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
|
2012-05-21 17:37:29 -04:00
|
|
|
target_link_libraries(${PROGNAME}
|
|
|
|
keepassx_core
|
2016-02-28 10:52:02 -05:00
|
|
|
${MHD_LIBRARIES}
|
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
|
2016-04-03 10:25:01 -04:00
|
|
|
Qt5::Network
|
2012-05-21 17:37:29 -04:00
|
|
|
${GCRYPT_LIBRARIES}
|
|
|
|
${ZLIB_LIBRARIES})
|
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
|
|
|
|
2012-07-12 16:33:20 -04:00
|
|
|
add_subdirectory(autotype)
|
|
|
|
|
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)
|
2012-10-22 14:40:03 -04:00
|
|
|
set(CPACK_GENERATOR "ZIP")
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
install_qt4_executable(${PROGNAME}.exe "qjpeg;qgif;qico;qtaccessiblewidgets")
|
|
|
|
endif()
|