diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 080d2ef79dc..b586a7c6b16 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -224,10 +224,6 @@ endif() if(WITH_CYCLES_OSL) add_definitions(-DWITH_OSL) - # osl 1.9.x - add_definitions(-DOSL_STATIC_BUILD) - # pre 1.9 - add_definitions(-DOSL_STATIC_LIBRARY) include_directories( SYSTEM ${OSL_INCLUDE_DIR} diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt index 517ce4c6407..c8faca4175c 100644 --- a/intern/cycles/blender/CMakeLists.txt +++ b/intern/cycles/blender/CMakeLists.txt @@ -142,6 +142,12 @@ if(WITH_OPENIMAGEDENOISE) ) endif() +if(WITH_CYCLES_OSL) + list(APPEND LIB + ${OSL_LIBRARIES} + ) +endif() + blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") add_dependencies(bf_intern_cycles bf_rna) diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt index 7d2cac41b8c..e2939ef08da 100644 --- a/intern/cycles/device/CMakeLists.txt +++ b/intern/cycles/device/CMakeLists.txt @@ -203,6 +203,13 @@ if(WITH_OPENIMAGEDENOISE) ) endif() +if(WITH_CYCLES_OSL) + list(APPEND LIB + ${OSL_LIBRARIES} + ) +endif() + + include_directories(${INC}) include_directories(SYSTEM ${INC_SYS}) diff --git a/intern/cycles/scene/CMakeLists.txt b/intern/cycles/scene/CMakeLists.txt index ce4093cdf03..874b38525ed 100644 --- a/intern/cycles/scene/CMakeLists.txt +++ b/intern/cycles/scene/CMakeLists.txt @@ -107,6 +107,7 @@ endif() if(WITH_CYCLES_OSL) list(APPEND LIB cycles_kernel_osl + ${OSL_LIBRARIES} ) endif()