Skip to content

Commit 4c487b1

Browse files
build: Help OpenImageIO find OpenColorIO (#1220)
### Help OpenImageIO find OpenColorIO ### Linked issues none ### Summarize your change. Add more hint to allow OpenImageIO to find OpenColorIO. It looks like OIIO 3.X has changed something that make it more strict. ### Describe the reason for the change. Builds are failing. ### Describe what you have tested and on which operating system. CI ### Add a list of changes, and note any that might need special attention during the review. ### If possible, provide screenshots. --------- Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
1 parent 2889e3c commit 4c487b1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cmake/dependencies/oiio.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,18 @@ LIST(APPEND _byproducts ${_byprojects_copy})
4848
# The '_configure_options' list gets reset and initialized in 'RV_CREATE_STANDARD_DEPS_VARIABLES'
4949
LIST(APPEND _configure_options "-DBUILD_TESTING=OFF")
5050
LIST(APPEND _configure_options "-DUSE_PYTHON=0") # this on would requireextra pybind11 package
51+
# OIIO 3.x still calls find_package(Python3) even with USE_PYTHON=0. Point it to our custom Python to prevent finding the system Python (e.g. 3.14 from GitHub
52+
# runner toolcache).
53+
LIST(APPEND _configure_options "-DPython3_ROOT_DIR=${RV_DEPS_BASE_DIR}/RV_DEPS_PYTHON3/install")
54+
LIST(APPEND _configure_options "-DPython3_FIND_STRATEGY=LOCATION")
55+
LIST(APPEND _configure_options "-DPython3_FIND_REGISTRY=NEVER")
5156
LIST(APPEND _configure_options "-DUSE_OCIO=ON")
5257
LIST(APPEND _configure_options "-DOpenColorIO_ROOT=${RV_DEPS_OCIO_ROOT_DIR}")
58+
IF(RHEL_VERBOSE)
59+
LIST(APPEND _configure_options "-DOpenColorIO_DIR=${RV_DEPS_OCIO_ROOT_DIR}/lib64/cmake/OpenColorIO")
60+
ELSE()
61+
LIST(APPEND _configure_options "-DOpenColorIO_DIR=${RV_DEPS_OCIO_ROOT_DIR}/lib/cmake/OpenColorIO")
62+
ENDIF()
5363
LIST(APPEND _configure_options "-DUSE_FREETYPE=0")
5464
LIST(APPEND _configure_options "-DUSE_GIF=OFF")
5565

0 commit comments

Comments
 (0)