cmake: adjustments required for lib-upgrade on windows.

This commit is contained in:
Ray Molenkamp
2018-08-27 19:37:55 -06:00
parent 6dd394bf02
commit 5e8a030a08
7 changed files with 62 additions and 42 deletions

View File

@@ -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

View File

@@ -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*/)

View File

@@ -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)

View File

@@ -38,6 +38,7 @@ set(SRC
if(WITH_OPENVDB)
add_definitions(
-DWITH_OPENVDB
${OPENVDB_DEFINITIONS}
)
if(WITH_OPENVDB_3_ABI_COMPATIBLE)