Skip to content

Commit 7f2aec0

Browse files
Add the iOS workaround. (#708)
1 parent 90f9f88 commit 7f2aec0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

uitools/examples/UitoolsExamples.pro

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,32 @@ macx {
7171

7272
ios {
7373
include (iOS/iOS.pri)
74+
75+
# workaround for https://bugreports.qt.io/browse/QTBUG-129651
76+
# ArcGIS Maps SDK for Qt adds 'QMAKE_RPATHDIR = @executable_path/Frameworks'
77+
# and ffmpeg frameworks have embedded '@rpath/Frameworks' path.
78+
# so in order for them to be found, we need to add @executable_path to the
79+
# search path.
80+
FFMPEG_LIB_DIR = $$absolute_path($$replace(QMAKE_QMAKE, "qmake6", "../../ios/lib/ffmpeg"))
81+
FFMPEG_LIB_DIR = $$absolute_path($$replace(FFMPEG_LIB_DIR, "qmake", "../../ios/lib/ffmpeg"))
82+
QMAKE_LFLAGS += -F$${FFMPEG_LIB_DIR} -Wl,-rpath,@executable_path
83+
versionAtLeast(QT_VERSION, 6.8.3) {
84+
FRAMEWORK = "xcframework"
85+
} else {
86+
FRAMEWORK = "framework"
87+
}
88+
LIBS += -framework libavcodec \
89+
-framework libavformat \
90+
-framework libavutil \
91+
-framework libswresample \
92+
-framework libswscale
93+
ffmpeg.files = $${FFMPEG_LIB_DIR}/libavcodec.$${FRAMEWORK} \
94+
$${FFMPEG_LIB_DIR}/libavformat.$${FRAMEWORK} \
95+
$${FFMPEG_LIB_DIR}/libavutil.$${FRAMEWORK} \
96+
$${FFMPEG_LIB_DIR}/libswresample.$${FRAMEWORK} \
97+
$${FFMPEG_LIB_DIR}/libswscale.$${FRAMEWORK}
98+
ffmpeg.path = Frameworks
99+
QMAKE_BUNDLE_DATA += ffmpeg
74100
}
75101

76102
android {

0 commit comments

Comments
 (0)