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

qt_add_shaders is not executed if the target does not exist

XMLWordPrintable

    • All
    • 8cd3d1849 (dev), d1c2311b1 (6.6), 5b7e5373e (6.5), d1da28ef0 (tqtc/lts-6.5)

      I am trying to use qt_add_shaders() in a CMakeLists.txt file where I create a module with qt_add_qml_module().

      It seems qt_add_shaders() is not executed in that case. If I used a target with qt_add_library() it works but it would be good to be able to use qt_add_shaders() with only qt_add_qml_module().

       

      project(shaderModule)
      cmake_minimum_required(VERSION 3.16)

      #qt_add_library(${PROJECT_NAME} STATIC) #needed for qt_add_shader() to be called

      qt_add_shaders(${PROJECT_NAME} "shaders"
          #BATCHABLE
          #PRECOMPILE
          #OPTIMIZED
          PREFIX "MyShaders"
          FILES
              "line.frag"
      )

      qt_add_qml_module(${PROJECT_NAME}
          URI ${PROJECT_NAME}
      )

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

            semlanik Alexey Edelev
            pijaouen Pierre Jaouen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes