-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[qt] Enable android #42080
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
Merged
Merged
[qt] Enable android #42080
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c983902
[qtbase] Add android support
dg0yt 1ab85c3
[vcpkg-qmake] Pass programs with absolute path
dg0yt fbe61ca
[libqglviewer] No android support
dg0yt b283b4f
Baseline
dg0yt 490c965
[qtbase] Fixup
dg0yt c450f43
[qtbase] Fixup
dg0yt 25ea538
Revert "[vcpkg-qmake] Pass programs with absolute path"
dg0yt 094c13a
WIP
dg0yt 0477d9a
[vcpkg-qmake] Pass programs with absolute path
dg0yt 004fb04
Quote cxx for windows shell
dg0yt 4e5264f
[vcpkg-qmake] Accept full command path w/o space
dg0yt f3d0972
Revert "Quote cxx for windows shell"
dg0yt 8271a64
Merge remote-tracking branch 'origin/master' into qtbase-android
dg0yt 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -41,6 +41,10 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT "doubleconversion" IN_LIST FEATURES) | |
| message(FATAL_ERROR "${PORT} requires feature doubleconversion on windows!" ) | ||
| endif() | ||
|
|
||
| # Feature like glib depend on pkg-config | ||
| vcpkg_find_acquire_program(PKGCONFIG) | ||
| set(ENV{PKG_CONFIG} "${PKGCONFIG}") | ||
|
|
||
| if(VCPKG_TARGET_IS_LINUX) | ||
| message(WARNING "qtbase currently requires packages from the system package manager. " | ||
| "They can be installed on Ubuntu systems via sudo apt-get install " | ||
|
|
@@ -121,7 +125,7 @@ FEATURES | |
| "icu" FEATURE_icu | ||
| "pcre2" FEATURE_pcre2 | ||
| #"icu" CMAKE_REQUIRE_FIND_PACKAGE_ICU | ||
| "glib" CMAKE_REQUIRE_FIND_PACKAGE_GLIB2 | ||
| #"glib" CMAKE_REQUIRE_FIND_PACKAGE_GLIB2 | ||
|
Comment on lines
-124
to
+128
Contributor
Author
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. Multiple attempts, success on second one. (Drive-by fix, based on feature-tests. Complemented by acquiring PKGCONFIG.) |
||
| INVERTED_FEATURES | ||
| #"doubleconversion" CMAKE_DISABLE_FIND_PACKAGE_WrapDoubleConversion # Required | ||
| #"pcre2" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemPCRE2 # Bug in qt cannot be deactivated | ||
|
|
@@ -158,7 +162,7 @@ else() | |
| list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=no) | ||
| endif() | ||
|
|
||
| if ("dnslookup" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
| if ("dnslookup" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_ANDROID AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
| list(APPEND FEATURE_NET_OPTIONS -DFEATURE_libresolv:BOOL=ON) | ||
| endif() | ||
|
|
||
|
|
@@ -332,11 +336,13 @@ qt_install_submodule(PATCHES ${${PORT}_PATCHES} | |
| -DINPUT_bundled_xcb_xinput:STRING=no | ||
| -DFEATURE_force_debug_info:BOOL=ON | ||
| -DFEATURE_relocatable:BOOL=ON | ||
| -DQT_AUTODETECT_ANDROID:BOOL=ON # Use vcpkg toolchain as is | ||
| CONFIGURE_OPTIONS_RELEASE | ||
| CONFIGURE_OPTIONS_DEBUG | ||
| -DFEATURE_debug:BOOL=ON | ||
| CONFIGURE_OPTIONS_MAYBE_UNUSED | ||
| FEATURE_appstore_compliant # only used for android/ios | ||
| QT_AUTODETECT_ANDROID | ||
| ) | ||
|
|
||
| # Install CMake helper scripts | ||
|
|
@@ -411,6 +417,11 @@ foreach(_config debug release) | |
| endif() | ||
| endforeach() | ||
| endforeach() | ||
| if(VCPKG_CROSSCOMPILING AND NOT CMAKE_HOST_WIN32) | ||
| foreach(name IN ITEMS qmake qmake6 qtpaths qtpaths6) | ||
| vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${name}" "${CURRENT_HOST_INSTALLED_DIR}/" "\"\$script_dir_path\"/../../../../${HOST_TRIPLET}/") | ||
| endforeach() | ||
| endif() | ||
|
|
||
| # Fixup qt.toolchain.cmake | ||
| set(qttoolchain "${CURRENT_PACKAGES_DIR}/share/Qt6/qt.toolchain.cmake") | ||
|
|
@@ -489,11 +500,17 @@ if(EXISTS "${target_qt_conf}") | |
| endif() | ||
| endif() | ||
|
|
||
| if(VCPKG_TARGET_IS_ANDROID) | ||
| vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6Core/Qt6AndroidMacros.cmake" | ||
| [[ set(cmake_dir "${prefix_path}/${${export_namespace_upper}_INSTALL_LIBS}/cmake")]] | ||
| [[ set(cmake_dir "${prefix_path}/share")]] | ||
| ) | ||
| endif() | ||
|
|
||
| if(VCPKG_TARGET_IS_EMSCRIPTEN) | ||
| vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6Core/Qt6WasmMacros.cmake" "_qt_test_emscripten_version()" "") # this is missing a include(QtPublicWasmToolchainHelpers) | ||
| endif() | ||
|
|
||
|
|
||
| if(VCPKG_TARGET_IS_WINDOWS) | ||
| set(_DLL_FILES brotlicommon brotlidec bz2 freetype harfbuzz libpng16) | ||
| set(DLLS_TO_COPY "") | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Z_VCPKG_CMAKE_GENERATORis a cache variable owned byvcpkg-cmake.