File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 11file (GLOB shader_headers "*.h" )
22file (GLOB shader_source "*.osl" )
33
4- # FIXME -- is this really necessary?
5- if (${CMAKE_GENERATOR} MATCHES "(Visual Studio.*)" )
6- # Work around visual studio outputting oslc.exe in a subfolder
7- add_custom_command (OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /../oslc/oslc"
8- COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR} /../oslc/${CMAKE_BUILD_TYPE} /oslc.exe" "${CMAKE_CURRENT_BINARY_DIR} /../oslc/"
9- DEPENDS oslc)
10- endif ()
11-
12-
134# Macro to compile a shader with oslc. Syntax is:
145# oslc_compile (OSL osl_source_file
156# [ DEPENDS list_of_dependencies ]
@@ -37,7 +28,7 @@ macro (oslc_compile)
3728 endforeach ()
3829 list (APPEND oslc_args "-I${CMAKE_SOURCE_DIR} /src/shaders" )
3930 add_custom_command (OUTPUT ${osofile}
40- COMMAND oslc ${oslc_args} "${oslfile} " -o "${osofile} "
31+ COMMAND $<TARGET_FILE_DIR: oslc>/$<TARGET_FILE_NAME:oslc> ${oslc_args} "${oslfile} " -o "${osofile} "
4132 MAIN_DEPENDENCY ${oslfile}
4233 DEPENDS ${_shader_DEPENDS} "${stdosl_header} " oslc
4334 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
You can’t perform that action at this time.
0 commit comments