From c0e740b6ba2a1568557a0af27d5c2d63583e01b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AE=E7=94=9F=E8=8B=A5=E6=A2=A6?= <1070753498@qq.com> Date: Thu, 6 Jun 2024 12:59:35 +0800 Subject: [PATCH] 5 --- .github/workflows/qmake.yml | 6 +++--- examples/examples.pro | 14 +++++++++++--- src/mpv/mpv.pri | 2 +- src/src.pro | 12 ++++++++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/qmake.yml b/.github/workflows/qmake.yml index 5cd69d7..4fd9b96 100644 --- a/.github/workflows/qmake.yml +++ b/.github/workflows/qmake.yml @@ -54,20 +54,20 @@ jobs: shell: pwsh run: | ..\scripts\windows\setVsDev.ps1 -VersionRange "[16.0,17.0)" -Arch "x64" - & qmake ./../. -spec win32-msvc "CONFIG+=qtquickcompiler" + & qmake ./../. & jom working-directory: build - name: ubuntu-build if: startsWith(matrix.os, 'ubuntu') shell: bash run: | - qmake ./../. -spec linux-g++ "CONFIG+=qtquickcompiler" BUILD_MPV="ON" + qmake ./../. make -j $(nproc) working-directory: build - name: macos-build if: startsWith(matrix.os, 'macos') shell: bash run: | - qmake ./../. -spec macx-clang "CONFIG+=qtquickcompiler" QMAKE_APPLE_DEVICE_ARCHS="arm64" BUILD_MPV="ON" + qmake ./../. QMAKE_APPLE_DEVICE_ARCHS="arm64" make -j $(sysctl -n hw.ncpu) working-directory: build diff --git a/examples/examples.pro b/examples/examples.pro index 87eced9..86aa66b 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,10 +1,18 @@ TEMPLATE = subdirs -CONFIG += ordered BUILD_MPV +CONFIG += ordered SUBDIRS += \ ffmpegplayer \ ffmpegtranscoder -contains(BUILD_MPV, ON) { - SUBDIRS += mpvplayer +win32 { + exists("C:/3rd/x64/mpv/include"){ + SUBDIRS += mpvplayer + } +} + +macx { + exists("/opt/homebrew/include/mpv"){ + SUBDIRS += mpvplayer + } } diff --git a/src/mpv/mpv.pri b/src/mpv/mpv.pri index 7a508f6..3d44e76 100644 --- a/src/mpv/mpv.pri +++ b/src/mpv/mpv.pri @@ -15,4 +15,4 @@ macx { unix:!macx{ LIBS += -lmpv -} \ No newline at end of file +} diff --git a/src/src.pro b/src/src.pro index 4e3a43a..ee60186 100644 --- a/src/src.pro +++ b/src/src.pro @@ -7,6 +7,14 @@ SUBDIRS += \ 3rdparty \ ffmpeg -contains(BUILD_MPV, ON) { - SUBDIRS += mpv +win32 { + exists("C:/3rd/x64/mpv/include"){ + SUBDIRS += mpv + } +} + +macx { + exists("/opt/homebrew/include/mpv"){ + SUBDIRS += mpv + } }