CMake: Make OSL's .oso shaders building also dependent on OSL compiler!
Otherwise, you can update OSL and not get .oso files regenerated, which is a quite funny way to crash Blender...
This commit is contained in:
@@ -103,7 +103,7 @@ foreach(_file ${SRC_OSL})
|
|||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${_OSO_FILE}
|
OUTPUT ${_OSO_FILE}
|
||||||
COMMAND ${OSL_COMPILER} -q -O2 -I"${CMAKE_CURRENT_SOURCE_DIR}" -o ${_OSO_FILE} ${_OSL_FILE}
|
COMMAND ${OSL_COMPILER} -q -O2 -I"${CMAKE_CURRENT_SOURCE_DIR}" -o ${_OSO_FILE} ${_OSL_FILE}
|
||||||
DEPENDS ${_OSL_FILE} ${SRC_OSL_HEADERS})
|
DEPENDS ${_OSL_FILE} ${SRC_OSL_HEADERS} ${OSL_COMPILER})
|
||||||
list(APPEND SRC_OSO
|
list(APPEND SRC_OSO
|
||||||
${_OSO_FILE}
|
${_OSO_FILE}
|
||||||
)
|
)
|
||||||
@@ -112,7 +112,7 @@ foreach(_file ${SRC_OSL})
|
|||||||
unset(_OSO_FILE)
|
unset(_OSO_FILE)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_custom_target(cycles_osl_shaders ALL DEPENDS ${SRC_OSO} ${SRC_OSL_HEADERS})
|
add_custom_target(cycles_osl_shaders ALL DEPENDS ${SRC_OSO} ${SRC_OSL_HEADERS} ${OSL_COMPILER})
|
||||||
|
|
||||||
# CMAKE_CURRENT_SOURCE_DIR is already included in OSO paths
|
# CMAKE_CURRENT_SOURCE_DIR is already included in OSO paths
|
||||||
delayed_install("" "${SRC_OSO}" ${CYCLES_INSTALL_PATH}/shader)
|
delayed_install("" "${SRC_OSO}" ${CYCLES_INSTALL_PATH}/shader)
|
||||||
|
Reference in New Issue
Block a user