diff --git a/CMakeLists.txt b/CMakeLists.txt index e81cdcf..c4d43d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,9 +27,12 @@ configure_file(WallReel/version.h.in ${CMAKE_BINARY_DIR}/generated/version.h) find_package(Qt6 REQUIRED COMPONENTS Quick Widgets QuickControls2 Concurrent Sql) -qt_standard_project_setup(REQUIRES 6.5) +qt_standard_project_setup(REQUIRES 6.4) -qt_policy(SET QTP0004 NEW) +if(COMMAND qt_policy) + qt_policy(SET QTP0001 NEW) + qt_policy(SET QTP0004 NEW) +endif() option(BUILD_TESTING "Build the testing tree." ON) option(ADDRESS_SANITIZER "Enable Address Sanitizer for debugging." OFF) @@ -61,8 +64,18 @@ set_target_properties(${EXECUTABLE_NAME} PROPERTIES target_link_libraries(${EXECUTABLE_NAME} PRIVATE ${CORELIB_NAME} ${CORELIB_NAME}plugin + ${UILIB_NAME} ${UILIB_NAME}plugin + + ${UILIB_NAME}_Pages + ${UILIB_NAME}_Pagesplugin + + ${UILIB_NAME}_Modules + ${UILIB_NAME}_Modulesplugin + + ${UILIB_NAME}_Components + ${UILIB_NAME}_Componentsplugin ) target_include_directories(${EXECUTABLE_NAME} PRIVATE diff --git a/README.md b/README.md index c6f6ef6..54125b5 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,20 @@ It might not be that worthy to build a Qt application from ground for such a sma e.g. On Arch-based systems: ```bash - sudo pacman -S --needed qt6-base cmake gcc + sudo pacman -S --needed qt6-base qt6-declarative cmake gcc + ``` + + on Debian-based systems: + + ```bash + sudo apt install --no-install-recommends qt6-base-dev qt6-declarative-dev cmake g++ ``` 2. Clone the repository: ```bash - git clone https://github.com/Uyanide/Wallpaper_Carousel.git && \ - cd Wallpaper_Carousel + git clone https://github.com/Uyanide/WallReel.git && \ + cd WallReel ``` 3. Build and install: diff --git a/WallReel/UI/CMakeLists.txt b/WallReel/UI/CMakeLists.txt index 93d347a..4fa72b4 100644 --- a/WallReel/UI/CMakeLists.txt +++ b/WallReel/UI/CMakeLists.txt @@ -4,14 +4,37 @@ qt_add_qml_module(${UILIB_NAME} VERSION ${MODULE_VERSION_MAJOR}.${MODULE_VERSION_MINOR} QML_FILES Main.qml +) + +qt_add_qml_module(${UILIB_NAME}_Pages + STATIC + URI "${UIMODULE_URI}.Pages" + VERSION ${MODULE_VERSION_MAJOR}.${MODULE_VERSION_MINOR} + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Pages + QML_FILES Pages/LoadingScreen.qml Pages/CarouselScreen.qml +) + +qt_add_qml_module(${UILIB_NAME}_Modules + STATIC + URI "${UIMODULE_URI}.Modules" + VERSION ${MODULE_VERSION_MAJOR}.${MODULE_VERSION_MINOR} + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Modules + QML_FILES Modules/Carousel.qml Modules/TitleBar.qml Modules/SortControl.qml Modules/ColorControl.qml Modules/TopBar.qml Modules/BottomBar.qml +) +qt_add_qml_module(${UILIB_NAME}_Components + STATIC + URI "${UIMODULE_URI}.Components" + VERSION ${MODULE_VERSION_MAJOR}.${MODULE_VERSION_MINOR} + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Components + QML_FILES Components/WRSearchBar.qml Components/WRTextButton.qml ) diff --git a/WallReel/main.cpp b/WallReel/main.cpp index cdce1e6..34fe1a0 100644 --- a/WallReel/main.cpp +++ b/WallReel/main.cpp @@ -4,10 +4,6 @@ #include #include #include -#include - -Q_IMPORT_QML_PLUGIN(WallReel_CorePlugin) -Q_IMPORT_QML_PLUGIN(WallReel_UIPlugin) #include "Core/Provider/bootstrap.hpp" #include "Core/Provider/carousel.hpp"