Apply cmake-format
This commit is contained in:
parent
481cc92d28
commit
37f9a65c97
108
CMakeLists.txt
108
CMakeLists.txt
|
@ -18,27 +18,11 @@ set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_
|
||||||
set(PNG_ICON_NO_CROP ON)
|
set(PNG_ICON_NO_CROP ON)
|
||||||
|
|
||||||
# add project files
|
# add project files
|
||||||
set(HEADER_FILES
|
set(HEADER_FILES cli/cli.h model/entryfiltermodel.h model/entrymodel.h model/fieldmodel.h)
|
||||||
cli/cli.h
|
set(SRC_FILES cli/cli.cpp main.cpp)
|
||||||
model/entryfiltermodel.h
|
|
||||||
model/entrymodel.h
|
|
||||||
model/fieldmodel.h
|
|
||||||
)
|
|
||||||
set(SRC_FILES
|
|
||||||
cli/cli.cpp
|
|
||||||
main.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(GUI_HEADER_FILES
|
set(GUI_HEADER_FILES model/entryfiltermodel.cpp model/entrymodel.cpp model/fieldmodel.cpp)
|
||||||
model/entryfiltermodel.cpp
|
set(GUI_SRC_FILES model/entryfiltermodel.cpp model/entrymodel.cpp model/fieldmodel.cpp)
|
||||||
model/entrymodel.cpp
|
|
||||||
model/fieldmodel.cpp
|
|
||||||
)
|
|
||||||
set(GUI_SRC_FILES
|
|
||||||
model/entryfiltermodel.cpp
|
|
||||||
model/entrymodel.cpp
|
|
||||||
model/fieldmodel.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(WIDGETS_HEADER_FILES
|
set(WIDGETS_HEADER_FILES
|
||||||
gui/fielddelegate.h
|
gui/fielddelegate.h
|
||||||
|
@ -46,8 +30,7 @@ set(WIDGETS_HEADER_FILES
|
||||||
gui/mainwindow.h
|
gui/mainwindow.h
|
||||||
gui/passwordgeneratordialog.h
|
gui/passwordgeneratordialog.h
|
||||||
gui/stacksupport.h
|
gui/stacksupport.h
|
||||||
gui/undocommands.h
|
gui/undocommands.h)
|
||||||
)
|
|
||||||
set(WIDGETS_SRC_FILES
|
set(WIDGETS_SRC_FILES
|
||||||
gui/fielddelegate.cpp
|
gui/fielddelegate.cpp
|
||||||
gui/initiatequi.cpp
|
gui/initiatequi.cpp
|
||||||
|
@ -55,44 +38,21 @@ set(WIDGETS_SRC_FILES
|
||||||
gui/passwordgeneratordialog.cpp
|
gui/passwordgeneratordialog.cpp
|
||||||
gui/stacksupport.cpp
|
gui/stacksupport.cpp
|
||||||
gui/undocommands.cpp
|
gui/undocommands.cpp
|
||||||
resources/icons.qrc
|
resources/icons.qrc)
|
||||||
)
|
set(WIDGETS_UI_FILES gui/mainwindow.ui gui/passwordgeneratordialog.ui)
|
||||||
set(WIDGETS_UI_FILES
|
|
||||||
gui/mainwindow.ui
|
|
||||||
gui/passwordgeneratordialog.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
set(QML_HEADER_FILES
|
set(QML_HEADER_FILES quickgui/controller.h quickgui/initiatequick.h)
|
||||||
quickgui/controller.h
|
set(QML_SRC_FILES quickgui/controller.cpp quickgui/initiatequick.cpp resources/icons.qrc resources/qml.qrc)
|
||||||
quickgui/initiatequick.h
|
if (ANDROID)
|
||||||
)
|
list(APPEND QML_HEADER_FILES quickgui/android.h)
|
||||||
set(QML_SRC_FILES
|
list(APPEND QML_SRC_FILES quickgui/android.cpp)
|
||||||
quickgui/controller.cpp
|
endif ()
|
||||||
quickgui/initiatequick.cpp
|
|
||||||
resources/icons.qrc
|
|
||||||
resources/qml.qrc
|
|
||||||
)
|
|
||||||
if(ANDROID)
|
|
||||||
list(APPEND QML_HEADER_FILES
|
|
||||||
quickgui/android.h
|
|
||||||
)
|
|
||||||
list(APPEND QML_SRC_FILES
|
|
||||||
quickgui/android.cpp
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(TS_FILES
|
set(TS_FILES translations/${META_PROJECT_NAME}_de_DE.ts translations/${META_PROJECT_NAME}_en_US.ts)
|
||||||
translations/${META_PROJECT_NAME}_de_DE.ts
|
|
||||||
translations/${META_PROJECT_NAME}_en_US.ts
|
|
||||||
)
|
|
||||||
|
|
||||||
set(ICON_FILES
|
set(ICON_FILES resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg)
|
||||||
resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
|
||||||
)
|
|
||||||
|
|
||||||
set(DOC_FILES
|
set(DOC_FILES README.md)
|
||||||
README.md
|
|
||||||
)
|
|
||||||
|
|
||||||
set(REQUIRED_ICONS
|
set(REQUIRED_ICONS
|
||||||
application-exit
|
application-exit
|
||||||
|
@ -151,8 +111,7 @@ set(REQUIRED_ICONS
|
||||||
system-run
|
system-run
|
||||||
system-search
|
system-search
|
||||||
username-copy
|
username-copy
|
||||||
window-close
|
window-close)
|
||||||
)
|
|
||||||
|
|
||||||
# find c++utilities
|
# find c++utilities
|
||||||
find_package(c++utilities 4.10.0 REQUIRED)
|
find_package(c++utilities 4.10.0 REQUIRED)
|
||||||
|
@ -170,38 +129,33 @@ find_package(passwordfile 4.0.0 REQUIRED)
|
||||||
use_password_file()
|
use_password_file()
|
||||||
|
|
||||||
# require at least Qt 5.8 for the Qt Quick GUI
|
# require at least Qt 5.8 for the Qt Quick GUI
|
||||||
if(QUICK_GUI)
|
if (QUICK_GUI)
|
||||||
set(META_QT5_VERSION 5.8)
|
set(META_QT5_VERSION 5.8)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
# allow to enable undo support from the widgets GUI in the quick GUI as well (so the quick GUI will depend on Qt Widgets as well)
|
# allow to enable undo support from the widgets GUI in the quick GUI as well (so the quick GUI will depend on Qt Widgets as
|
||||||
if(QUICK_GUI AND NOT WIDGETS_GUI)
|
# well)
|
||||||
|
if (QUICK_GUI AND NOT WIDGETS_GUI)
|
||||||
option(ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI "enables with undo/redo support for the Qt Quick GUI (requires Qt Widgets)" ON)
|
option(ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI "enables with undo/redo support for the Qt Quick GUI (requires Qt Widgets)" ON)
|
||||||
if(ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI)
|
if (ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI)
|
||||||
list(APPEND ADDITIONAL_QT_MODULES Widgets)
|
list(APPEND ADDITIONAL_QT_MODULES Widgets)
|
||||||
list(APPEND META_PUBLIC_COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI)
|
list(APPEND META_PUBLIC_COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI)
|
||||||
list(APPEND QML_HEADER_FILES
|
list(APPEND QML_HEADER_FILES gui/stacksupport.h gui/undocommands.h)
|
||||||
gui/stacksupport.h
|
list(APPEND QML_SRC_FILES gui/stacksupport.cpp gui/undocommands.cpp)
|
||||||
gui/undocommands.h
|
endif ()
|
||||||
)
|
endif ()
|
||||||
list(APPEND QML_SRC_FILES
|
|
||||||
gui/stacksupport.cpp
|
|
||||||
gui/undocommands.cpp
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# add further Qt/KF modules required by the Qt Quick GUI under Android
|
# add further Qt/KF modules required by the Qt Quick GUI under Android
|
||||||
if(ANDROID AND QUICK_GUI)
|
if (ANDROID AND QUICK_GUI)
|
||||||
list(APPEND ADDITIONAL_QT_MODULES AndroidExtras)
|
list(APPEND ADDITIONAL_QT_MODULES AndroidExtras)
|
||||||
list(APPEND ADDITIONAL_KF_MODULES Kirigami2)
|
list(APPEND ADDITIONAL_KF_MODULES Kirigami2)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
# apply further configuration
|
# apply further configuration
|
||||||
if(WIDGETS_GUI OR QUICK_GUI)
|
if (WIDGETS_GUI OR QUICK_GUI)
|
||||||
include(QtGuiConfig)
|
include(QtGuiConfig)
|
||||||
include(QtConfig)
|
include(QtConfig)
|
||||||
endif()
|
endif ()
|
||||||
include(WindowsResources)
|
include(WindowsResources)
|
||||||
include(AppTarget)
|
include(AppTarget)
|
||||||
include(AndroidApk)
|
include(AndroidApk)
|
||||||
|
|
Loading…
Reference in New Issue