🔧 build: split QML modules

This commit is contained in:
2026-03-01 00:03:47 +01:00
parent 01f17dbf33
commit 911698ea72
4 changed files with 47 additions and 9 deletions
+15 -2
View File
@@ -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
+9 -3
View File
@@ -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:
+23
View File
@@ -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
)
-4
View File
@@ -4,10 +4,6 @@
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QtQml/QQmlExtensionPlugin>
Q_IMPORT_QML_PLUGIN(WallReel_CorePlugin)
Q_IMPORT_QML_PLUGIN(WallReel_UIPlugin)
#include "Core/Provider/bootstrap.hpp"
#include "Core/Provider/carousel.hpp"