diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-08-28 04:37:55 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-08-28 04:38:31 +0300 |
commit | 5e8a030a08b73a1fbd94ed11dcc51d26f1c27dad (patch) | |
tree | e3b803f98ea30bc97a70267fb736cea6d2cbe699 /intern | |
parent | 6dd394bf02b121a61fb8bdf153b778330a3d9320 (diff) |
cmake: adjustments required for lib-upgrade on windows.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/CMakeLists.txt | 3 | ||||
-rw-r--r-- | intern/cycles/render/osl.cpp | 9 | ||||
-rw-r--r-- | intern/opencolorio/CMakeLists.txt | 3 | ||||
-rw-r--r-- | intern/openvdb/CMakeLists.txt | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 00ac8e7e182..0147a4306f4 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -200,6 +200,9 @@ 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 diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index fdd872f62b9..2bf69c869b9 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -28,6 +28,7 @@ #include "kernel/osl/osl_globals.h" #include "kernel/osl/osl_services.h" #include "kernel/osl/osl_shader.h" +#include "OSL/llvm_util.h" #include "util/util_foreach.h" #include "util/util_logging.h" @@ -66,6 +67,14 @@ OSLShaderManager::~OSLShaderManager() { shading_system_free(); texture_system_free(); +#ifdef OSL_HAS_BLENDER_CLEANUP_FIX + /* There is a problem with llvm+osl: The order global destructors across + * different compilation units run cannot be guaranteed, on windows this means + * that the llvm destructors run before the osl destructors, causing a crash + * when the process exits. the OSL in svn has a special cleanup hack to + * sidestep this behavior */ + OSL::pvt::LLVM_Util::Cleanup(); +#endif } void OSLShaderManager::reset(Scene * /*scene*/) diff --git a/intern/opencolorio/CMakeLists.txt b/intern/opencolorio/CMakeLists.txt index 75e228933aa..ac2c95d4b63 100644 --- a/intern/opencolorio/CMakeLists.txt +++ b/intern/opencolorio/CMakeLists.txt @@ -63,6 +63,9 @@ if(WITH_OPENCOLORIO) list(APPEND INC_SYS ${BOOST_INCLUDE_DIR} ) + add_definitions( + -DOpenColorIO_STATIC + ) endif() data_to_c_simple(gpu_shader_display_transform.glsl SRC) diff --git a/intern/openvdb/CMakeLists.txt b/intern/openvdb/CMakeLists.txt index f666dc78e75..9ac0817903b 100644 --- a/intern/openvdb/CMakeLists.txt +++ b/intern/openvdb/CMakeLists.txt @@ -38,6 +38,7 @@ set(SRC if(WITH_OPENVDB) add_definitions( -DWITH_OPENVDB + ${OPENVDB_DEFINITIONS} ) if(WITH_OPENVDB_3_ABI_COMPATIBLE) |