Build Qt Based Prjoect Qxmpp for Android 35
Solved
Mobile and Embedded
-
Any hints on building Qxmpp project (Qt Core based) for Android 35?
Reading around on the problem I found an old build script here:
Using that, I cobbled this together:
cmake .. \ -DCMAKE_TOOLCHAIN_FILE="$HOME/Library/Android/sdk/ndk/29.0.13113456/build/cmake/android.toolchain.cmake" \ -DECM_ADDITIONAL_FIND_ROOT_PATH="$HOME/QtAndroid/6.8.2/android_arm64_v8a" \ -DANDROID_NDK="$HOME/Library/Android/sdk/ndk/29.0.13113456" \ -DANDROID_SDK_ROOT="$HOME/Library/Android/sdk" \ -DANDROID_SDK_BUILD_TOOLS_REVISION=35.0.0 \ -DANDROID_PLATFORM=android-35 \ -DCMAKE_PREFIX_PATH="$HOME/QtAndroid/6.8.2/android_arm64_v8a" \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTS=OFF
But getting this error:
CMake Error at CMakeLists.txt:22 (find_package): Could not find a package configuration file provided by "QT" with any of the following names: Qt6Config.cmake qt6-config.cmake Qt5Config.cmake qt5-config.cmake Add the installation prefix of "QT" to CMAKE_PREFIX_PATH or set "QT_DIR" to a directory containing one of the above files. If "QT" provides a separate development package or SDK, be sure it has been installed.
Though I clearly see Qt6Config.cmake:
my-MBP Qt6 % pwd /path/to/QtAndroid/6.8.2/android_arm64_v8a/lib/cmake/Qt6 my-MBP Qt6 % cat Qt6Config.cmake
I have also tried modifying the CMAKE_PREFIX_PATH to: lib/cmake/Qt6 and everything in between.
Hints?
-
Answered my question here:
https://github.com/qxmpp-project/qxmpp/issues/689
One viable option is to use Craft automated build tool.
https://develop.kde.org/docs/packaging/android/building_applications/
As Linus pointed out. Tried it out. Seems to have worked.
-