Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.1.0 Beta3
-
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)