Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r--intern/cycles/kernel/shaders/CMakeLists.txt11
1 files changed, 1 insertions, 10 deletions
diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt
index 958ebe2f04e..9dcedc9ba19 100644
--- a/intern/cycles/kernel/shaders/CMakeLists.txt
+++ b/intern/cycles/kernel/shaders/CMakeLists.txt
@@ -96,15 +96,6 @@ set(SRC_OSL
node_rgb_to_bw.osl
)
-# FindOSL.cmake does not give us the location of the shader library
-# but generally it can be figured out from the location of the oslc
-# compiler. However if this fails you can set OSL_SHADER_DIR to
-# bypass the auto discovery.
-if(NOT DEFINED OSL_SHADER_DIR)
- get_filename_component(OSL_SHADER_DIR ${OSL_COMPILER} DIRECTORY)
- get_filename_component(OSL_SHADER_DIR ${OSL_SHADER_DIR}/../shaders ABSOLUTE)
-endif()
-
# The headers that OSL ships differs per release so we can not
# hardcode this.
file(GLOB SRC_OSL_HEADER_DIST ${OSL_SHADER_DIR}/*.h)
@@ -132,7 +123,7 @@ foreach(_file ${SRC_OSL})
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _OSO_FILE ${_OSO_FILE})
add_custom_command(
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}" -I"${OSL_SHADER_DIR}" -o ${_OSO_FILE} ${_OSL_FILE}
DEPENDS ${_OSL_FILE} ${SRC_OSL_HEADERS} ${OSL_COMPILER})
list(APPEND SRC_OSO
${_OSO_FILE}