🔧 build: split QML modules
This commit is contained in:
+15
-2
@@ -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)
|
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(BUILD_TESTING "Build the testing tree." ON)
|
||||||
option(ADDRESS_SANITIZER "Enable Address Sanitizer for debugging." OFF)
|
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
|
target_link_libraries(${EXECUTABLE_NAME} PRIVATE
|
||||||
${CORELIB_NAME}
|
${CORELIB_NAME}
|
||||||
${CORELIB_NAME}plugin
|
${CORELIB_NAME}plugin
|
||||||
|
|
||||||
${UILIB_NAME}
|
${UILIB_NAME}
|
||||||
${UILIB_NAME}plugin
|
${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
|
target_include_directories(${EXECUTABLE_NAME} PRIVATE
|
||||||
|
|||||||
@@ -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:
|
e.g. On Arch-based systems:
|
||||||
|
|
||||||
```bash
|
```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:
|
2. Clone the repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Uyanide/Wallpaper_Carousel.git && \
|
git clone https://github.com/Uyanide/WallReel.git && \
|
||||||
cd Wallpaper_Carousel
|
cd WallReel
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Build and install:
|
3. Build and install:
|
||||||
|
|||||||
@@ -4,14 +4,37 @@ qt_add_qml_module(${UILIB_NAME}
|
|||||||
VERSION ${MODULE_VERSION_MAJOR}.${MODULE_VERSION_MINOR}
|
VERSION ${MODULE_VERSION_MAJOR}.${MODULE_VERSION_MINOR}
|
||||||
QML_FILES
|
QML_FILES
|
||||||
Main.qml
|
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/LoadingScreen.qml
|
||||||
Pages/CarouselScreen.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/Carousel.qml
|
||||||
Modules/TitleBar.qml
|
Modules/TitleBar.qml
|
||||||
Modules/SortControl.qml
|
Modules/SortControl.qml
|
||||||
Modules/ColorControl.qml
|
Modules/ColorControl.qml
|
||||||
Modules/TopBar.qml
|
Modules/TopBar.qml
|
||||||
Modules/BottomBar.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/WRSearchBar.qml
|
||||||
Components/WRTextButton.qml
|
Components/WRTextButton.qml
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QQmlContext>
|
#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/bootstrap.hpp"
|
||||||
#include "Core/Provider/carousel.hpp"
|
#include "Core/Provider/carousel.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user