diff --git a/CMakeLists.txt b/CMakeLists.txt index 8295e47..bad4015 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) -file(GLOB_RECURSE PROJECT_SOURCES "src/*.cpp" "src/*.cxx" "src/*.h" "src/*.hpp") +file(GLOB_RECURSE PROJECT_SOURCES "src/**.cpp" "src/**.cxx" "src/**.h" "src/**.hpp") list(APPEND PROJECT_SOURCES "main.cpp") if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) @@ -38,7 +38,26 @@ else() endif() endif() -target_link_libraries(CuteSchedule PRIVATE Qt${QT_VERSION_MAJOR}::Widgets) +# --- External projects include --- # +# Add yaml-cpp +include(ExternalProject) +set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external) +ExternalProject_Add(yaml-cpp + GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} +) + +include_directories(${EXTERNAL_INSTALL_LOCATION}/include) +link_directories(${EXTERNAL_INSTALL_LOCATION}/lib) + +add_dependencies(CuteSchedule yaml-cpp) + +# --- End external projects --- # + +target_link_libraries(CuteSchedule + PRIVATE + Qt${QT_VERSION_MAJOR}::Widgets +) set_target_properties(CuteSchedule PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com diff --git a/default/config.yml b/default/config.yml new file mode 100644 index 0000000..f303859 --- /dev/null +++ b/default/config.yml @@ -0,0 +1,5 @@ +version: '2' + +config: + title: 'CuteSchedule' + fullscreen_mode: true diff --git a/src/config/config.cpp b/src/config/config.cpp new file mode 100644 index 0000000..d748459 --- /dev/null +++ b/src/config/config.cpp @@ -0,0 +1,6 @@ +#include "config.h" + +Config::Config() +{ + +} diff --git a/src/config/config.h b/src/config/config.h new file mode 100644 index 0000000..def04db --- /dev/null +++ b/src/config/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include + +class Config +{ +public: + Config(); +}; + +#endif // CONFIG_H diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 4fe0cb4..724e5e2 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -18,18 +18,13 @@ background: white } - - - - - 0 - 0 - 800 - 22 - - + + + + + + -