Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Unknown CMake command _qt_internal_create_global_android_targets

Unknown CMake command _qt_internal_create_global_android_targets

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 355 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Poldi
    wrote on 17 Mar 2024, 23:52 last edited by
    #1

    I'm trying to deploy a small proof of concept tool to Android and am getting

    /home/llist/sec1/git/StrawberryRemote/CMakeLists.txt:13: error: Unknown CMake command "_qt_internal_create_global_android_targets".
    
    Call stack:
      /home/llist/sec1/git/StrawberryRemote/CMakeLists.txt:13 (find_package)
      /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:164 (find_package)
      /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake:40 (include)
      /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
      /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
      /home/llist/Qt/Tools/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
      /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:122 (include)
      /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake:46 (_qt_internal_create_global_android_targets)
    

    SDK.png

    Android.png Device.png

    Thanks

    P 1 Reply Last reply 20 Mar 2024, 21:37
    0
    • P Poldi
      17 Mar 2024, 23:52

      I'm trying to deploy a small proof of concept tool to Android and am getting

      /home/llist/sec1/git/StrawberryRemote/CMakeLists.txt:13: error: Unknown CMake command "_qt_internal_create_global_android_targets".
      
      Call stack:
        /home/llist/sec1/git/StrawberryRemote/CMakeLists.txt:13 (find_package)
        /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:164 (find_package)
        /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake:40 (include)
        /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
        /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
        /home/llist/Qt/Tools/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
        /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:122 (include)
        /home/llist/Qt/6.6.2/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake:46 (_qt_internal_create_global_android_targets)
      

      SDK.png

      Android.png Device.png

      Thanks

      P Offline
      P Offline
      Poldi
      wrote on 20 Mar 2024, 21:37 last edited by
      #2

      @Poldi Given that nobody has replied so far, do you need more info?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jelebruh
        wrote on 27 Mar 2025, 00:13 last edited by jelebruh
        #3

        bump, got with
        sdkmanager "platforms;android-10" "platform-tools" "build-tools;34.0.0" and ndk-r27c

        CMake 3.31.6

        ./configure -init-submodules -submodules qtbase,qtmultimedia,qtlottie
        
        ./configure -prefix ~/qt-android \   
            -android-abis arm64-v8a -android-sdk ~/sources/android-sdk -android-ndk ~/sources/android-ndk-r27c
        
        -- Android build detected
        -- Checking dependencies of submodule 'qtbase'
        -- Checking dependencies of submodule 'qtshadertools'
        -- Checking dependencies of submodule 'qtimageformats'
        -- Checking dependencies of submodule 'qtsvg'
        -- Checking dependencies of submodule 'qtlanguageserver'
        -- Checking dependencies of submodule 'qtdeclarative'
        -- Checking dependencies of submodule 'qtquicktimeline'
        -- Checking dependencies of submodule 'qtquick3d'
        -- Checking dependencies of submodule 'qtmultimedia'
        -- Checking dependencies of submodule 'qtlottie'
        -- Configuring submodule 'qtbase'
        -- [QtBase] CMAKE_BUILD_TYPE was already explicitly set to: 'Release'
        -- Configuring submodule 'qtshadertools'
        CMake Error at qtbase/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake:34 (include):
          include could not find requested file:
        
            /home/bruh/sources/qt-android/qtbase/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake
        Call Stack (most recent call first):
          qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:143 (include)
          qtbase/lib/cmake/Qt6/Qt6Config.cmake:196 (find_package)
          qtshadertools/CMakeLists.txt:16 (find_package)
        
        
        CMake Error at qtbase/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake:35 (_qt_internal_create_global_android_targets):
          Unknown CMake command "_qt_internal_create_global_android_targets".
        Call Stack (most recent call first):
          qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:143 (include)
          qtbase/lib/cmake/Qt6/Qt6Config.cmake:196 (find_package)
          qtshadertools/CMakeLists.txt:16 (find_package)
        
        
        -- Configuring incomplete, errors occurred!
        CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1139 (message):
          CMake exited with code 1.
        
        
        CMake Error at cmake/QtIRProcessHelpers.cmake:173 (message):
          /home/bruh/sources/qt-android/qtbase/configure -top-level -prefix
          /home/bruh/qt-android -android-abis arm64-v8a -android-sdk
          /home/bruh/sources/android-sdk -android-ndk
          /home/bruh/sources/android-ndk-r27c exited with status: 1
        
        Call Stack (most recent call first):
          cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error)
          cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure)
          cmake/QtTopLevelConfigureScript.cmake:17 (qt_tl_run_main_script)
        
        1 Reply Last reply
        0
        • J Offline
          J Offline
          jelebruh
          wrote on 27 Mar 2025, 19:01 last edited by
          #4

          The problem is CMake tries find in /qtbase/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake, but Qt6AndroidMacros in /qtbase/src/corelib. Very stupid solution is change path in qtbase/src/corelib/Qt6CoreConfigExtras.cmake.in line 33 to absolute

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved