From 71276f970e8edb800eae58ab4d48dd4f7a740f5c Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Tue, 8 Dec 2020 22:24:24 +0100 Subject: [PATCH] Build with Qt6 --- .appveyor.yml | 8 +++----- .builds/alpine.yml | 4 ++-- .builds/freebsd.yml | 6 +----- .github/workflows/macos.yml | 4 ++-- meson.build | 6 +++--- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 321d3a7..c8c0955 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,8 +2,6 @@ os: Visual Studio 2022 environment: matrix: - - arch: x86 - compiler: msvc2019 - arch: x64 compiler: msvc2019 @@ -12,8 +10,8 @@ platform: install: # Set paths to dependencies (based on architecture) - - cmd: if %arch%==x86 (set PYTHON_ROOT=C:\python312) else (set PYTHON_ROOT=C:\python312-x64) - - cmd: if %arch%==x86 (set QT_ROOT=C:\Qt\5.15\%compiler%) else (set QT_ROOT=C:\Qt\5.15\%compiler%_64) + - cmd: set PYTHON_ROOT=C:\python312-x64 + - cmd: set QT_ROOT=C:\Qt\6.5\%compiler%_64 # Print out dependency paths - cmd: echo Using Python at %PYTHON_ROOT% - cmd: echo Using Qt at %QT_ROOT% @@ -31,7 +29,7 @@ build_script: after_build: # Zip build binaries and dependencies - - cmd: 7z a libopenrazer_%compiler%_%arch%.zip %APPVEYOR_BUILD_FOLDER%\builddir\libopenrazerdemo.exe %QT_ROOT%\bin\Qt5Core.dll %QT_ROOT%\bin\Qt5DBus.dll %QT_ROOT%\bin\Qt5Xml.dll + - cmd: 7z a libopenrazer_%compiler%_%arch%.zip %APPVEYOR_BUILD_FOLDER%\builddir\libopenrazerdemo.exe %QT_ROOT%\bin\Qt6Core.dll %QT_ROOT%\bin\Qt6DBus.dll %QT_ROOT%\bin\Qt6Xml.dll artifacts: - path: libopenrazer*.zip diff --git a/.builds/alpine.yml b/.builds/alpine.yml index d149074..6120896 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -1,8 +1,8 @@ image: alpine/edge packages: - meson - - qt5-qtbase-dev - - qt5-qttools-dev + - qt6-qtbase-dev + - qt6-qttools-dev sources: - https://github.com/z3ntu/libopenrazer tasks: diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index c2f4a8a..8a5dd2a 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -2,11 +2,7 @@ image: freebsd/latest packages: - meson - pkgconf - - qt5-buildtools - - qt5-dbus - - qt5-linguisttools - - qt5-widgets - - qt5-xml + - qt6-base sources: - https://github.com/z3ntu/libopenrazer tasks: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7cac2a0..6e06248 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - run: brew install qt@5 meson - - run: echo "/opt/homebrew/opt/qt@5/bin" >> $GITHUB_PATH + - run: brew install qt@6 meson + - run: echo "/opt/homebrew/opt/qt@6/bin" >> $GITHUB_PATH - run: meson setup builddir - run: meson compile -C builddir diff --git a/meson.build b/meson.build index 227f527..e4bb8a5 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,10 @@ project('libopenrazer', 'cpp', version : '0.2.0', - default_options : ['cpp_std=c++11']) + default_options : ['cpp_std=c++17']) -qt = import('qt5') -qt_dep = dependency('qt5', modules : ['Core', 'DBus', 'Gui', 'Xml']) +qt = import('qt6') +qt_dep = dependency('qt6', modules : ['Core', 'DBus', 'Gui', 'Xml']) if build_machine.system() == 'darwin' libopenrazer_data_dir = 'Contents/Resources'