2024-04-10 16:53:18 +02:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
|
|
|
|
project(Mirai VERSION 1.0 LANGUAGES CXX)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2024-04-13 11:47:52 +02:00
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
|
2024-04-10 16:53:18 +02:00
|
|
|
|
2024-05-05 15:58:56 +02:00
|
|
|
find_package(Qt6 6.7 REQUIRED COMPONENTS Quick)
|
2024-04-10 16:53:18 +02:00
|
|
|
|
|
|
|
include_directories(src)
|
2024-04-12 20:58:13 +02:00
|
|
|
include_directories(libs)
|
2024-04-10 16:53:18 +02:00
|
|
|
|
2024-05-05 15:58:56 +02:00
|
|
|
qt_standard_project_setup(REQUIRES 6.7)
|
2024-04-10 16:53:18 +02:00
|
|
|
|
2024-04-19 13:52:17 +02:00
|
|
|
add_library(mirai-core
|
|
|
|
src/core/Mirai.h src/core/Mirai.cpp
|
|
|
|
src/core/TaskItem.h src/core/TaskItem.cpp
|
2024-05-09 14:39:10 +02:00
|
|
|
src/core/BaseResource.h src/core/BaseResource.cpp
|
|
|
|
src/core/BaseFileResource.h
|
|
|
|
src/core/StdFileResource.h
|
2024-04-19 13:52:17 +02:00
|
|
|
src/core/TasksView.h src/core/TasksView.cpp
|
|
|
|
src/core/TodoMd.h src/core/TodoMd.cpp
|
|
|
|
src/core/utils.h src/core/utils.cpp
|
|
|
|
)
|
|
|
|
|
2024-04-10 16:53:18 +02:00
|
|
|
qt_add_executable(mirai
|
|
|
|
src/main.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set_source_files_properties(src/qml/styles/CatppuccinFrappe.qml PROPERTIES
|
|
|
|
QT_QML_SINGLETON_TYPE TRUE
|
|
|
|
)
|
|
|
|
|
|
|
|
set_source_files_properties(src/qml/styles/MiraiColorPalette.qml PROPERTIES
|
|
|
|
QT_QML_SINGLETON_TYPE TRUE
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_add_qml_module(mirai
|
|
|
|
URI Mirai
|
|
|
|
#RESOURCE_PREFIX /qt/qml
|
|
|
|
QML_FILES
|
|
|
|
src/qml/Main.qml
|
2024-05-04 17:38:23 +02:00
|
|
|
src/qml/MainPanel.qml
|
2024-04-10 16:53:18 +02:00
|
|
|
src/qml/SideMenu.qml
|
|
|
|
src/qml/DatePicker.qml
|
|
|
|
src/qml/DateField.qml
|
|
|
|
src/qml/AppIcon.qml
|
|
|
|
src/qml/AppLineEdit.qml
|
|
|
|
src/qml/AppButton.qml
|
|
|
|
src/qml/AppCheckbox.qml
|
|
|
|
src/qml/AppText.qml
|
2024-04-14 14:11:41 +02:00
|
|
|
src/qml/AppComboBox.qml
|
2024-04-10 16:53:18 +02:00
|
|
|
src/qml/TaskItem.qml
|
|
|
|
src/qml/forms/TaskForm.qml
|
2024-04-14 14:11:41 +02:00
|
|
|
src/qml/forms/FilesForm.qml
|
2024-04-22 14:34:24 +02:00
|
|
|
src/qml/forms/TagsConfigForm.qml
|
2024-04-10 16:53:18 +02:00
|
|
|
src/qml/components/TabSelector.qml
|
2024-04-11 13:29:40 +02:00
|
|
|
src/qml/components/Tag.qml
|
2024-04-19 18:32:35 +02:00
|
|
|
src/qml/components/Calendar.qml
|
2024-05-22 18:00:56 +02:00
|
|
|
src/qml/components/Modal.qml
|
2024-04-10 16:53:18 +02:00
|
|
|
src/qml/styles/MiraiColorPalette.qml
|
|
|
|
src/qml/styles/CatppuccinFrappe.qml
|
|
|
|
src/qml/views/ListView.qml
|
|
|
|
src/qml/views/CalendarView.qml
|
|
|
|
SOURCES
|
|
|
|
src/Backend.h src/Backend.cpp
|
|
|
|
src/TaskItem.h src/TaskItem.cpp
|
2024-04-22 14:34:24 +02:00
|
|
|
src/Tag.h src/Tag.cpp
|
2024-04-18 21:12:17 +02:00
|
|
|
src/TasksFile.h src/TasksFile.cpp
|
2024-05-20 11:28:01 +02:00
|
|
|
src/AndroidFileResource.h
|
2024-04-10 16:53:18 +02:00
|
|
|
RESOURCES
|
|
|
|
src/images/calendar.png
|
|
|
|
src/images/add.png
|
2024-04-22 14:34:24 +02:00
|
|
|
src/images/settings.png
|
2024-05-20 18:27:19 +02:00
|
|
|
src/images/visible.png
|
|
|
|
src/images/not-visible.png
|
2024-04-10 16:53:18 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(mirai PRIVATE Qt6::Quick)
|
2024-04-19 13:52:17 +02:00
|
|
|
target_link_libraries(mirai PRIVATE mirai-core)
|
|
|
|
|
|
|
|
# Tests
|
|
|
|
add_subdirectory(libs/Catch2)
|
2024-05-09 14:39:10 +02:00
|
|
|
add_executable(tests
|
|
|
|
tests/format.cpp
|
|
|
|
tests/saving.cpp
|
|
|
|
)
|
2024-04-19 13:52:17 +02:00
|
|
|
target_link_libraries(tests PRIVATE mirai-core)
|
|
|
|
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
|