[Bf-blender-cvs] [76d1201] master: Fix OSL shaders building with some versions of that lib.

Bastien Montagne noreply at git.blender.org
Sat Dec 5 00:52:58 CET 2015


Commit: 76d1201996c9b23bc4cb8c1c6394081cb139ed06
Author: Bastien Montagne
Date:   Sat Dec 5 00:17:04 2015 +0100
Branches: master
https://developer.blender.org/rB76d1201996c9b23bc4cb8c1c6394081cb139ed06

Fix OSL shaders building with some versions of that lib.

This must have happened months ago, but as I did not `make clean` any build folder since then,
so only noted that today.

Issue is same as dirty patch we have to apply to ODL sources before building it in install_deps.sh - for
some mysterious reason, it has become impossible to compoile .osl files into .oso ones without
giving explicit output file name (otherwise it just produces `.oso` file - utterly stupid and useless).

We could probably fix that in own OSL source, but think being explicit here does not hurt anyway, so...
Let's go the easy way.

===================================================================

M	intern/cycles/kernel/shaders/CMakeLists.txt

===================================================================

diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt
index 8193146..568ea56 100644
--- a/intern/cycles/kernel/shaders/CMakeLists.txt
+++ b/intern/cycles/kernel/shaders/CMakeLists.txt
@@ -102,7 +102,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}" ${_OSL_FILE}
+		COMMAND ${OSL_COMPILER} -q -O2  -I"${CMAKE_CURRENT_SOURCE_DIR}" -o ${_OSO_FILE} ${_OSL_FILE}
 		DEPENDS ${_OSL_FILE} ${SRC_OSL_HEADERS})
 	list(APPEND SRC_OSO
 		${_OSO_FILE}




More information about the Bf-blender-cvs mailing list