Build: Avoiding linking against system yaml-cpp and pystring on macOS
OpenColorIO is now a dynamic library, and these are included in it. The legacy code for the static library case was causing the Homebrew libraries to be found and linked to. Pull Request: https://projects.blender.org/blender/blender/pulls/139087
This commit is contained in:
committed by
Brecht Van Lommel
parent
498dd0e224
commit
d10493aa21
@@ -24,14 +24,6 @@ else()
|
||||
set(OPENCOLORIO_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_opencolorio_FIND_COMPONENTS
|
||||
OpenColorIO
|
||||
yaml-cpp
|
||||
expat
|
||||
pystring
|
||||
minizip
|
||||
)
|
||||
|
||||
set(_opencolorio_SEARCH_DIRS
|
||||
${OPENCOLORIO_ROOT_DIR}
|
||||
/opt/lib/ocio
|
||||
@@ -47,21 +39,16 @@ find_path(OPENCOLORIO_INCLUDE_DIR
|
||||
)
|
||||
|
||||
set(_opencolorio_LIBRARIES)
|
||||
foreach(COMPONENT ${_opencolorio_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
find_library(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_opencolorio_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib lib64/static lib/static
|
||||
)
|
||||
if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
list(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
|
||||
endif()
|
||||
endforeach()
|
||||
find_library(OPENCOLORIO_OPENCOLORIO_LIBRARY
|
||||
NAMES
|
||||
OpenColorIO
|
||||
HINTS
|
||||
${_opencolorio_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib lib64/static lib/static
|
||||
)
|
||||
list(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_OPENCOLORIO_LIBRARY}")
|
||||
|
||||
if(EXISTS "${OPENCOLORIO_INCLUDE_DIR}/OpenColorIO/OpenColorABI.h")
|
||||
# Search twice, because this symbol changed between OCIO 1.x and 2.x
|
||||
@@ -90,16 +77,11 @@ endif()
|
||||
mark_as_advanced(
|
||||
OPENCOLORIO_INCLUDE_DIR
|
||||
OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_VERSION
|
||||
)
|
||||
|
||||
foreach(COMPONENT ${_opencolorio_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
mark_as_advanced(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
endforeach()
|
||||
|
||||
unset(COMPONENT)
|
||||
unset(UPPERCOMPONENT)
|
||||
unset(_opencolorio_FIND_COMPONENTS)
|
||||
unset(_opencolorio_LIBRARIES)
|
||||
unset(_opencolorio_SEARCH_DIRS)
|
||||
|
||||
Reference in New Issue
Block a user