This reverts commit d7e8d5bb1b.
Reason for revert: Found a working solution for the issue.
Change-Id: Ia720cc63ece9dfb1a24067cdd9c3d79d4edbe3be
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Right now, "multi abi builds" of android projects works only if the
android-build installation doesn't use custom install dirs
(INSTALL_PREFIX, INSTALL_BINDIR...)
At the same time, it fixes QTBUG-106533. The patches are the same as the
ones in that bugreport.
Add new items to android-*-deployment-settings.json:
qtDataDirectory
qtLibsDirectory
qtLibExecsDirectory
qtPluginsDirectory
qtQmlDirectory
Update androiddeployqt to be able to get files from their install location
BTW (fixes QTBUG-106533):
Install src/android/templates into INSTALL_DATADIR
Install src/3rdparty/gradle into INSTALL_DATADIR
Install src/android/java files into INSTALL_DATADIR
Install all jars into INSTALL_DATADIR
Add missing path to target_qt.conf
Update target_qt.conf to have all path. Otherwise qmake wouldn't have
the path when installing the android-build with custom install dirs
like INSTALL_LIBDIR & friends
Add support for a new cmake variable that can be set at build time of the
android projects: QT_ANDROID_PATH_CMAKE_DIR_${abi} (Name chosen as
brother of QT_HOST_PATH_CMAKE_DIR)
Pick-to: 6.5
Fixes: QTBUG-106533
Fixes: QTBUG-107207
Change-Id: Ia3751362ab1b5f877ecafbe02f263feac167119c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We aim to allow building Qt for Android on one host, and make it
usable on any host.
Previously when built on a Windows host, we embedded windows style
paths into the android -dependencies.xml files, which caused
androideployqt to fail deployment when building a project on a unix
host.
In Qt 5, the dependencies xml files for Windows Android packages had
unix style paths. Thus switch to always using unix styles paths on
all platforms.
Amends a9d2c5b6d7.
Fixes: QTBUG-107249
Change-Id: I851d3e0b08415b4c7f0d22baf43c10c715879ee7
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This change tries to make the API more user friendly and prevent wrong
use of multi-abi API. ANDROID_ABI argument of qt6_add_executable was
position-depend and needed to be placed after the executable 'sources'.
Using the target property we solve this problem and provide more
consistent and common way to enable multi-abi build for the single
target.
This meanwhile also requires to execute multi-abi build configuration
in the finalizer, since the property might be set at any point.
Also the priority of the QT_ANDROID_ABI target property now is higher
than the priority of the QT_ANDROID_BUILD_ALL_ABIS variable. So target
will only build packages with the ABIs specified in QT_ANDROID_ABI
property if both are set.
Pick-to: 6.3
Task-number: QTBUG-88841
Change-Id: I3515297ed267974498913c59619433dc234ec217
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
androiddeployqt relies on *-android-dependencies.xml files to know
what dependencies like jar files and permissions a Qt module requires.
CMake create those files under Qt prefix's lib dir but CMake was not
accounting for module plugins.
Fixes: QTBUG-90812
Pick-to: 6.1 6.0
Change-Id: Ib3b2e2bb237159b4851ac0f23dc75f8e56af3f7a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QMake used to allow retrieving the Android features list for a modules.
The dependencies are written to *-android-dependencies.xml files and are
read by androiddeployqt. This option was missed at some point along the
way of writing CMake port for Qt 6.
Pick-to: 6.1 6.0
Change-Id: Ic0b82f024567e640968f97aeff2db1888f2b53a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This prevented androiddeployqt from properly deploying libraries which
specify init class via the ":" delimiter.
Pick-to: 6.0 6.1
Change-Id: Ib9cfa7edc864d7d540577df22284ceb9714a2511
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
...and include it in QtBuild.cmake.
Commit e8d8b1a5e4 added two different code paths to include
QtBuildInternalsAndroid.cmake.
This was needed, because:
In a top-level build, we must not include files that are not yet
installed. We have the source tree available, and
"${QT_SOURCE_TREE}/cmake" is in CMAKE_MODULE_PATH.
We can use the "module syntax" of the include() command.
In a per-repository build, when building against an installed qtbase, we
must not include files of the source tree, because that's not guaranteed
to be available. However, Qt6BuildInternalsConfig.cmake is installed,
and we can directly include QtBuildInternalsAndroid.cmake, which is
right next to it.
We can circumvent this whole issue by moving the Android-related
functions out of the Qt6BuildInternals package and including it in
QtBuild.cmake.
Pick-to: 6.0
Task-number: QTBUG-88718
Change-Id: I5192ba19bb77952505c20d053d7285f798d16ac5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>