diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d9cdf0..8295e47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,12 +12,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) -set(PROJECT_SOURCES - main.cpp - mainwindow.cpp - mainwindow.h - mainwindow.ui -) +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) qt_add_executable(CuteSchedule diff --git a/main.cpp b/main.cpp index fd3e533..a438ec4 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,4 @@ -#include "mainwindow.h" +#include "src/mainwindow.h" #include