mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: Cycles, missing OSL headers in install
Some headers and precompiled shaders were not properly installed. This seems to be a regression since !153424: our custom FindOSL used to define OSL_SHADER_DIR. It is not defined by the CMake configs from the OSL. Pull Request: https://projects.blender.org/blender/blender/pulls/154576
This commit is contained in:
parent
f05fea4d7f
commit
3a0682c527
1 changed files with 24 additions and 0 deletions
|
|
@ -107,6 +107,30 @@ set(SRC_OSL
|
|||
node_rgb_to_bw.osl
|
||||
)
|
||||
|
||||
get_filename_component(OSL_SHADER_HINT ${OSL_COMPILER} DIRECTORY)
|
||||
find_path(OSL_SHADER_DIR
|
||||
NAMES
|
||||
stdosl.h
|
||||
HINTS
|
||||
${OSL_SHADER_HINT}
|
||||
${OSL_SHADER_HINT}/../
|
||||
${OSL_ROOT_DIR}
|
||||
${OSL_HOME_DIR}
|
||||
/usr/share/OSL/
|
||||
/usr/include/OSL/
|
||||
PATH_SUFFIXES
|
||||
share/OSL/shaders
|
||||
shaders
|
||||
)
|
||||
|
||||
if(NOT EXISTS "${OSL_SHADER_DIR}")
|
||||
if(WITH_STRICT_BUILD_OPTIONS)
|
||||
message(SEND_ERROR "Precompiled OSL shader headers are not found, stopping")
|
||||
else()
|
||||
message(STATUS "Precompiled OSL shader headers are not found, continuing without")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# The headers that OSL ships differs per release so we can not
|
||||
# hard-code this.
|
||||
file(GLOB SRC_OSL_HEADER_DIST ${OSL_SHADER_DIR}/*.h)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue