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
env:
QT_VERSION: 6.4.1
QT_VERSION: 6.5.0
QIF_VERSION: 4.5
steps:
@ -63,7 +63,7 @@ jobs:
runs-on: windows-latest
env:
QT_VERSION: 6.4.1
QT_VERSION: 6.5.0
QIF_VERSION: 4.5
BUILD_ARCH: 64
@ -124,8 +124,7 @@ jobs:
runs-on: macos-latest
env:
QT_VERSION: 6.4.1
QIF_VERSION: 4.4
QT_VERSION: 6.5.0
steps:
- name: 'Setup xcode'
@ -139,18 +138,18 @@ jobs:
version: ${{ env.QT_VERSION }}
host: 'mac'
target: 'desktop'
modules: 'qtremoteobjects qt5compat qtshadertools qtmultimedia'
arch: 'clang_64'
modules: 'qtremoteobjects qt5compat qtshadertools'
dir: ${{ runner.temp }}
set-env: 'true'
- name: 'Install ios Qt'
- name: 'Install iOS Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'mac'
target: 'ios'
modules: 'qtremoteobjects qt5compat qtshadertools'
modules: 'qtremoteobjects qt5compat qtshadertools qtmultimedia'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
@ -200,7 +199,7 @@ jobs:
runs-on: macos-latest
env:
QT_VERSION: 6.4.1
QT_VERSION: 6.5.0
QIF_VERSION: 4.5
steps:
@ -263,8 +262,7 @@ jobs:
arch: ['android_x86_64', 'android_x86'] #, 'android_armv7', 'android_arm64_v8a']
env:
QT_VERSION: 6.4.1
QIF_VERSION: 4.5
QT_VERSION: 6.5.0
steps:
- 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 PREDEFINED_TARGETS_FOLDER "Autogen")
find_package(Qt6 REQUIRED COMPONENTS
Widgets Core Gui Network Xml
RemoteObjects Quick Svg QuickControls2
Core5Compat Concurrent
set(PACKAGES
Widgets Core Gui Network Xml
RemoteObjects Quick Svg QuickControls2
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::Network Qt6::Xml Qt6::RemoteObjects
Qt6::Quick Qt6::Svg Qt6::QuickControls2
Qt6::Core5Compat Qt6::Concurrent
)
if(IOS)
set(LIBS
${LIBS}
Qt6::Multimedia
)
endif()
qt_standard_project_setup()