From 7ea4f968d1d083e5df1c508f29352003671d37d4 Mon Sep 17 00:00:00 2001 From: Olivier Le Doeuff Date: Wed, 6 Dec 2023 08:09:00 +0100 Subject: [PATCH] Start to update QaterialGallery (#14) --- .github/workflows/macos-dmg.yml | 15 ++++--------- .gitignore | 3 ++- CMakeLists.txt | 16 ++++++++----- cmake/Dependencies.cmake | 2 +- include/QaterialGallery/Pch/Pch.hpp | 35 ----------------------------- src/Main.cpp | 7 ++---- 6 files changed, 20 insertions(+), 58 deletions(-) delete mode 100644 include/QaterialGallery/Pch/Pch.hpp diff --git a/.github/workflows/macos-dmg.yml b/.github/workflows/macos-dmg.yml index 5098158..c8766b0 100644 --- a/.github/workflows/macos-dmg.yml +++ b/.github/workflows/macos-dmg.yml @@ -20,12 +20,12 @@ jobs: runs-on: macOS-latest strategy: matrix: - min-osx-target: ['10.13'] - qt-version: ['5.15.1'] + min-osx-target: ['11.0'] + qt-version: ['5.15.2'] build-type: ['Release'] # 1 is legacy build system # 12 is new build system - build-system: ['1'] + build-system: ['12'] steps: - @@ -57,14 +57,6 @@ jobs: version: ${{ matrix.qt-version }} dir: ${{ github.workspace }}/Qt-${{ runner.os }}-${{ matrix.qt-version }} cached: ${{ steps.cache-qt-macos.outputs.cache-hit }} - - - name: 🔥 Delete Qt built-in styles - run: | - rm -rf ${Qt5_Dir}/qml/QtQuick/Controls.2/designer - rm -rf ${Qt5_Dir}/qml/QtQuick/Controls.2/Fusion - rm -rf ${Qt5_Dir}/qml/QtQuick/Controls.2/Imagine - rm -rf ${Qt5_Dir}/qml/QtQuick/Controls.2/Universal - shell: bash - name: 🔧 Configure run: | @@ -72,6 +64,7 @@ jobs: cmake \ -G "Xcode" \ -Tbuildsystem=${{ matrix.build-system }} \ + -DCMAKE_OSX_ARCHITECTURES="x86_64" \ -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.min-osx-target }} \ -DQT_MAC_TEAM_ID=${{ secrets.MAC_TEAM_ID }} \ -DQT_MAC_CODE_SIGN_IDENTITY="Developer ID Application" \ diff --git a/.gitignore b/.gitignore index ebdf430..96ac47e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ # Ignore CLion project files *.idea # For macOs users -.DS_Store \ No newline at end of file +.DS_Store +.cpm diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c6517d..8e86948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,10 +155,6 @@ if(QATERIALGALLERY_IGNORE_ENV) target_compile_definitions(${QATERIALGALLERY_TARGET} PRIVATE -DQATERIALGALLERY_IGNORE_ENV) endif() -if(QATERIALGALLERY_ENABLE_PCH AND COMMAND target_precompile_headers) - target_precompile_headers(${QATERIALGALLERY_TARGET} PRIVATE include/QaterialGallery/Pch/Pch.hpp) -endif() - # ──── DEPENDENCIES ──── set_target_properties(${QATERIALGALLERY_TARGET} PROPERTIES @@ -167,8 +163,18 @@ set_target_properties(${QATERIALGALLERY_TARGET} PROPERTIES target_link_libraries(${QATERIALGALLERY_TARGET} PRIVATE Qaterial spdlog + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick + Qt::QuickControls2 + Qt::Svg + Qt::Widgets +) +target_compile_definitions(${QATERIALGALLERY_TARGET} PRIVATE + -DQATERIALGALLERY_VERSION="${QATERIALGALLERY_VERSION}" ) # ────────── POST BUILD PLATFORM DEPENDANCIES ───────────── -include(platforms/Deploy.cmake) \ No newline at end of file +include(platforms/Deploy.cmake) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 2e9a0e5..47a45bc 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -32,4 +32,4 @@ set(SPDLOG_REPOSITORY "https://github.com/gabime/spdlog" CACHE STRING "spdlog re set(SPDLOG_TAG "v1.x" CACHE STRING "spdlog git tag") set(QATERIAL_REPOSITORY "https://github.com/OlivierLDff/Qaterial.git" CACHE STRING "Repository of Qaterial") -set(QATERIAL_TAG "v1.4.0" CACHE STRING "Git Tag of Qaterial") +set(QATERIAL_TAG "v1.4.9" CACHE STRING "Git Tag of Qaterial" FORCE) diff --git a/include/QaterialGallery/Pch/Pch.hpp b/include/QaterialGallery/Pch/Pch.hpp deleted file mode 100644 index 3fe1496..0000000 --- a/include/QaterialGallery/Pch/Pch.hpp +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __QATERIALGALLERY_PCH_HPP__ -#define __QATERIALGALLERY_PCH_HPP__ - -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#ifdef major -# undef major -#endif -#ifdef minor -# undef minor -#endif - -#endif \ No newline at end of file diff --git a/src/Main.cpp b/src/Main.cpp index 32d77c5..aa8666d 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -1,5 +1,3 @@ -// ──── INCLUDE ──── - // Oliv Qt #include @@ -24,11 +22,9 @@ void installLoggers() #ifdef WIN32 const auto msvcSink = std::make_shared(); msvcSink->set_level(spdlog::level::debug); - qaterial::Logger::registerSink(msvcSink); #endif const auto stdoutSink = std::make_shared(); stdoutSink->set_level(spdlog::level::debug); - qaterial::Logger::registerSink(stdoutSink); } // ──── FUNCTIONS ──── @@ -60,7 +56,8 @@ int main(int argc, char* argv[]) QGuiApplication::setOrganizationName("Oliv"); QGuiApplication::setApplicationName("Qaterial Gallery"); QGuiApplication::setOrganizationDomain("https://github.com/OlivierLDff/QaterialGallery"); - QGuiApplication::setApplicationVersion(qaterial::Version::version().readable()); + + QGuiApplication::setApplicationVersion(QATERIALGALLERY_VERSION); qCDebug(QATERIALGALLERY_MAIN_LOGGING_CATEGORY, "Register Application: "