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
|
|
|
|
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
|
2013-03-29 15:35:54 -04:00
|
|
|
core/ArgumentParser.cpp
|
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
|
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-07-06 08:34:18 -04:00
|
|
|
core/qsavefile.cpp
|
2013-10-03 10:26:01 -04:00
|
|
|
core/qsavefile_p.h
|
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
|
2012-04-10 09:31:47 -04:00
|
|
|
core/Tools.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
|
2010-11-21 10:19:27 -05:00
|
|
|
crypto/salsa20/ecrypt-config.h
|
|
|
|
crypto/salsa20/ecrypt-machine.h
|
|
|
|
crypto/salsa20/ecrypt-portable.h
|
|
|
|
crypto/salsa20/ecrypt-sync.h
|
|
|
|
crypto/salsa20/salsa20.c
|
2010-09-11 13:49:30 -04:00
|
|
|
crypto/SymmetricCipher.cpp
|
2010-11-21 10:19:27 -05:00
|
|
|
crypto/SymmetricCipherBackend.h
|
|
|
|
crypto/SymmetricCipherGcrypt.cpp
|
|
|
|
crypto/SymmetricCipherSalsa20.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
|
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
|
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
|
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
|
2013-03-10 17:23:10 -04:00
|
|
|
gui/PasswordGeneratorWidget.cpp
|
2012-05-27 05:09:52 -04:00
|
|
|
gui/SettingsWidget.cpp
|
2012-07-22 15:56:31 -04:00
|
|
|
gui/SortFilterHideProxyModel.cpp
|
2012-10-12 06:12:00 -04:00
|
|
|
gui/UnlockDatabaseWidget.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
|
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-11-21 17:06:30 -05:00
|
|
|
set(keepassx_MOC
|
2012-07-12 16:33:20 -04:00
|
|
|
autotype/AutoType.h
|
2012-07-21 16:17:48 -04:00
|
|
|
autotype/AutoTypeSelectDialog.h
|
|
|
|
autotype/AutoTypeSelectView.h
|
2012-07-12 16:33:20 -04:00
|
|
|
autotype/ShortcutWidget.h
|
2012-07-20 06:08:09 -04:00
|
|
|
autotype/WindowSelectComboBox.h
|
2012-07-16 03:54:04 -04:00
|
|
|
core/AutoTypeAssociations.h
|
2012-06-14 16:55:25 -04:00
|
|
|
core/Config.h
|
2010-11-21 17:06:30 -05:00
|
|
|
core/Database.h
|
|
|
|
core/Entry.h
|
2012-04-14 09:38:20 -04:00
|
|
|
core/EntryAttachments.h
|
|
|
|
core/EntryAttributes.h
|
2010-11-21 17:06:30 -05:00
|
|
|
core/Group.h
|
2014-01-07 15:56:58 -05:00
|
|
|
core/InactivityTimer.h
|
2010-11-21 17:06:30 -05:00
|
|
|
core/Metadata.h
|
2012-07-06 08:34:18 -04:00
|
|
|
core/qsavefile.h
|
2012-05-02 09:37:21 -04:00
|
|
|
gui/AboutDialog.h
|
2012-05-17 18:35:24 -04:00
|
|
|
gui/Application.h
|
2012-01-13 11:52:37 -05:00
|
|
|
gui/ChangeMasterKeyWidget.h
|
2012-05-26 10:20:32 -04:00
|
|
|
gui/Clipboard.h
|
2012-06-28 03:21:15 -04:00
|
|
|
gui/DatabaseOpenWidget.h
|
2012-04-19 10:20:20 -04:00
|
|
|
gui/DatabaseSettingsWidget.h
|
2011-12-30 12:43:24 -05:00
|
|
|
gui/DatabaseTabWidget.h
|
2010-11-21 17:06:30 -05:00
|
|
|
gui/DatabaseWidget.h
|
2012-04-24 05:09:40 -04:00
|
|
|
gui/DialogyWidget.h
|
2012-05-16 03:54:21 -04:00
|
|
|
gui/DragTabBar.h
|
2012-05-14 12:18:31 -04:00
|
|
|
gui/EditWidget.h
|
2012-05-15 07:02:05 -04:00
|
|
|
gui/EditWidgetIcons.h
|
2012-10-29 17:41:37 -04:00
|
|
|
gui/EditWidgetProperties.h
|
2012-05-09 04:46:22 -04:00
|
|
|
gui/IconModels.h
|
2012-06-28 03:21:15 -04:00
|
|
|
gui/KeePass1OpenWidget.h
|
2012-05-20 14:14:15 -04:00
|
|
|
gui/LineEdit.h
|
2010-11-21 17:06:30 -05:00
|
|
|
gui/MainWindow.h
|
2013-03-10 17:23:10 -04:00
|
|
|
gui/PasswordGeneratorWidget.h
|
2012-05-27 05:09:52 -04:00
|
|
|
gui/SettingsWidget.h
|
2012-07-22 15:56:31 -04:00
|
|
|
gui/SortFilterHideProxyModel.h
|
2012-10-12 06:12:00 -04:00
|
|
|
gui/UnlockDatabaseWidget.h
|
2012-05-27 14:06:03 -04:00
|
|
|
gui/WelcomeWidget.h
|
2012-07-16 11:39:20 -04:00
|
|
|
gui/entry/AutoTypeAssociationsModel.h
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EditEntryWidget.h
|
|
|
|
gui/entry/EntryAttachmentsModel.h
|
|
|
|
gui/entry/EntryAttributesModel.h
|
2012-05-15 14:12:05 -04:00
|
|
|
gui/entry/EntryHistoryModel.h
|
2012-05-16 04:16:32 -04:00
|
|
|
gui/entry/EntryModel.h
|
|
|
|
gui/entry/EntryView.h
|
|
|
|
gui/group/EditGroupWidget.h
|
|
|
|
gui/group/GroupModel.h
|
|
|
|
gui/group/GroupView.h
|
2012-05-07 08:38:10 -04:00
|
|
|
keys/CompositeKey_p.h
|
2010-11-21 17:06:30 -05:00
|
|
|
streams/HashedBlockStream.h
|
|
|
|
streams/LayeredStream.h
|
|
|
|
streams/qtiocompressor.h
|
2012-09-25 16:33:36 -04:00
|
|
|
streams/StoreDataStream.h
|
2010-11-21 17:06:30 -05:00
|
|
|
streams/SymmetricCipherStream.h
|
|
|
|
)
|
|
|
|
|
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
|
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()
|
|
|
|
|
2010-09-19 10:59:32 -04:00
|
|
|
qt4_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
2010-11-21 17:06:30 -05:00
|
|
|
qt4_wrap_cpp(keepassx_SOURCES ${keepassx_MOC})
|
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)
|
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
|
|
|
|
${QT_QTCORE_LIBRARY}
|
|
|
|
${QT_QTGUI_LIBRARY}
|
|
|
|
${GCRYPT_LIBRARIES}
|
|
|
|
${ZLIB_LIBRARIES})
|
2012-05-21 14:24:06 -04:00
|
|
|
|
2012-05-26 10:20:32 -04:00
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(${PROGNAME} ${QT_QTDBUS_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
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)
|
|
|
|
|
2012-10-27 04:52:54 -04:00
|
|
|
if(APPLE AND NOT (${CMAKE_VERSION} VERSION_LESS 2.8.8))
|
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)
|
2012-05-21 14:24:06 -04:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSX_VERSION_NUM}")
|
2012-10-22 14:40:03 -04:00
|
|
|
include(CPack)
|
2012-05-21 14:24:06 -04:00
|
|
|
|
|
|
|
include(DeployQt4)
|
2012-10-27 04:24:01 -04:00
|
|
|
install_qt4_executable(${PROGNAME}.app "qjpeg;qgif;qico;qtaccessiblewidgets")
|
2012-05-21 14:24:06 -04:00
|
|
|
endif()
|
2012-10-22 14:40:03 -04:00
|
|
|
|
2012-10-27 04:52:54 -04:00
|
|
|
if(MINGW AND NOT (${CMAKE_VERSION} VERSION_LESS 2.8.8))
|
2012-10-22 14:40:03 -04:00
|
|
|
set(CPACK_GENERATOR "ZIP")
|
|
|
|
set(CPACK_STRIP_FILES ON)
|
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSX_VERSION_NUM}")
|
|
|
|
include(CPack)
|
|
|
|
|
|
|
|
include(DeployQt4)
|
|
|
|
install_qt4_executable(${PROGNAME}.exe "qjpeg;qgif;qico;qtaccessiblewidgets")
|
|
|
|
endif()
|