Skip to content

Commit

Permalink
Start to update QaterialGallery (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff authored Dec 6, 2023
1 parent 14e1661 commit 7ea4f96
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 58 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/macos-dmg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-
Expand Down Expand Up @@ -57,21 +57,14 @@ 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: |
mkdir -p build
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" \
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
# Ignore CLion project files
*.idea
# For macOs users
.DS_Store
.DS_Store
.cpm
16 changes: 11 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
include(platforms/Deploy.cmake)
2 changes: 1 addition & 1 deletion cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
35 changes: 0 additions & 35 deletions include/QaterialGallery/Pch/Pch.hpp

This file was deleted.

7 changes: 2 additions & 5 deletions src/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ──── INCLUDE ────

// Oliv Qt
#include <Qaterial/Qaterial.hpp>

Expand All @@ -24,11 +22,9 @@ void installLoggers()
#ifdef WIN32
const auto msvcSink = std::make_shared<spdlog::sinks::msvc_sink_mt>();
msvcSink->set_level(spdlog::level::debug);
qaterial::Logger::registerSink(msvcSink);
#endif
const auto stdoutSink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
stdoutSink->set_level(spdlog::level::debug);
qaterial::Logger::registerSink(stdoutSink);
}

// ──── FUNCTIONS ────
Expand Down Expand Up @@ -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: "
Expand Down

0 comments on commit 7ea4f96

Please sign in to comment.