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/CMakeLists.txt')
-rw-r--r--intern/cycles/kernel/shaders/CMakeLists.txt19
1 files changed, 15 insertions, 4 deletions
diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt
index f4258da70d3..8605f23b8fa 100644
--- a/intern/cycles/kernel/shaders/CMakeLists.txt
+++ b/intern/cycles/kernel/shaders/CMakeLists.txt
@@ -95,16 +95,27 @@ 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)
+
set(SRC_OSL_HEADERS
node_color.h
node_fresnel.h
node_hash.h
node_noise.h
node_ramp_util.h
- stdosl.h
- oslutil.h
- vector2.h
- vector4.h
+ stdcycles.h
+ ${SRC_OSL_HEADER_DIST}
)
set(SRC_OSO