mirai/CMakeLists.txt
2024-04-19 18:32:35 +02:00

78 lines
1.9 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(Mirai VERSION 1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
find_package(Qt6 6.6 REQUIRED COMPONENTS Quick)
include_directories(src)
include_directories(libs)
qt_standard_project_setup(REQUIRES 6.6)
add_library(mirai-core
src/core/Mirai.h src/core/Mirai.cpp
src/core/TaskItem.h src/core/TaskItem.cpp
src/core/TasksFile.h src/core/TasksFile.cpp
src/core/TasksView.h src/core/TasksView.cpp
src/core/TodoMd.h src/core/TodoMd.cpp
src/core/utils.h src/core/utils.cpp
)
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
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
src/qml/AppComboBox.qml
src/qml/TaskItem.qml
src/qml/forms/TaskForm.qml
src/qml/forms/FilesForm.qml
src/qml/components/TabSelector.qml
src/qml/components/Tag.qml
src/qml/components/Calendar.qml
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
src/TasksFile.h src/TasksFile.cpp
RESOURCES
src/images/calendar.png
src/images/add.png
)
target_link_libraries(mirai PRIVATE Qt6::Quick)
target_link_libraries(mirai PRIVATE mirai-core)
# Tests
add_subdirectory(libs/Catch2)
add_executable(tests tests/test.cpp)
target_link_libraries(tests PRIVATE mirai-core)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)