Skip to content

Commit

Permalink
fixed shader install target
Browse files Browse the repository at this point in the history
  • Loading branch information
hakasapl committed Jul 23, 2024
1 parent e9682c0 commit de20834
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ foreach(FILE ${HLSL_COMPUTE_SHADER_FILES})
get_source_file_property(shadertype ${FILE} ShaderType)
get_source_file_property(shadermodel ${FILE} ShaderModel)
add_custom_command(TARGET shaders
COMMAND fxc.exe /nologo /Emain /T${shadertype}_${shadermodel} $<IF:$<CONFIG:DEBUG>,/Od,/O1> /Zi /Fo ${CMAKE_BINARY_DIR}/shaders/${FILE_WE}.cso /Fd ${CMAKE_BINARY_DIR}/shaders/${FILE_WE}.pdb ${FILE}
COMMAND fxc.exe /nologo /Emain /T${shadertype}_${shadermodel} $<IF:$<CONFIG:DEBUG>,/Od,/O1> /Zi /Fo ${CMAKE_BINARY_DIR}/shaders/${FILE_WE}.cso /Fd ${CMAKE_BINARY_DIR}/${FILE_WE}.pdb ${FILE}
MAIN_DEPENDENCY ${FILE}
COMMENT "HLSL ${FILE}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -150,8 +150,7 @@ install(FILES ${CMAKE_BINARY_DIR}/lz4.dll DESTINATION . )
install(FILES ${CMAKE_BINARY_DIR}/zlib1.dll DESTINATION . )

# Copy compiled shaders to install
file(GLOB CSO_FILES "${CMAKE_BINARY_DIR}/shaders/*.cso")
install(FILES ${CSO_FILES} DESTINATION ./shaders/ )
install(DIRECTORY ${CMAKE_BINARY_DIR}/shaders DESTINATION . )

# Copy assets to install
install(DIRECTORY ${CMAKE_BINARY_DIR}/assets DESTINATION . )

0 comments on commit de20834

Please sign in to comment.