-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for iOS. #1775
Merged
Merged
Workaround for iOS. #1775
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ exists($$PWD/../../../DevBuildCpp.pri) { | |
# use the Esri dev build script | ||
include ($$PWD/../../../DevBuildCpp.pri) | ||
# include the toolkitcpp.pri, which contains all the toolkit resources | ||
include($$PWD/../../toolkit/uitools/toolkitcpp.pri) | ||
include($$PWD/../../toolkit/uitools/toolkitcpp/toolkitcpp.pri) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This avoids a toolkit warning. This file was recently moved into FYI @GuillaumeBelz |
||
|
||
INCLUDEPATH += \ | ||
$$SAMPLEPATHCPP \ | ||
|
@@ -52,8 +52,8 @@ exists($$PWD/../../../DevBuildCpp.pri) { | |
CONFIG += c++17 | ||
|
||
# include the toolkitcpp.pri, which contains all the toolkit resources | ||
!include($$PWD/../arcgis-maps-sdk-toolkit-qt/uitools/toolkitcpp.pri) { | ||
message("ERROR: Cannot find toolkitcpp.pri at path:" $$PWD/../arcgis-maps-sdk-toolkit-qt/uitools/toolkitcpp.pri) | ||
!include($$PWD/../arcgis-maps-sdk-toolkit-qt/uitools/toolkitcpp/toolkitcpp.pri) { | ||
message("ERROR: Cannot find toolkitcpp.pri at path:" $$PWD/../arcgis-maps-sdk-toolkit-qt/uitools/toolkitcpp/toolkitcpp.pri) | ||
message("Please ensure the Qt Toolkit repository is cloned and the path above is correct.") | ||
} | ||
|
||
|
@@ -120,6 +120,27 @@ exists($$PWD/../../../DevBuildCpp.pri) { | |
|
||
ios { | ||
PLATFORM = "iOS" | ||
|
||
# workaround for https://bugreports.qt.io/browse/QTBUG-129651 | ||
# ArcGIS Maps SDK for Qt adds 'QMAKE_RPATHDIR = @executable_path/Frameworks' | ||
# and ffmpeg frameworks have embedded '@rpath/Frameworks' path. | ||
# so in order for them to be found, we need to add @executable_path to the | ||
# search path. | ||
FFMPEG_LIB_DIR = $$absolute_path($$replace(QMAKE_QMAKE, "qmake6", "../../ios/lib/ffmpeg")) | ||
FFMPEG_LIB_DIR = $$absolute_path($$replace(FFMPEG_LIB_DIR, "qmake", "../../ios/lib/ffmpeg")) | ||
QMAKE_LFLAGS += -F$${FFMPEG_LIB_DIR} -Wl,-rpath,@executable_path | ||
LIBS += -framework libavcodec \ | ||
-framework libavformat \ | ||
-framework libavutil \ | ||
-framework libswresample \ | ||
-framework libswscale | ||
ffmpeg.files = $${FFMPEG_LIB_DIR}/libavcodec.framework \ | ||
$${FFMPEG_LIB_DIR}/libavformat.framework \ | ||
$${FFMPEG_LIB_DIR}/libavutil.framework \ | ||
$${FFMPEG_LIB_DIR}/libswresample.framework \ | ||
$${FFMPEG_LIB_DIR}/libswscale.framework | ||
ffmpeg.path = Frameworks | ||
QMAKE_BUNDLE_DATA += ffmpeg | ||
} | ||
|
||
DEFINES += BUILD_FROM_SETUP | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we grab the qmake absolute path with
QMAKE_QMAKE
and use that to source the location of the ffmpeg binaries?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's not great, but I can't find any non-hacky qmake way to locate the Qt kit's lib dir.
QTDIR
is the obvious one, but that's only set with Qt Creator. Christian is testing in CI now and it fails, so we can't use that.It gets pretty ugly, because qmake for iOS is just a script that points to macOS's qmake binary. Then users could be using either
qmake
orqmake6
so we don't know which one to replace, so we have to handle both.