aboutsummaryrefslogtreecommitdiff
path: root/toolchain
AgeCommit message (Collapse)Author
2019-07-08Fix type names casingAleix Pol
Summary: It's supposed to be uppercase, cmake was warning about it. Test Plan: Now it builds as well, but cmake doesn't complain. Reviewers: #frameworks, #android, vkrause Reviewed By: #android, vkrause Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D22317
2019-04-17Bug fix: find c++ stl using regexv5.58.0-rc1v5.58.0Sharaf Zaman
Summary: Find C++ shared lib path using regex. This change makes finding path independent of the order in which it was added by cmake. Reviewers: apol Reviewed By: apol Subscribers: kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D20558
2019-04-15Detect duplicate ANDROID_EXTRA_LIBS and minor bug fixSharaf Zaman
Summary: Don't include same dependency twice, one which was found from `readelf` in `specifydependencies.cmake` and other in `ANDROID_EXTRA_LIBS`. Bug fix: find stl was dependent on the order in which libc++ was added, now it is independent. Test Plan: * add the same dependency in ANDROID_EXTRA_LIBS Reviewers: apol, vkrause Reviewed By: apol Subscribers: kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D20509
2019-02-26Android: Reflect on using clang nowv5.56.0-rc1v5.56.0Aleix Pol
2019-02-15Update Android toolchain files to realityVolker Krause
Summary: - NDK r18 does not ship GCC anymore, it's only clang now - same for STL, there's only libc++ there - API level 14 is not supported either anymore, the minimum supported by the current NDK is 16 - The minimum supported API level by KF5 right now is 21 though, so use that as the default Reviewers: apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19016
2019-01-09Use more https in linksFriedrich W. H. Kossebau
2018-11-19Android: improve clang supportAleix Pol
Summary: Infer the toolchain we are using through cmake's detection of ranlib instead of asking the user to fill it. It's only used in androiddeployqt and cmake expects it to be version "clang" for clang builds while androiddeployqt expects it to be "4.9". Reviewers: #build_system, #android, vkrause Reviewed By: #android, vkrause Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D16930
2018-09-29Android: Allow passing a relative path as the apk dirAleix Pol
Summary: This way the project can generate automatically its own manifest file. GCompris is using it to set the version. Test Plan: Built GCompris without a warning saying the apkdir isn't found Reviewers: #frameworks, #gcompris, jjazeix Reviewed By: #gcompris, jjazeix Subscribers: jjazeix, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15643
2018-09-27Android: Properly offer a fallback to applications that don't have a manifestAleix Pol
The variable name was wrong, not much to see here.
2018-09-24Fix Android builds using cmake 3.12.1Aleix Pol
Summary: Only extract the the stl shared object without the rest of libraries. Test Plan: Built gcompris Reviewers: #frameworks, vkrause Reviewed By: vkrause Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15685
2018-08-26Change documentation to reflect the real toolchain CMake nameBenjamin Port
Reviewers: apol, alexeymin Reviewed By: alexeymin Subscribers: alexeymin, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15084
2018-08-02Android: Don't hardcode a random version of the Android SDKAleix Pol
Summary: Just default to whichever is installed Test Plan: Built kalgebra Reviewers: #frameworks, vkrause Reviewed By: vkrause Subscribers: alexeymin, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14544
2018-07-18Fix variable definition checkAleix Pol
Summary: We'd check if the variable's value is defined, which is wrong and prevented us from properly initialising using these deprecated variables. It would also ignore the value we're passing to the actually right variable when using it. Test Plan: Built kstars which needs -DCMAKE_ANDROID_API=24 Reviewers: #frameworks, vkrause Reviewed By: vkrause Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14187
2018-07-04Android: Make it possible to override a target's APK directoryv5.48.0-rc1v5.48.0Aleix Pol
Summary: Some projects such as marble do some operations with the APK directory before building. This allows us the project to copy the apk directory over to the build directory and do whatever it pleases. Test Plan: Built Marble Reviewers: #frameworks, vkrause Reviewed By: vkrause Subscribers: vkrause, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D13403
2018-05-31Android toolchain: allow to specify extra libs manuallyv5.47.0-rc1v5.47.0Alexey Minnekhanov
Summary: Add new variable ANDROID_EXTRA_LIBS, which can contain list of full paths to libs to include in resulting APK file. This can be used to include plugins that are not directly liked to executable, for example OpenSSL libs for QtNetwork SSL/HTTPS support. Test Plan: Build project with -DANDROID_EXTRA_LIBS="/path/to/lib.so;/path/to/other_lib.so". Build without it. In both cases verify APK contents. Reviewers: apol Reviewed By: apol Subscribers: kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D13198
2018-05-15Android: fix typoAleix Pol
2018-05-14Android: Don't define qml-import-paths if it's emptyAleix Pol
Otherwise androiddeployqt fails like it's failing now for kirigami https://binary-factory.kde.org/view/Android/job/KirigamiGallery_android/48/console
2018-04-17Android: fix dumb mistakesAleix Pol
Use the variable we just created to look up Qt5. Remove debug warning.
2018-04-17Android: Make sure variable is defined before using itAleix Pol
2018-04-13Make it possible to build several apk out of a projectAleix Pol
Summary: Refactor the apk-generating code into a separate function, in views of eventually even make it a module. It also changes so that if no APK dir is specified, a generic dummy one is used. Useful for proofs of concept. Test Plan: Built kate, got kate and kwrite apks Reviewers: #frameworks, #build_system, vkrause Reviewed By: vkrause Subscribers: vkrause Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D12150
2018-04-12Check if the application androiddeployqt package has a main() symbolAleix Pol
Summary: Back in the KDE Edu sprint, we decided we need such a check, otherwise you get rather frustrated when the application isn't started. A patch to androiddeployqt was submitted but rejected by the maintainer. https://codereview.qt-project.org/#/c/207941/ Test Plan: kate doesn't build if we don't pass Q_DECL_EXPORT, builds if we do. Reviewers: #frameworks, #build_system, vkrause Reviewed By: vkrause Subscribers: vkrause, vatra, aacid Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D12120
2018-04-11Android: Explicitly point at upstream documentation and deprecate duplicated ↵Aleix Pol
concepts Summary: Mark as deprecated the redundant variables and focus on the difference. Reviewers: #build_system, #frameworks, vkrause Reviewed By: vkrause Subscribers: vkrause Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D11984
2018-04-04Make use of upstream CMake infrastructure to detect the compiler toolchainv5.45.0-rc1v5.45.0Aleix Pol
Summary: Instead of having ad-hoc code for gcc, let CMake do its thing. It has a lot of logic that we may be interested in, for example it will make the clang switch much smoother. Note it raises the minimum cmake to 3.7 for Android, which was released almost 2 years ago. Test Plan: Built kalgebra on it using kdeorg/android-sdk Reviewers: #frameworks, #build_system, vkrause Reviewed By: vkrause Subscribers: vkrause Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D11776
2018-03-17Provide androiddeployqt with all prefix pathsVolker Krause
Summary: This is needed for a new feature in Qt 5.12, making androiddepolyqt's recursive dependency resolution avaiable for components installed in different prefixes too. This will allow us to drop our own partial ELF dependency parsing code eventually, as well as avoid having to do workarounds like linking against all indirect dependencies. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D11388
2018-03-15Include the "stdcpp-path" in the json fileAleix Pol
Summary: qmake also generates it and androiddeployqt consumes it. Test Plan: built and ran kalgebra Reviewers: #frameworks, vkrause Reviewed By: vkrause Subscribers: vkrause, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D11342
2018-03-10Resolve symlinks in QML import pathsVolker Krause
Summary: qmlimportscanner fails when provided symlinks, so work around that. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D11181
2018-03-09Provide QML import paths to androiddeployqtVolker Krause
Summary: This makes the qmlimportscanner find our QML files and plugins correctly. That's IMHO much cleaner than the full copy of everything in the lib/qml folder we do via the android-extra-plugins list. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D11177
2018-02-24Define __ANDROID_API__Volker Krause
Summary: This is needed for NDK headers to work correctly, and is the same as the CMake code in the NDK does. Reviewers: #build_system, apol Reviewed By: apol Subscribers: apol, #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10777
2018-02-18Fix readelf command name on x86Volker Krause
Summary: The prefix for the command is i686-linux-android, while the toolchain is x86 in this case. On ARM both values are the same. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10625
2018-02-18Remove obsolete policy settingsVolker Krause
Summary: Those affect policy propagation and search path order for relative includes in CMake code, none of which is needed here. This silences a ton of warnings with CMake 3.10. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10602
2018-02-18Extend search path for NDK dependenciesVolker Krause
Summary: This allows e.g. KArchive to find zlib correctly. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10601
2018-02-17Set ANDROID in the Android toolchain fileVolker Krause
Summary: This allows easy platforms checks in CMake files, and is the same the CMake files shipped by the Android SDK use. Reviewers: #build_system, apol Reviewed By: apol Subscribers: #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10600
2018-02-17Fix include path for x86 targetsVolker Krause
Summary: ANDROID_TOOLCHAIN is "x86" there, while the include path we want is "i686-linux-android". ANDROID_COMPILER_PREFIX has that value in all cases (for ARM both are the same, so nothing changes there). Reviewers: #build_system, apol Reviewed By: apol Subscribers: apol, dfaure, #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10599
2018-02-12Android toolchain: add ANDROID_COMPILER_PREFIX variable.David Faure
Summary: For ARM it's not necessary, but when building for a x86 tablet I had to set ANDROID_TOOLCHAIN=x86 while gcc/g++ are prefixed with i686-linux-android. i.e. the path is android-ndk-r10e/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-g++ Test Plan: cmake picks up the right compiler for me now Reviewers: apol, mart Reviewed By: apol Subscribers: #build_system, #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D10462
2018-01-16Android: Add more includesAlbert Astals Cid
Summary: Without this i get In file included from /home/tsdgeos/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:0, from /home/tsdgeos/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62, from /home/tsdgeos/devel/binaryQt/5.9.2/android_armv7/include/QtCore/qglobal.h:109, from /home/tsdgeos/devel/binaryQt/5.9.2/android_armv7/include/QtGui/qtguiglobal.h:43, from /home/tsdgeos/devel/binaryQt/5.9.2/android_armv7/include/QtWidgets/qtwidgetsglobal.h:43, from /home/tsdgeos/devel/binaryQt/5.9.2/android_armv7/include/QtWidgets/qapplication.h:43, from /home/tsdgeos/devel/binaryQt/5.9.2/android_armv7/include/QtWidgets/QApplication:1, from /home/tsdgeos/devel/kde/ktuberling/main_mobile.cpp:11: /home/tsdgeos/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:20: fatal error: stdlib.h: No such file or directory #include <stdlib.h> ^ compilation terminated. Reviewers: apol Reviewed By: apol Subscribers: apol, vkrause, #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D9899
2017-12-20Use readelf to find project dependenciesv5.42.0-rc1v5.42.0Aleix Pol
Summary: We were using a link.txt file that cmake used to generate, on newer cmake versions it doesn't anymore. Instead use readelf, much like androiddeployqt does, to extract the depenencies. Catch: It relies on having all the binaries being at the same subdirectory, which is the default in ECM since not long ago. Test Plan: Build kirigamigallery with it Reviewers: #frameworks, #build_system, aacid Reviewed By: aacid Subscribers: mart Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D8173
2017-11-15Fix variable nameAleix Pol
2017-11-13Only pass the ARGS thing when doing MakefilesAleix Pol
Ninja chokes on the $
2017-08-02Add --gradle to androiddeployqtv5.37.0-rc1v5.37.0Albert Astals Cid
Otherwise when trying to build with the newest Qt/android toolchains it fails Differential Revision: https://phabricator.kde.org/D6875
2017-08-02Fix install apk targetAlbert Astals Cid
Differential Revision: https://phabricator.kde.org/D6876
2017-07-13Properly point at ECMAleix Pol
Fix typo
2017-07-08Android: scan for qml files in the source dir, not in the install dir.David Faure
Summary: When the QML files are all bundled into a .qrc file, they don't get copied to the install dir, which would lead to qmlimportscanner not picking up the dependencies (e.g. QtQuick Controls) for android packaging. Looking at commit 1b0496d, I wonder if maybe we should be able to specify two paths to look into? But qmlimportscanner doesn't support that, does it? Test Plan: using this toolchain for a basic QtQuick2 app created from a QtCreator template, with Qt Quick Controls support, and QML files in a Qt resource. Reviewers: apol, mart Reviewed By: apol Subscribers: #build_system, #frameworks Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D6466
2017-06-05scan the whole install folder for qml dependenciesMarco Martin
Summary: set qml-root-path as the root install folder of the application, as is used to scan for import dependencies, and both qml files in share should be scanned as well as other qml imports that may be installed in /lib Test Plan: kirigami gallery deployment has again all the needed dependencies Reviewers: apol Reviewed By: apol Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D6103
2017-03-17Improve error messagesAleix Pol
2017-03-16Specify qml-root-path as the share directory in the prefixAleix Pol
Summary: This way androiddeployqt will scan the imports. Otherwise it wouldn't pull qtquickcontrols2 for me Reviewers: #build_system, #frameworks, mart Reviewed By: mart Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5067
2017-03-16default for ECM_ADDITIONAL_FIND_ROOT_PATHMarco Martin
set ECM_ADDITIONAL_FIND_ROOT_PATH the same as CMAKE_PREFIX_PATH if not specified explicitly from the commandline reviewed-by:apol
2016-12-21Fix missing :: in API docs to trigger code stylingFriedrich W. H. Kossebau
2016-12-19Ignore host libs/includes/cmakeconfig files in Android toolchainFriedrich W. H. Kossebau
Summary: Currently (since 123d0d14017a25fb387efd8fe3c2c1323f9c3815) any find_library() and find_path() calls look both at the host and the toolchain paths, which often results in includes and/or libraries wrongly being picked up from the host system, which then results in a failed build. CMake config files have always been also looked for on the host, which most often also is not wanted and resulting in a failed build. This patch fixes that by changing the mode for finding libraries, includes & packages to ONLY (again), as also recommended in the cmake-toolchains documentation. While before CMAKE_PREFIX_PATH was recommended to let cmake e.g. discover the Qt5 for Android libs, this patch wants a custom variable ECM_ADDITIONAL_FIND_ROOT_PATH to be used instead. Reason is that CMAKE_PREFIX_PATH would be subject to the root handling, while here instead the root paths themselves are wanted. This patch does not add backward compatibility for still passing the Qt5 install prefix via CMAKE_PREFIX_PATH, as there are not that many users known yet and the old code did not work for many anyway, so the extra code hassle is not worth it. Instead the few build instructions would need to be updated (and should ask to use latest ECM in any case). Test Plan: Building Marble now works without trying to use stuff from the host system. Reviewers: #frameworks, #gcompris, #minuet, mutlaqja, sandsmark, cordlandwehr, nienhueser, apol Reviewed By: cordlandwehr, nienhueser, apol Differential Revision: https://phabricator.kde.org/D3646
2016-12-19Document usage of gnustl_shared with Android toolchainFriedrich W. H. Kossebau
Reviewers: #frameworks, cordlandwehr, apol Reviewed By: apol Differential Revision: https://phabricator.kde.org/D3732
2016-09-02Android.cmake: fix typo in commentDavid Faure