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

[qt6_add_shaders] add shader files to IDE projects

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.1.0 Beta3
    • Build System: CMake
    • None

    Description

      `qt6_add_shaders` compiles the shader sources, however they don't show up in the IDE, because they're not associated with any target.

      it would be a nice convenient feature to list them in IDEs with something like:

      diff --git a/qtshadertools/src/shadertools/Qt6ShaderToolsMacros.cmake b/qtshadertools/src/shadertools/Qt6ShaderToolsMacros.cmake
      index 6a911de5f55..d178cb223e8 100644
      --- a/qtshadertools/src/shadertools/Qt6ShaderToolsMacros.cmake
      +++ b/qtshadertools/src/shadertools/Qt6ShaderToolsMacros.cmake
      @@ -143,6 +143,9 @@ function(qt6_add_shaders_impl target resourcename)
               set_source_files_properties("${qsb_result}" PROPERTIES QT_RESOURCE_ALIAS "${qsb_result_name}")
      
               math(EXPR file_index "${file_index}+1")
      +
      +        set_source_files_properties("${file}" PROPERTIES HEADER_FILE_ONLY true)
      +        target_sources(${target} PRIVATE "${file}")
           endforeach()
      
           if (arg_INTERNAL)
      

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            timblechmann tim blechmann
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes