diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-16 20:15:34 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-16 20:15:34 +0400 |
commit | 360fcd73fe2868ba32c65697e21ed1bbab8b649a (patch) | |
tree | 29c77024343a26c0358b814e581efaf388a3030a /intern/cycles/kernel/osl | |
parent | 18387f3e3fc4e3fbb9f2cd27d49d12e56975e87c (diff) |
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
Diffstat (limited to 'intern/cycles/kernel/osl')
-rw-r--r-- | intern/cycles/kernel/osl/CMakeLists.txt | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/nodes/CMakeLists.txt | 24 |
2 files changed, 18 insertions, 18 deletions
diff --git a/intern/cycles/kernel/osl/CMakeLists.txt b/intern/cycles/kernel/osl/CMakeLists.txt index 31a162bdd0e..4a3a6f6798a 100644 --- a/intern/cycles/kernel/osl/CMakeLists.txt +++ b/intern/cycles/kernel/osl/CMakeLists.txt @@ -1,7 +1,7 @@ -INCLUDE_DIRECTORIES(. ../ ../svm ../../render ../../util ../../device) +include_directories(. ../ ../svm ../../render ../../util ../../device) -SET(sources +set(sources background.cpp bsdf_ashikhmin_velvet.cpp bsdf_diffuse.cpp @@ -19,15 +19,15 @@ SET(sources osl_shader.cpp vol_subsurface.cpp) -SET(headers +set(headers osl_closures.h osl_globals.h osl_services.h osl_shader.h) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}") -ADD_LIBRARY(cycles_kernel_osl ${sources} ${headers}) +add_library(cycles_kernel_osl ${sources} ${headers}) -ADD_SUBDIRECTORY(nodes) +add_subdirectory(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) |