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

[iOS] CMake shader handling fails

XMLWordPrintable

    • iOS/tvOS/watchOS
    • 2e2ad7d991 (qt/qtshadertools/dev) d1412e562b (qt/qtshadertools/6.4) d1412e562b (qt/tqtc-qtshadertools/6.4) 2e2ad7d991 (qt/tqtc-qtshadertools/dev) db8104f221 (qt/qtshadertools/6.3) 1604726bd7 (qt/tqtc-qtshadertools/6.2) db8104f221 (qt/qtshadertools/6.3.2)

      Defining a shader in CMakeLists.txt fails for iOS, but works fine in all other platforms.

      qt_add_shaders(duck_track "shaders"
          PREFIX
              "/"
          FILES
              "shadow.frag"
      )
      

      Running cmake results in

      -- Using Qt bundled PCRE2.
      -- Could NOT find EGL (missing: EGL_INCLUDE_DIR HAVE_EGL EGL_LIBRARY)  
      -- Using Qt bundled PNG.
      -- Using Qt bundled Harfbuzz.
      -- Using Qt bundled Freetype.
      -- Could NOT find EGL (missing: EGL_INCLUDE_DIR HAVE_EGL EGL_LIBRARY)  
      -- Using Qt bundled Jpeg.
      shadow.frag -> shadow.frag.qsb exposed as ://shadow.frag.qsb
      -- Configuring done
      -- Generating done
      CMake Error in duck/track/CMakeLists.txt:
        The custom command generating
      
          /Users/prcs1076/build-localist-Qt_6_3_0_for_iOS/duck/track/.qsb/shadow.frag.qsb
      
        is attached to multiple targets:
      
          duck_track_other_files
          duck_track_resources_1
      
        but none of these is a common dependency of the other(s).  This is not
        allowed by the Xcode "new build system".
      
      CMake Generate step failed.  Build files cannot be regenerated correctly.
      CMake process exited with exit code 1.
      

      The attached example reproduces it with stock 6.3 + iOS target.

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

            alexandru.croitor Alexandru Croitor
            cajus Cajus Pollmeier
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: