Add Qt Multimedia to project (#236)

Add Qt Multimedia to iOS cmake project
This commit is contained in:
amnezia-developer 2023-05-17 22:38:28 +03:00 committed by GitHub
parent 19c42490e3
commit e651ea7614
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 15 deletions

View file

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
QT_VERSION: 6.4.1 QT_VERSION: 6.5.0
QIF_VERSION: 4.5 QIF_VERSION: 4.5
steps: steps:
@ -63,7 +63,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
env: env:
QT_VERSION: 6.4.1 QT_VERSION: 6.5.0
QIF_VERSION: 4.5 QIF_VERSION: 4.5
BUILD_ARCH: 64 BUILD_ARCH: 64
@ -124,8 +124,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
env: env:
QT_VERSION: 6.4.1 QT_VERSION: 6.5.0
QIF_VERSION: 4.4
steps: steps:
- name: 'Setup xcode' - name: 'Setup xcode'
@ -139,18 +138,18 @@ jobs:
version: ${{ env.QT_VERSION }} version: ${{ env.QT_VERSION }}
host: 'mac' host: 'mac'
target: 'desktop' target: 'desktop'
modules: 'qtremoteobjects qt5compat qtshadertools qtmultimedia'
arch: 'clang_64' arch: 'clang_64'
modules: 'qtremoteobjects qt5compat qtshadertools'
dir: ${{ runner.temp }} dir: ${{ runner.temp }}
set-env: 'true' set-env: 'true'
- name: 'Install ios Qt' - name: 'Install iOS Qt'
uses: jurplel/install-qt-action@v3 uses: jurplel/install-qt-action@v3
with: with:
version: ${{ env.QT_VERSION }} version: ${{ env.QT_VERSION }}
host: 'mac' host: 'mac'
target: 'ios' target: 'ios'
modules: 'qtremoteobjects qt5compat qtshadertools' modules: 'qtremoteobjects qt5compat qtshadertools qtmultimedia'
dir: ${{ runner.temp }} dir: ${{ runner.temp }}
setup-python: 'true' setup-python: 'true'
set-env: 'true' set-env: 'true'
@ -200,7 +199,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
env: env:
QT_VERSION: 6.4.1 QT_VERSION: 6.5.0
QIF_VERSION: 4.5 QIF_VERSION: 4.5
steps: steps:
@ -263,8 +262,7 @@ jobs:
arch: ['android_x86_64', 'android_x86'] #, 'android_armv7', 'android_arm64_v8a'] arch: ['android_x86_64', 'android_x86'] #, 'android_armv7', 'android_arm64_v8a']
env: env:
QT_VERSION: 6.4.1 QT_VERSION: 6.5.0
QIF_VERSION: 4.5
steps: steps:
- name: 'Install desktop Qt' - name: 'Install desktop Qt'

View file

@ -18,17 +18,32 @@ set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "Autogen")
set_property(GLOBAL PROPERTY AUTOMOC_TARGETS_FOLDER "Autogen") set_property(GLOBAL PROPERTY AUTOMOC_TARGETS_FOLDER "Autogen")
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Autogen") set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Autogen")
find_package(Qt6 REQUIRED COMPONENTS set(PACKAGES
Widgets Core Gui Network Xml Widgets Core Gui Network Xml
RemoteObjects Quick Svg QuickControls2 RemoteObjects Quick Svg QuickControls2
Core5Compat Concurrent Core5Compat Concurrent
) )
set(LIBS ${LIBS} if(IOS)
set(PACKAGES
${PACKAGES}
Multimedia
)
endif()
find_package(Qt6 REQUIRED COMPONENTS ${PACKAGES})
set(LIBS ${LIBS}
Qt6::Widgets Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Core Qt6::Gui
Qt6::Network Qt6::Xml Qt6::RemoteObjects Qt6::Network Qt6::Xml Qt6::RemoteObjects
Qt6::Quick Qt6::Svg Qt6::QuickControls2 Qt6::Quick Qt6::Svg Qt6::QuickControls2
Qt6::Core5Compat Qt6::Concurrent Qt6::Core5Compat Qt6::Concurrent
) )
if(IOS)
set(LIBS
${LIBS}
Qt6::Multimedia
)
endif()
qt_standard_project_setup() qt_standard_project_setup()