Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-117509

Examples that set OUTPUT_NAME will not build for Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2.10, 6.5.4, 6.6.1, 6.7.0 FF
    • 6.6
    • Build System: CMake
    • None
    • Windows host, x86_64 and arm7 and 8 affected Android targets

      At 6.6.0 qt creator 11.02
    • Android
    • 9349e463d (dev), 416081ef4 (6.6), 88d62ca1a (6.5), 2faaa1dc0 (tqtc/lts-6.2)

    Description

      Description

      When building for Android Examples with 

      set_target_properties(examplename PROPERTIES
          #Prevent name clash with build subdirectory on case-insensitive file systems
          OUTPUT_NAME examplename
      )

      we get the warning

      C:\Qt\6.6.0\android_x86_64\lib\cmake\Qt6Core\Qt6CoreMacros.cmake:2754: warning: Qt policy QTP0002 is not set: Target properties that specify android-specific paths may contain generator expressions but they must evaluate to valid JSON strings.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0002.html for policy details. Use the qt_policy command to set the policy and suppress this warning. C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:926 (__qt_internal_setup_policy) C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:65 (_qt_internal_android_format_deployment_paths) C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:1352 (qt6_android_generate_deployment_settings) C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:651 (_qt_internal_android_executable_finalizer) C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:651 (cmake_language) C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (_qt_internal_finalize_executable) C:/Qt/6.6.0/android_x86_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:715:EVAL:1 (qt6_finalize_target) CMakeLists.txt:DEFERRED

      Then the error "Target is not an application so not building an APK"

      and then "Cannot read from deployment settings json"

      Investigation:

      So, setting the policy fixes this:

      qt_policy(SET QTP0002 NEW)

      Examples affected 

      qml under vulkan

      1. https://doc.qt.io/qt-6/qtquick-scenegraph-d3d11underqml-example.html

       

       

       

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              semlanik Alexey Edelev
              nick_bennett Nicholas Bennett
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: