Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.15.8
-
None
Description
I noticed that the android apk deploy code seems to always search for an android binary with the same name as the (topmost) CMake project.
So something like this does not seem to work:
cmake_minimum_required(VERSION 3.5)
project(ProjectName LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
if(ANDROID)
add_library(AppName SHARED main.cpp qml.qrc)
endif()
target_compile_definitions(AppName PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(AppName PRIVATE Qt5::Core Qt5::Quick)
My actual use-case is cmake with subprojects (similar to this), when application name and project name (in the subproject) match. The deploy code seems to only respect the topmost project() call in CMake.
Would it be possible (if it does not already exists), to instead introduce a new CMake call like add_android_app(...), which allows the IDE to unmistakenly identify android apps with the CMake build system?