2015-12-05 22:52:00 +01:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# meta data
|
|
|
|
set(META_PROJECT_NAME passwordmanager)
|
2017-04-27 22:16:26 +02:00
|
|
|
set(META_PROJECT_VARNAME password_manager)
|
2016-07-27 18:29:00 +02:00
|
|
|
set(META_PROJECT_TYPE application)
|
2015-12-05 22:52:00 +01:00
|
|
|
set(META_APP_NAME "Password Manager")
|
2016-11-08 19:37:26 +01:00
|
|
|
set(META_APP_CATEGORIES "Utility;Security;")
|
2015-12-05 22:52:00 +01:00
|
|
|
set(META_APP_AUTHOR "Martchus")
|
|
|
|
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
2016-07-27 18:29:00 +02:00
|
|
|
set(META_APP_DESCRIPTION "A simple password store using AES-256-CBC encryption via OpenSSL")
|
2018-06-16 13:23:13 +02:00
|
|
|
set(META_GUI_OPTIONAL YES)
|
|
|
|
set(META_USE_QQC2 ON)
|
2015-12-05 22:52:00 +01:00
|
|
|
set(META_VERSION_MAJOR 2)
|
2015-12-27 21:38:25 +01:00
|
|
|
set(META_VERSION_MINOR 1)
|
2018-01-26 15:53:26 +01:00
|
|
|
set(META_VERSION_PATCH 5)
|
2015-12-08 08:37:18 +01:00
|
|
|
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
2015-12-05 22:52:00 +01:00
|
|
|
|
2015-12-08 08:37:18 +01:00
|
|
|
# add project files
|
|
|
|
set(HEADER_FILES
|
|
|
|
cli/cli.h
|
|
|
|
model/entryfiltermodel.h
|
|
|
|
model/entrymodel.h
|
|
|
|
model/fieldmodel.h
|
|
|
|
)
|
|
|
|
set(SRC_FILES
|
|
|
|
cli/cli.cpp
|
|
|
|
main.cpp
|
2016-07-27 18:29:00 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(GUI_HEADER_FILES
|
|
|
|
model/entryfiltermodel.cpp
|
|
|
|
model/entrymodel.cpp
|
|
|
|
model/fieldmodel.cpp
|
|
|
|
)
|
|
|
|
set(GUI_SRC_FILES
|
2015-12-08 08:37:18 +01:00
|
|
|
model/entryfiltermodel.cpp
|
|
|
|
model/entrymodel.cpp
|
|
|
|
model/fieldmodel.cpp
|
|
|
|
)
|
2016-04-16 00:51:52 +02:00
|
|
|
|
2015-12-08 08:37:18 +01:00
|
|
|
set(WIDGETS_HEADER_FILES
|
|
|
|
gui/fielddelegate.h
|
|
|
|
gui/initiategui.h
|
|
|
|
gui/mainwindow.h
|
|
|
|
gui/passwordgeneratordialog.h
|
|
|
|
gui/stacksupport.h
|
|
|
|
gui/undocommands.h
|
|
|
|
)
|
|
|
|
set(WIDGETS_SRC_FILES
|
|
|
|
gui/fielddelegate.cpp
|
|
|
|
gui/initiatequi.cpp
|
|
|
|
gui/mainwindow.cpp
|
|
|
|
gui/passwordgeneratordialog.cpp
|
|
|
|
gui/stacksupport.cpp
|
|
|
|
gui/undocommands.cpp
|
|
|
|
resources/icons.qrc
|
|
|
|
)
|
2016-01-25 19:05:04 +01:00
|
|
|
set(WIDGETS_UI_FILES
|
|
|
|
gui/mainwindow.ui
|
|
|
|
gui/passwordgeneratordialog.ui
|
|
|
|
)
|
2016-04-16 00:51:52 +02:00
|
|
|
|
|
|
|
set(QML_HEADER_FILES
|
2018-05-20 01:54:08 +02:00
|
|
|
quickgui/controller.h
|
2015-12-08 08:37:18 +01:00
|
|
|
quickgui/initiatequick.h
|
|
|
|
)
|
2016-04-16 00:51:52 +02:00
|
|
|
set(QML_SRC_FILES
|
2018-05-20 01:54:08 +02:00
|
|
|
quickgui/controller.cpp
|
2015-12-08 08:37:18 +01:00
|
|
|
quickgui/initiatequick.cpp
|
|
|
|
resources/icons.qrc
|
|
|
|
resources/qml.qrc
|
|
|
|
)
|
2018-09-04 00:52:43 +02:00
|
|
|
if(ANDROID)
|
|
|
|
list(APPEND QML_HEADER_FILES
|
|
|
|
quickgui/android.h
|
|
|
|
)
|
|
|
|
list(APPEND QML_SRC_FILES
|
|
|
|
quickgui/android.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2016-04-16 00:51:52 +02:00
|
|
|
|
2015-12-08 08:37:18 +01:00
|
|
|
set(TS_FILES
|
|
|
|
translations/${META_PROJECT_NAME}_de_DE.ts
|
|
|
|
translations/${META_PROJECT_NAME}_en_US.ts
|
|
|
|
)
|
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
set(ICON_FILES
|
|
|
|
resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
2015-12-05 22:52:00 +01:00
|
|
|
)
|
|
|
|
|
2016-06-14 00:49:29 +02:00
|
|
|
set(DOC_FILES
|
|
|
|
README.md
|
|
|
|
)
|
|
|
|
|
2016-07-16 23:13:06 +02:00
|
|
|
set(REQUIRED_ICONS
|
2018-08-31 22:29:01 +02:00
|
|
|
application-exit
|
|
|
|
applications-internet
|
2017-04-23 13:02:36 +02:00
|
|
|
dialog-cancel
|
2016-07-16 23:13:06 +02:00
|
|
|
dialog-ok
|
2017-04-23 13:02:36 +02:00
|
|
|
dialog-ok-apply
|
2016-07-16 23:13:06 +02:00
|
|
|
dialog-password
|
2018-08-31 22:29:01 +02:00
|
|
|
document-close
|
2018-09-09 00:57:02 +02:00
|
|
|
document-encrypt
|
2018-08-31 22:29:01 +02:00
|
|
|
document-export
|
2016-07-16 23:13:06 +02:00
|
|
|
document-new
|
2018-08-31 22:29:01 +02:00
|
|
|
document-open
|
|
|
|
document-open-recent
|
2016-07-16 23:13:06 +02:00
|
|
|
document-save
|
2018-08-31 22:29:01 +02:00
|
|
|
document-save-as
|
|
|
|
edit-clear
|
|
|
|
edit-copy
|
|
|
|
edit-cut
|
|
|
|
edit-delete
|
|
|
|
edit-paste
|
2016-07-16 23:13:06 +02:00
|
|
|
edit-redo
|
2018-08-31 22:29:01 +02:00
|
|
|
edit-rename
|
|
|
|
edit-undo
|
|
|
|
flag-black
|
|
|
|
flag-blue
|
|
|
|
folder
|
2018-09-09 00:57:02 +02:00
|
|
|
folder-add
|
2018-08-31 22:29:01 +02:00
|
|
|
folder-symbolic
|
2016-07-16 23:13:06 +02:00
|
|
|
go-next
|
2018-09-09 01:49:12 +02:00
|
|
|
handle-right
|
|
|
|
handle-sort
|
|
|
|
overflow-menu-right
|
|
|
|
overflow-menu-left
|
2018-08-31 22:29:01 +02:00
|
|
|
help-about
|
|
|
|
insert-text
|
|
|
|
list-add
|
|
|
|
list-remove
|
2016-08-16 00:37:17 +02:00
|
|
|
password-generate
|
2018-08-31 22:29:01 +02:00
|
|
|
password-show-off
|
|
|
|
password-show-on
|
2017-04-23 13:02:36 +02:00
|
|
|
preferences-desktop-icons
|
|
|
|
preferences-desktop-locale
|
2018-08-31 22:29:01 +02:00
|
|
|
qtcreator
|
|
|
|
story-editor
|
|
|
|
system-file-manager
|
|
|
|
system-run
|
2017-04-23 13:02:36 +02:00
|
|
|
system-search
|
2018-08-31 22:29:01 +02:00
|
|
|
window-close
|
2016-07-16 23:13:06 +02:00
|
|
|
)
|
2018-09-09 00:57:02 +02:00
|
|
|
set(REQUIRED_ICONS_FOR_KIRIGAMI
|
|
|
|
application-menu
|
|
|
|
arrow-down
|
|
|
|
dialog-close
|
|
|
|
document-decrypt
|
|
|
|
edit
|
|
|
|
folder-sync
|
|
|
|
go-next-symbolic
|
|
|
|
go-next-symbolic-rtl
|
|
|
|
go-previous-symbolic
|
|
|
|
go-previous-symbolic-rtl
|
|
|
|
go-up
|
|
|
|
handle-sort
|
|
|
|
overflow-menu
|
2018-09-09 01:49:12 +02:00
|
|
|
overflow-menu-right
|
|
|
|
overflow-menu-left
|
2018-09-09 00:57:02 +02:00
|
|
|
view-left-close
|
|
|
|
view-left-new
|
|
|
|
view-list-icons
|
|
|
|
view-right-close
|
|
|
|
view-right-new
|
|
|
|
window-close
|
|
|
|
window-close-symbolic
|
|
|
|
)
|
2016-07-16 23:13:06 +02:00
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
# find c++utilities
|
2017-09-29 17:16:44 +02:00
|
|
|
find_package(c++utilities 4.10.0 REQUIRED)
|
2016-04-16 00:51:52 +02:00
|
|
|
use_cpp_utilities()
|
2016-08-16 00:37:17 +02:00
|
|
|
include(BasicConfig)
|
2015-12-08 08:37:18 +01:00
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
# find qtutilities
|
2018-06-16 13:23:13 +02:00
|
|
|
if(QUICK_GUI)
|
|
|
|
find_package(qtutilities 5.11.0 REQUIRED)
|
|
|
|
use_qt_utilities()
|
|
|
|
elseif(WIDGETS_GUI)
|
2017-04-27 22:16:26 +02:00
|
|
|
find_package(qtutilities 5.7.0 REQUIRED)
|
2016-07-27 18:29:00 +02:00
|
|
|
use_qt_utilities()
|
|
|
|
endif()
|
2016-04-07 23:51:03 +02:00
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
# find passwordfile
|
2016-04-25 22:24:58 +02:00
|
|
|
find_package(passwordfile 3.1.0 REQUIRED)
|
2016-04-16 00:51:52 +02:00
|
|
|
use_password_file()
|
2015-12-05 22:52:00 +01:00
|
|
|
|
2018-09-09 00:57:02 +02:00
|
|
|
# require additional icons when using Kirigami
|
|
|
|
if(QUICK_QUI)
|
|
|
|
list(APPEND REQUIRED_ICONS ${REQUIRED_ICONS_FOR_KIRIGAMI})
|
|
|
|
list(REMOVE_DUPLICATES REQUIRED_ICONS)
|
|
|
|
endif()
|
|
|
|
|
2018-09-02 19:07:02 +02:00
|
|
|
# require Qt AndroidExtras
|
|
|
|
if(ANDROID AND QUICK_GUI)
|
|
|
|
list(APPEND ADDITIONAL_QT_MODULES AndroidExtras)
|
|
|
|
endif()
|
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
# include modules to apply configuration
|
2016-07-27 18:29:00 +02:00
|
|
|
if(WIDGETS_GUI OR QUICK_GUI)
|
|
|
|
include(QtGuiConfig)
|
|
|
|
include(QtConfig)
|
|
|
|
endif()
|
2018-06-16 13:23:13 +02:00
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
include(WindowsResources)
|
|
|
|
include(AppTarget)
|
2016-07-04 23:29:49 +02:00
|
|
|
include(ShellCompletion)
|
2016-07-27 21:40:34 +02:00
|
|
|
include(ConfigHeader)
|
2016-04-07 23:51:03 +02:00
|
|
|
|
2016-04-16 00:51:52 +02:00
|
|
|
# create desktop file using previously defined meta data
|
|
|
|
add_desktop_file()
|