qgroundcontrol
qgroundcontrol copied to clipboard
Fixing CMake build implementation
Here are a few issues to resolve getting android to build with cmake:
- SDL inclusion is set to required with Android.
- OpenGL inclusion is set to required with Android.
- AddQtAndroidApk.cmake needs to be updated for Qt6, you don't need the custom call to androiddeployqt if qt_add_executable is setup correctly.
Some additional notes:
- Make cmake_minimum_required to 3.21.1 (required for MacOS).
- For builds other than Android, qt_generate_deploy_qml_app_script can be used to simplify deploying.
- qt_add_library should be used instead of add_library
- qt_add_plugin can be used for the QtLocation portion instead of add_library
- qt_add_qml_module should be used instead of add_custom_target
- If qmake is ever dropped fully, set_source_files_properties with QT_QML_SINGLETON_TYPE can be used to register qml singletons
- If qmake is ever dropped fully, most submodules and provided windows libraries can be dropped for a fetchcontent.
- qt_standard_project_setup should be called
@DonLakeFlyer I will fix CMake stuff and test with Android & Linux after some of my other stuff.