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:
authorRay Molenkamp <github@lazydodo.com>2020-02-12 07:40:23 +0300
committerRay Molenkamp <github@lazydodo.com>2020-02-12 07:40:23 +0300
commitdf1e9b662bd6938f74579cea9d30341f3b6dd02b (patch)
treee71eb89d09b33a06b1fd75f71d683b631ea415ef /intern/cycles/kernel/shaders/CMakeLists.txt
parent6a28d14f7236b3e6fbe7409da9ee916878d65feb (diff)
Cleanup: Fix build warnings from OSL shader compilation
There were to copies of stdosl.h one from stock OSL and one in the cycles tree augmented with cycles specific closures. moved the cycles ones to stdcycles.h and copied the stock stdosl.h and accompanying headers from the OSL shader folder. for further details see D6812. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6812
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