From 360fcd73fe2868ba32c65697e21ed1bbab8b649a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Aug 2011 16:15:34 +0000 Subject: Cycles: * add some (disabled) test code for using OpenImageIO in imbuf * link cycles, openimageio and boost into blender instead of a shared library * some cmakefile changes to simplify the code and follow conventions better * this may solve running cycles problems on windows XP, or give a different and hopefully more useful error message --- intern/cycles/kernel/osl/nodes/CMakeLists.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'intern/cycles/kernel/osl/nodes') diff --git a/intern/cycles/kernel/osl/nodes/CMakeLists.txt b/intern/cycles/kernel/osl/nodes/CMakeLists.txt index 56e8ba0b5b6..365cc42ad6b 100644 --- a/intern/cycles/kernel/osl/nodes/CMakeLists.txt +++ b/intern/cycles/kernel/osl/nodes/CMakeLists.txt @@ -1,7 +1,7 @@ # OSL node shaders -SET(osl_sources +set(osl_sources node_add_closure.osl node_attribute.osl node_background.osl @@ -46,24 +46,24 @@ SET(osl_sources node_ward_bsdf.osl node_wood_texture.osl) -SET(osl_headers +set(osl_headers node_texture.h stdosl.h) -SET(oso_sources) +set(oso_sources) -FOREACH(_file ${osl_sources}) - SET(osl_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file}) - STRING(REPLACE ".osl" ".oso" oso_file ${osl_file}) - STRING(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} oso_file ${oso_file}) - ADD_CUSTOM_COMMAND( +foreach(_file ${osl_sources}) + set(osl_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file}) + string(REPLACE ".osl" ".oso" oso_file ${osl_file}) + string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} oso_file ${oso_file}) + add_custom_command( OUTPUT ${oso_file} COMMAND ${OSL_COMPILER} -O2 ${osl_file} DEPENDS ${osl_file} ${osl_headers}) - LIST(APPEND oso_sources ${oso_file}) -ENDFOREACH() + list(APPEND oso_sources ${oso_file}) +endforeach() -ADD_CUSTOM_TARGET(shader ALL DEPENDS ${oso_sources} ${osl_headers}) +add_custom_target(shader ALL DEPENDS ${oso_sources} ${osl_headers}) -INSTALL(FILES ${oso_sources} DESTINATION ${CYCLES_INSTALL_PATH}/cycles/shader) +delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${oso_sources}" ${CYCLES_INSTALL_PATH}/shader) -- cgit v1.2.3