CMake/win: Fix linker issue with OCIO

In certain CMake configurations it was possible
that OCIO gave linker errors due to it thinking
it was using the shared library rather than the
static library we ship.
This commit is contained in:
Ray molenkamp 2021-06-23 08:45:37 -06:00
parent 354ecc2f1e
commit 7561e3dad0
2 changed files with 2 additions and 5 deletions

View File

@ -550,7 +550,6 @@ if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
set(OPENCOLORIO_DEFINITIONS "-DDOpenColorIO_SKIP_IMPORTS")
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
add_definitions(-DOIIO_STATIC_DEFINE)
add_definitions(-DOIIO_NO_SSE=1)
@ -596,7 +595,7 @@ if(WITH_OPENCOLORIO)
debug ${OPENCOLORIO_LIBPATH}/libexpatdMD.lib
debug ${OPENCOLORIO_LIBPATH}/pystring_d.lib
)
set(OPENCOLORIO_DEFINITIONS)
set(OPENCOLORIO_DEFINITIONS "-DOpenColorIO_SKIP_IMPORTS")
endif()
if(WITH_OPENVDB)

View File

@ -48,6 +48,7 @@ if(WITH_OPENCOLORIO)
)
add_definitions(${GL_DEFINITIONS})
add_definitions(${OPENCOLORIO_DEFINITIONS})
list(APPEND INC_SYS
${OPENCOLORIO_INCLUDE_DIRS}
@ -67,9 +68,6 @@ if(WITH_OPENCOLORIO)
list(APPEND INC_SYS
${BOOST_INCLUDE_DIR}
)
add_definitions(
-DOpenColorIO_STATIC
)
list(APPEND LIB
${BOOST_LIBRARIES}
)