Open hancerli opened 5 months ago
Hi, I have not used cmake from either the command line or with QtCreator to build an android target. I'm able to build the exe in QtCreator and from the cmd line, but not the apk. I cloned your fork and opened CMakeList.txt in QtCreator. build output is
09:41:22: Starting: "/usr/bin/cmake" --build /tmp/QtZeroConf/build-example-Android_Qt_6_5_1_6_5_1_Android_arm_Clang_armeabi_v7a-Debug --target all [1/5 5.7/sec] Automatic MOC and UIC for target QtZeroConfExample [2/5 2.2/sec] Building CXX object CMakeFiles/QtZeroConfExample.dir/QtZeroConfExample_autogen/mocs_compilation.cpp.o [3/5 3.2/sec] Building CXX object CMakeFiles/QtZeroConfExample.dir/main.cpp.o [4/5 3.7/sec] Building CXX object CMakeFiles/QtZeroConfExample.dir/window.cpp.o [5/5 4.5/sec] Linking CXX executable QtZeroConfExample 09:41:23: The process "/usr/bin/cmake" exited normally. 09:41:23: Cannot set up "Build Android APK", not building an APK. Error while building/deploying project QtZeroConfExample (kit: Android Qt 6.5.1 (6.5.1-Android-arm) Clang armeabi-v7a) When executing step "Build Android APK"
You're using Qt 6.5.1 but I added Android support only for 6.6.x and later. Should I fail the Cmake (configure) if it's lower than that?
template
No it didn't built. Let me check.
Fix the build issues.
It doesn't seem right that Qt 6.7 would not compile code that Qt 6.6 does. I suspect something is still wrong. If you want to go ahead with this change, can you make the commits atomic? It is unclear to me why the changes in CMakeList are necessary to fix compiling and why openssl is needed. QtZeroConf and the example both compile with cmake and qmake as is.
Build with Qt 6.7.0 and tested on;