Compile OpenColorIO (with python binding) on CentOS 7
Tested on version 2.3.0
Dependencies
- cmake (tested with v3.28.20231017)
- gcc (tested with v6.5.0)
- pystirng (tested with v1.1.4)
- openexr (tested with v3.2.1)
- python (tested with v3.10)
Get source
You can get source from GitHub
Ensure you have python 3.10 in your PATH environment variable before running the following commands.
Compile
bash
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release\
-DCMAKE_INSTALL_PREFIX=<OPENCOLORIO_SOURCE_DIR>/install\
-DCMAKE_CXX_FLAGS="-Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"\
-DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF\
-Dpystring_ROOT=<PYSTRING_SOURCE_DIR>/install\
-Dpystring_LIBRARY=<PYSTRING_SOURCE_DIR>/install/lib64/libpystring.so\
-Dpystring_INCLUDE_DIR=<PYSTRING_SOURCE_DIR>\
-DOpenEXR_ROOT=<OPENEXR_SOURCE_DIR>/install\
-DOpenEXR_LIBRARY=<OPENEXR_SOURCE_DIR>/install/lib64/libOpenEXR.so\
-DOpenEXR_DIR=<OPENEXR_SOURCE_DIR>-DOpenEXR_INCLUDE_DIR=<OPENEXR_SOURCE_DIR>/install/include
cmake --build ./build --target install --config Release