shaders: Use different names for qt6_add_shaders calls (#517)
Otherwise it won't work for WAsm. According to the doc: "The name after the project has to be unique for each call."
This commit is contained in:
parent
8f89e38ec3
commit
824c2673a7
|
@ -149,7 +149,7 @@ function(qsk_add_example target)
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(qsk_add_shaders target)
|
function(qsk_add_shaders target shader_name)
|
||||||
|
|
||||||
cmake_parse_arguments( arg "" "" "FILES" ${ARGN} )
|
cmake_parse_arguments( arg "" "" "FILES" ${ARGN} )
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ function(qsk_add_shaders target)
|
||||||
list(APPEND outfiles "${qsbname}.qsb")
|
list(APPEND outfiles "${qsbname}.qsb")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
qt6_add_shaders( ${target} "qskshaders" BATCHABLE PRECOMPILE QUIET
|
qt6_add_shaders( ${target} ${shader_name} BATCHABLE PRECOMPILE QUIET
|
||||||
PREFIX "/qskinny/shaders" ${ARGV} OUTPUTS ${outfiles} )
|
PREFIX "/qskinny/shaders" ${ARGV} OUTPUTS ${outfiles} )
|
||||||
|
|
||||||
# pass on OUTPUT_TARGETS to the caller of this function
|
# pass on OUTPUT_TARGETS to the caller of this function
|
||||||
|
|
|
@ -35,6 +35,6 @@ if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
|
||||||
shaders/arcshadow-vulkan.vert
|
shaders/arcshadow-vulkan.vert
|
||||||
shaders/arcshadow-vulkan.frag
|
shaders/arcshadow-vulkan.frag
|
||||||
)
|
)
|
||||||
qsk_add_shaders( ${target} FILES ${SHADERS} OUTPUT_TARGETS shader_target)
|
qsk_add_shaders( ${target} "qskArcShaders" FILES ${SHADERS} OUTPUT_TARGETS shader_target)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -510,7 +510,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
|
if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
|
||||||
qsk_add_shaders( ${target} FILES ${SHADERS} OUTPUT_TARGETS shader_target)
|
qsk_add_shaders( ${target} "qskshaders" FILES ${SHADERS} OUTPUT_TARGETS shader_target)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(${target} PUBLIC
|
target_include_directories(${target} PUBLIC
|
||||||
|
|
Loading…
Reference in New Issue