From a4a113af3fc5961739688e2d27bb9bf5d6e02af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Fri, 19 Sep 2025 12:12:13 +0100 Subject: [PATCH 01/13] Bump dependencies and update CI workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/analysis_workflow.yml | 2 +- .github/workflows/ci_workflow.yml | 158 +++++++++--------- .github/workflows/dependencies_latest.yml | 116 +++++-------- .github/workflows/platform_latest.yml | 18 +- .github/workflows/wheel_workflow.yml | 62 +++---- CMakeLists.txt | 2 +- docs/quick_start/installation.rst | 16 +- pyproject.toml | 4 +- setup.cfg | 5 +- share/ci/scripts/multi/install_yaml-cpp.sh | 4 +- share/cmake/macros/GetPythonPreCommand.cmake | 12 +- share/cmake/modules/FindExtPackages.cmake | 43 +++-- share/cmake/modules/Findyaml-cpp.cmake | 11 -- .../modules/install/InstallOpenEXR.cmake | 15 +- .../modules/install/Installminizip-ng.cmake | 12 +- .../cmake/modules/install/Installopenfx.cmake | 6 +- .../modules/install/Installpybind11.cmake | 8 + .../modules/install/Installyaml-cpp.cmake | 15 +- share/cmake/utils/CompilerFlags.cmake | 13 +- share/cmake/utils/CppVersion.cmake | 43 +++-- src/OpenColorIO/CMakeLists.txt | 2 +- src/OpenColorIO/SystemMonitor_macos.cpp | 6 +- tests/cpu/CMakeLists.txt | 2 +- tests/cpu/fileformats/FileFormatCTF_tests.cpp | 2 +- .../context_test1/context_test1_windows.ocioz | Bin 3938 -> 3966 bytes 25 files changed, 278 insertions(+), 299 deletions(-) diff --git a/.github/workflows/analysis_workflow.yml b/.github/workflows/analysis_workflow.yml index f465b51098..d722232129 100644 --- a/.github/workflows/analysis_workflow.yml +++ b/.github/workflows/analysis_workflow.yml @@ -59,7 +59,7 @@ jobs: cmake ../. \ -DCMAKE_INSTALL_PREFIX=../_install \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" \ -DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \ -DCMAKE_EXE_LINKER_FLAGS="-lgcov" \ diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index ffb0c4c10e..f76a61205f 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -61,9 +61,51 @@ jobs: strategy: fail-fast: true matrix: - build: [7, 8, 9, 10, 11, 12] + build: [7, 8, 9, 10, 11, 12, 13, 14, 15] include: # ------------------------------------------------------------------- + # VFX CY2025 (Python 3.11) + # ------------------------------------------------------------------- + - build: 15 + build-type: Debug + build-shared: 'ON' + build-docs: 'OFF' + build-openfx: 'ON' + use-simd: 'ON' + use-oiio: 'ON' + cxx-standard: 20 + cxx-compiler: clang++ + cc-compiler: clang + compiler-desc: Clang + vfx-cy: 2025 + install-ext-packages: MISSING + - build: 14 + build-type: Release + build-shared: 'ON' + build-docs: 'ON' + build-openfx: 'ON' + use-simd: 'OFF' + use-oiio: 'OFF' + cxx-standard: 17 + cxx-compiler: g++ + cc-compiler: gcc + compiler-desc: GCC + vfx-cy: 2025 + install-ext-packages: ALL + - build: 13 + build-type: Release + build-shared: 'OFF' + build-docs: 'OFF' + build-openfx: 'OFF' + use-simd: 'ON' + use-oiio: 'OFF' + cxx-standard: 17 + cxx-compiler: g++ + cc-compiler: gcc + compiler-desc: GCC + vfx-cy: 2025 + install-ext-packages: ALL + # ------------------------------------------------------------------- # VFX CY2024 (Python 3.11) # ------------------------------------------------------------------- - build: 12 @@ -73,7 +115,7 @@ jobs: build-openfx: 'ON' use-simd: 'ON' use-oiio: 'ON' - cxx-standard: 17 + cxx-standard: 20 cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang @@ -99,7 +141,7 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 + cxx-standard: 17 cxx-compiler: g++ cc-compiler: gcc compiler-desc: GCC @@ -115,7 +157,7 @@ jobs: build-openfx: 'ON' use-simd: 'ON' use-oiio: 'ON' - cxx-standard: 17 + cxx-standard: 20 cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang @@ -141,7 +183,7 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 + cxx-standard: 17 cxx-compiler: g++ cc-compiler: gcc compiler-desc: GCC @@ -218,7 +260,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ @@ -257,12 +299,12 @@ jobs: strategy: fail-fast: true matrix: - build: [1, 2, 3, 4, 5, 6] + build: [1, 2, 3] include: # ------------------------------------------------------------------- # VFX CY2022 (Python 3.9) # ------------------------------------------------------------------- - - build: 6 + - build: 1 build-type: Debug build-shared: 'ON' build-docs: 'OFF' @@ -275,7 +317,7 @@ jobs: compiler-desc: Clang vfx-cy: 2022 install-ext-packages: ALL - - build: 5 + - build: 2 build-type: Release build-shared: 'ON' build-docs: 'ON' @@ -288,60 +330,18 @@ jobs: compiler-desc: GCC vfx-cy: 2022 install-ext-packages: MISSING - - build: 4 - build-type: Release - build-shared: 'OFF' - build-docs: 'OFF' - build-openfx: 'OFF' - use-simd: 'ON' - use-oiio: 'OFF' - cxx-standard: 11 - cxx-compiler: g++ - cc-compiler: gcc - compiler-desc: GCC - vfx-cy: 2022 - install-ext-packages: ALL - # ------------------------------------------------------------------- - # VFX CY2021 (Python 3.7) - # ------------------------------------------------------------------- - build: 3 - build-type: Release - build-shared: 'ON' - build-docs: 'OFF' - build-openfx: 'OFF' - use-simd: 'ON' - use-oiio: 'ON' - cxx-standard: 17 - cxx-compiler: clang++ - cc-compiler: clang - compiler-desc: Clang - vfx-cy: 2021 - install-ext-packages: MISSING - - build: 2 build-type: Release build-shared: 'OFF' build-docs: 'OFF' - build-openfx: 'ON' - use-simd: 'OFF' - use-oiio: 'OFF' - cxx-standard: 14 - cxx-compiler: clang++ - cc-compiler: clang - compiler-desc: Clang - vfx-cy: 2021 - install-ext-packages: ALL - - build: 1 - build-type: Debug - build-shared: 'ON' - build-docs: 'OFF' build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 + cxx-standard: 17 cxx-compiler: g++ cc-compiler: gcc compiler-desc: GCC - vfx-cy: 2021 + vfx-cy: 2022 install-ext-packages: ALL env: CXX: ${{ matrix.cxx-compiler }} @@ -430,7 +430,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ @@ -472,8 +472,8 @@ jobs: build-openfx: 'ON' use-simd: 'ON' use-oiio: 'ON' - cxx-standard: 17 - python-version: '3.11' + cxx-standard: 20 + python-version: '3.13' # Keeping one universal build - build: 4 arch-type: "x86_64;arm64" @@ -483,8 +483,8 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.10' + cxx-standard: 20 + python-version: '3.12' - build: 3 arch-type: "x86_64" build-type: Release @@ -493,8 +493,8 @@ jobs: build-openfx: 'OFF' use-simd: 'OFF' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.10' + cxx-standard: 17 + python-version: '3.11' - build: 2 arch-type: "x86_64" build-type: Debug @@ -503,8 +503,8 @@ jobs: build-openfx: 'ON' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.9' + cxx-standard: 17 + python-version: '3.10' - build: 1 arch-type: "x86_64" build-type: Release @@ -513,8 +513,8 @@ jobs: build-openfx: 'ON' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 14 - python-version: '3.7' + cxx-standard: 17 + python-version: '3.9' steps: - name: Setup Python uses: actions/setup-python@v5 @@ -588,7 +588,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ @@ -628,8 +628,8 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.11' + cxx-standard: 20 + python-version: '3.13' - build: 2 arch-type: "x86_64;arm64" test-rosetta: "ON" @@ -639,8 +639,8 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.11' + cxx-standard: 17 + python-version: '3.12' steps: - name: Setup Python uses: actions/setup-python@v5 @@ -719,7 +719,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ @@ -761,8 +761,8 @@ jobs: build-openfx: 'ON' use-simd: 'OFF' use-oiio: 'ON' - cxx-standard: 17 - python-version: '3.11' + cxx-standard: 20 + python-version: '3.13' - build: 3 build-type: Release build-shared: 'OFF' @@ -770,8 +770,8 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.9' + cxx-standard: 17 + python-version: '3.12' - build: 2 build-type: Debug build-shared: 'ON' @@ -779,8 +779,8 @@ jobs: build-openfx: 'OFF' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 11 - python-version: '3.8' + cxx-standard: 17 + python-version: '3.11' # C++14, OpenEXR, OpenFX - build: 1 build-type: Release @@ -789,8 +789,8 @@ jobs: build-openfx: 'ON' use-simd: 'ON' use-oiio: 'OFF' - cxx-standard: 14 - python-version: '3.7' + cxx-standard: 17 + python-version: '3.9' steps: - name: Setup Python uses: actions/setup-python@v5 @@ -874,7 +874,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ diff --git a/.github/workflows/dependencies_latest.yml b/.github/workflows/dependencies_latest.yml index 9cebbb3ce5..211e6f23b9 100644 --- a/.github/workflows/dependencies_latest.yml +++ b/.github/workflows/dependencies_latest.yml @@ -27,18 +27,18 @@ jobs: # --------------------------------------------------------------------------- linux_latest: - name: 'Linux CentOS 7 VFX CY${{ matrix.vfx-cy }} latest + name: 'Linux VFX CY${{ matrix.vfx-cy }} latest <${{ matrix.compiler-desc }} cxx=${{ matrix.cxx-standard }}, docs=${{ matrix.build-docs }}>' # Don't run on OCIO forks if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' - # GH-hosted VM. The build runs in CentOS 7 'container' defined below. + # GH-hosted VM. The build runs in ASWF 'container' defined below. runs-on: ubuntu-latest container: # DockerHub: https://hub.docker.com/u/aswf # Source: https://github.com/AcademySoftwareFoundation/aswf-docker - image: aswf/ci-base:${{ matrix.vfx-cy }} + image: aswf/ci-base:${{ matrix.vfx-cy }}.1 strategy: matrix: build: [1, 2, 3, 4] @@ -49,42 +49,38 @@ jobs: - build: 1 build-docs: 'ON' build-openfx: 'ON' - cxx-standard: 17 + cxx-standard: 20 cxx-compiler: g++ cc-compiler: gcc compiler-desc: GCC - vfx-cy: 2022 - use-oiio: 'ON' + vfx-cy: 2025 - build: 2 build-docs: 'OFF' build-openfx: 'OFF' - cxx-standard: 14 + cxx-standard: 17 cxx-compiler: g++ cc-compiler: gcc compiler-desc: GCC - vfx-cy: 2021 - use-oiio: 'OFF' + vfx-cy: 2024 # ------------------------------------------------------------------- # Clang # ------------------------------------------------------------------- - build: 3 build-docs: 'OFF' build-openfx: 'OFF' - cxx-standard: 17 + cxx-standard: 20 cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang - vfx-cy: 2022 - use-oiio: 'OFF' + vfx-cy: 2025 - build: 4 build-docs: 'ON' build-openfx: 'ON' - cxx-standard: 14 + cxx-standard: 17 cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang - vfx-cy: 2021 - use-oiio: 'ON' + vfx-cy: 2024 env: CXX: ${{ matrix.cxx-compiler }} CC: ${{ matrix.cc-compiler }} @@ -100,25 +96,20 @@ jobs: run: | EXT_PATH=/usr/local echo "EXT_PATH=$EXT_PATH" >> $GITHUB_ENV - - name: Install indirect dependencies - run: | - share/ci/scripts/multi/install_pugixml.sh latest - name: Install fixed ext package versions # Minizip-ng depends on ZLIB. ZLIB must be installed first. run: | - share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH - share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH - share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH - share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH - share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH - share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH - share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH + share/ci/scripts/multi/install_expat.sh 2.7.2 $EXT_PATH + share/ci/scripts/multi/install_lcms2.sh 2.17 $EXT_PATH + share/ci/scripts/multi/install_yaml-cpp.sh 0.8.0 $EXT_PATH + share/ci/scripts/multi/install_pystring.sh 1.1.4 $EXT_PATH + share/ci/scripts/multi/install_pybind11.sh 3.0.1 $EXT_PATH + share/ci/scripts/multi/install_zlib.sh 1.3.1 $EXT_PATH + share/ci/scripts/multi/install_minizip-ng.sh 4.0.10 $EXT_PATH - name: Install latest ext package versions run: | share/ci/scripts/multi/install_imath.sh latest $EXT_PATH share/ci/scripts/multi/install_openexr.sh latest $EXT_PATH - share/ci/scripts/multi/install_oiio.sh latest $EXT_PATH - share/ci/scripts/multi/install_osl.sh latest $EXT_PATH share/ci/scripts/multi/install_openfx.sh latest $EXT_PATH - name: Create build directories run: | @@ -135,8 +126,7 @@ jobs: -DOCIO_BUILD_GPU_TESTS=OFF \ -DOCIO_INSTALL_EXT_PACKAGES=NONE \ -DOCIO_WARNING_AS_ERROR=OFF \ - -DPython_EXECUTABLE=$(which python) \ - -DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} + -DPython_EXECUTABLE=$(which python) working-directory: _build - name: Build run: | @@ -178,15 +168,13 @@ jobs: - build: 1 build-docs: 'ON' build-openfx: 'ON' - cxx-standard: 17 - python-version: '3.11' - use-oiio: 'ON' + cxx-standard: 20 + python-version: '3.13' - build: 2 build-docs: 'ON' build-openfx: 'ON' - cxx-standard: 14 + cxx-standard: 17 python-version: '3.9' - use-oiio: 'OFF' steps: - name: Setup Python uses: actions/setup-python@v5 @@ -201,29 +189,23 @@ jobs: run: share/ci/scripts/macos/install_tests_env.sh - name: Setup ext environment run: | - EXT_PATH=/usr/local + EXT_PATH=$GITHUB_WORKSPACE/_ext echo "EXT_PATH=$EXT_PATH" >> $GITHUB_ENV - - name: Install indirect dependencies - run: | - share/ci/scripts/macos/install_bison.sh latest - share/ci/scripts/macos/install_boost.sh latest - share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH + echo "CMAKE_PREFIX_PATH=$EXT_PATH" >> $GITHUB_ENV - name: Install fixed ext package versions # Minizip-ng depends on ZLIB. ZLIB must be installed first. run: | - share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH - share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH - share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH - share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH - share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH - share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH - share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH + share/ci/scripts/multi/install_expat.sh 2.7.2 $EXT_PATH + share/ci/scripts/multi/install_lcms2.sh 2.17 $EXT_PATH + share/ci/scripts/multi/install_yaml-cpp.sh 0.8.0 $EXT_PATH + share/ci/scripts/multi/install_pystring.sh 1.1.4 $EXT_PATH + share/ci/scripts/multi/install_pybind11.sh 3.0.1 $EXT_PATH + share/ci/scripts/multi/install_zlib.sh 1.3.1 $EXT_PATH + share/ci/scripts/multi/install_minizip-ng.sh 4.0.10 $EXT_PATH - name: Install latest ext package versions run: | share/ci/scripts/multi/install_imath.sh latest $EXT_PATH share/ci/scripts/multi/install_openexr.sh latest $EXT_PATH - share/ci/scripts/multi/install_oiio.sh latest $EXT_PATH - share/ci/scripts/multi/install_osl.sh latest $EXT_PATH share/ci/scripts/multi/install_openfx.sh latest $EXT_PATH - name: Create build directories run: | @@ -240,8 +222,7 @@ jobs: -DOCIO_BUILD_GPU_TESTS=OFF \ -DOCIO_INSTALL_EXT_PACKAGES=NONE \ -DOCIO_WARNING_AS_ERROR=OFF \ - -DPython_EXECUTABLE=$(which python) \ - -DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} + -DPython_EXECUTABLE=$(which python) working-directory: _build - name: Build run: | @@ -260,6 +241,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release cmake --build . \ --config Release + export DYLD_LIBRARY_PATH=$EXT_PATH/lib:$DYLD_LIBRARY_PATH ./consumer working-directory: _build/tests/cmake-consumer-dist @@ -283,13 +265,13 @@ jobs: - build: 1 build-docs: 'ON' build-openfx: 'ON' - cxx-standard: 17 - python-version: '3.11' + cxx-standard: 20 + python-version: '3.13' use-oiio: 'ON' - build: 2 build-docs: 'ON' build-openfx: 'ON' - cxx-standard: 14 + cxx-standard: 17 python-version: '3.9' use-oiio: 'OFF' steps: @@ -323,32 +305,23 @@ jobs: run: | vcpkg install zlib:x64-windows vcpkg install tiff:x64-windows - vcpkg install boost-asio:x64-windows - vcpkg install boost-container:x64-windows - vcpkg install boost-filesystem:x64-windows - vcpkg install boost-math:x64-windows - vcpkg install boost-stacktrace:x64-windows - vcpkg install boost-system:x64-windows - vcpkg install boost-thread:x64-windows - share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH shell: bash - name: Install fixed ext package versions # Minizip-ng depends on ZLIB. ZLIB must be installed first. run: | - share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH - share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH - share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH - share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH - share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH - share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH - share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH + share/ci/scripts/multi/install_lcms2.sh 2.17 $EXT_PATH + share/ci/scripts/multi/install_yaml-cpp.sh 0.8.0 $EXT_PATH + share/ci/scripts/multi/install_pystring.sh 1.1.4 $EXT_PATH + share/ci/scripts/multi/install_pybind11.sh 3.0.1 $EXT_PATH + share/ci/scripts/multi/install_expat.sh 2.7.2 $EXT_PATH + share/ci/scripts/multi/install_zlib.sh 1.3.1 $EXT_PATH + share/ci/scripts/multi/install_minizip-ng.sh 4.0.10 $EXT_PATH shell: bash # OSL not installed due to LLVM compilation time. - name: Install latest ext package versions run: | share/ci/scripts/multi/install_imath.sh latest $EXT_PATH share/ci/scripts/multi/install_openexr.sh latest $EXT_PATH - share/ci/scripts/multi/install_oiio.sh latest $EXT_PATH share/ci/scripts/multi/install_openfx.sh latest $EXT_PATH shell: bash - name: Create build directories @@ -369,8 +342,7 @@ jobs: -DOCIO_INSTALL_EXT_PACKAGES=NONE \ -DOCIO_WARNING_AS_ERROR=OFF \ -DPython_EXECUTABLE=$(which python) \ - -DOCIO_BUILD_PYTHON=OFF \ - -DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} + -DOCIO_BUILD_PYTHON=OFF shell: bash working-directory: _build - name: Build diff --git a/.github/workflows/platform_latest.yml b/.github/workflows/platform_latest.yml index ab1749bab5..aa0be17dd5 100644 --- a/.github/workflows/platform_latest.yml +++ b/.github/workflows/platform_latest.yml @@ -153,7 +153,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ @@ -187,14 +187,14 @@ jobs: build-shared: ON cxx-standard: 23 enable-sanitizer: OFF - python-version: '3.11' + python-version: '3.13' - build: 2 build-python: OFF build-type: Debug build-shared: ON cxx-standard: 23 enable-sanitizer: ON - python-version: '3.11' + python-version: '3.9' steps: - name: Setup Python uses: actions/setup-python@v5 @@ -266,7 +266,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ @@ -298,14 +298,14 @@ jobs: build-python: ON build-type: Release build-shared: ON - cxx-standard: 23 - python-version: '3.11' + cxx-standard: 20 + python-version: '3.13' - build: 2 build-python: ON build-type: Debug build-shared: ON - cxx-standard: 23 - python-version: '3.11' + cxx-standard: 20 + python-version: '3.9' steps: - name: Setup Python uses: actions/setup-python@v5 @@ -387,7 +387,7 @@ jobs: -Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ -Dyaml-cpp_STATIC_LIBRARY=ON \ - -Dyaml-cpp_VERSION=0.7.0 \ + -Dyaml-cpp_VERSION=0.8.0 \ -DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ -DZLIB_STATIC_LIBRARY=ON \ -Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ diff --git a/.github/workflows/wheel_workflow.yml b/.github/workflows/wheel_workflow.yml index 51fb225bed..f0877d8637 100644 --- a/.github/workflows/wheel_workflow.yml +++ b/.github/workflows/wheel_workflow.yml @@ -81,10 +81,6 @@ jobs: # ------------------------------------------------------------------- # CPython 64 bits manylinux_2_28 # ------------------------------------------------------------------- - - build: CPython 3.8 64 bits manylinux_2_28 - manylinux: manylinux_2_28 - python: cp38-manylinux_x86_64 - arch: x86_64 - build: CPython 3.9 64 bits manylinux_2_28 manylinux: manylinux_2_28 python: cp39-manylinux_x86_64 @@ -105,13 +101,13 @@ jobs: manylinux: manylinux_2_28 python: cp313-manylinux_x86_64 arch: x86_64 + - build: CPython 3.14 64 bits manylinux_2_28 + manylinux: manylinux_2_28 + python: cp314-manylinux_x86_64 + arch: x86_64 # ------------------------------------------------------------------- # CPython 64 bits manylinux2014 # ------------------------------------------------------------------- - - build: CPython 3.8 64 bits manylinux2014 - manylinux: manylinux2014 - python: cp38-manylinux_x86_64 - arch: x86_64 - build: CPython 3.9 64 bits manylinux2014 manylinux: manylinux2014 python: cp39-manylinux_x86_64 @@ -132,6 +128,10 @@ jobs: manylinux: manylinux2014 python: cp313-manylinux_x86_64 arch: x86_64 + - build: CPython 3.14 64 bits manylinux2014 + manylinux: manylinux2014 + python: cp314-manylinux_x86_64 + arch: x86_64 steps: - uses: actions/checkout@v4 @@ -139,10 +139,10 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.11' - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} @@ -170,10 +170,6 @@ jobs: # ------------------------------------------------------------------- # CPython ARM 64 bits manylinux2014 # ------------------------------------------------------------------- - - build: CPython 3.8 ARM 64 bits manylinux2014 - manylinux: manylinux2014 - python: cp38-manylinux_aarch64 - arch: aarch64 - build: CPython 3.9 ARM 64 bits manylinux2014 manylinux: manylinux2014 python: cp39-manylinux_aarch64 @@ -194,6 +190,10 @@ jobs: manylinux: manylinux2014 python: cp313-manylinux_aarch64 arch: aarch64 + - build: CPython 3.14 ARM 64 bits manylinux2014 + manylinux: manylinux2014 + python: cp314-manylinux_aarch64 + arch: aarch64 steps: - uses: actions/checkout@v4 @@ -201,10 +201,10 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.11' - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} @@ -232,9 +232,6 @@ jobs: # ------------------------------------------------------------------- # CPython 64 bits # ------------------------------------------------------------------- - - build: CPython 3.8 64 bits - python: cp38-macosx_x86_64 - arch: x86_64 - build: CPython 3.9 64 bits python: cp39-macosx_x86_64 arch: x86_64 @@ -250,6 +247,9 @@ jobs: - build: CPython 3.13 64 bits python: cp313-macosx_x86_64 arch: x86_64 + - build: CPython 3.14 64 bits + python: cp314-macosx_x86_64 + arch: x86_64 steps: - uses: actions/checkout@v4 @@ -257,14 +257,14 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.11' - name: Remove brew OpenEXR/Imath run: | brew uninstall --ignore-dependencies openexr imath || true - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} @@ -291,9 +291,6 @@ jobs: # ------------------------------------------------------------------- # CPython ARM 64 bits # ------------------------------------------------------------------- - - build: CPython 3.8 ARM 64 bits - python: cp38-macosx_arm64 - arch: arm64 - build: CPython 3.9 ARM 64 bits python: cp39-macosx_arm64 arch: arm64 @@ -309,6 +306,9 @@ jobs: - build: CPython 3.13 ARM 64 bits python: cp313-macosx_arm64 arch: arm64 + - build: CPython 3.14 ARM 64 bits + python: cp314-macosx_arm64 + arch: arm64 steps: - uses: actions/checkout@v4 @@ -316,10 +316,10 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.11' - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} @@ -346,9 +346,6 @@ jobs: # ------------------------------------------------------------------- # CPython 64 bits # ------------------------------------------------------------------- - - build: CPython 3.8 64 bits - python: cp38-win_amd64 - arch: AMD64 - build: CPython 3.9 64 bits python: cp39-win_amd64 arch: AMD64 @@ -364,6 +361,9 @@ jobs: - build: CPython 3.13 64 bits python: cp313-win_amd64 arch: AMD64 + - build: CPython 3.14 64 bits + python: cp314-win_amd64 + arch: AMD64 steps: - uses: actions/checkout@v4 @@ -371,10 +371,10 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.11' - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 579255ddd9..9ad6d3c8a7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ set(CMAKE_WARN_DEPRECATED ON) if(APPLE AND NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET) # The value of this variable should be set prior to the first project() command invocation # because it may influence configuration of the toolchain and flags. - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version") + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") endif() diff --git a/docs/quick_start/installation.rst b/docs/quick_start/installation.rst index 03da2f9e9f..d8d208e05c 100644 --- a/docs/quick_start/installation.rst +++ b/docs/quick_start/installation.rst @@ -122,28 +122,28 @@ items manually: Required components: -- C++ 11-17 compiler (gcc, clang, msvc) +- C++ 17-23 compiler (gcc, clang, msvc) - CMake >= 3.14 -- \*Expat >= 2.4.1 (XML parser for CDL/CLF/CTF) -- \*yaml-cpp >= 0.7.0 (YAML parser for Configs) +- \*Expat >= 2.6.0 (XML parser for CDL/CLF/CTF) +- \*yaml-cpp >= 0.8.0 (YAML parser for Configs) - \*Imath >= 3.1.1 (for half domain LUTs) - \*pystring >= 1.1.3 -- \*minizip-ng >= 3.0.7 (for config archiving) +- \*minizip-ng >= 4.0.0 (for config archiving) - \*ZLIB >= 1.2.13 (for config archiving) Optional OCIO functionality also depends on: - \*Little CMS >= 2.2 (for ociobakelut ICC profile baking) - \*OpenGL GLUT & GLEW (for ociodisplay) -- \*OpenEXR >= 3.0.5 (for apps including ocioconvert) +- \*OpenEXR >= 3.2.0 (for apps including ocioconvert) - OpenImageIO >= 2.2.14 (for apps including ocioconvert) - \*OpenFX >= 1.4 (for the OpenFX plug-ins) -- OpenShadingLanguage >= 1.11 (for the OSL unit tests) +- OpenShadingLanguage >= 1.13 (for the OSL unit tests) - Doxygen (for the docs) - NumPy (optionally used in the Python test suite) - \*pybind11 >= 2.9.2 (for the Python binding) -- Python >= 3.7 (for the Python binding only) -- Python 3.7 - 3.9 (for building the documentation) +- Python >= 3.9 (for the Python binding only) +- Python 3.9+ (for building the documentation) Building the documentation requires the following packages, available via PyPI: diff --git a/pyproject.toml b/pyproject.toml index 793353ff6d..f5677d1216 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,9 +30,9 @@ test-command = [ before-build = "share/ci/scripts/linux/dnf/install_docs_env.sh" [tool.cibuildwheel.macos] -# cibuildwheel in some cases set this to 10.9 by default, OCIO needs >= 10.13 +# cibuildwheel in some cases set this to 10.9 by default, OCIO needs >= 10.15 # macOS ARM wheels needs 11.0, cibuildwheel will automatically bump where appropriate -environment = { MACOSX_DEPLOYMENT_TARGET="10.13" } +environment = { MACOSX_DEPLOYMENT_TARGET="10.15" } before-build = "share/ci/scripts/macos/install_docs_env.sh" [tool.cibuildwheel.windows] diff --git a/setup.cfg b/setup.cfg index d5af16ae6f..aa1015183a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,13 +7,12 @@ classifiers = Topic :: Software Development :: Libraries :: Python Modules Programming Language :: C++ Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 Programming Language :: Python :: Implementation :: CPython Programming Language :: C++ description = OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. @@ -22,7 +21,7 @@ license_files = LICENSE long_description = file: README.md, LICENSE long_description_content_type = text/markdown name = opencolorio -python_requires = '>=3.7' +python_requires = '>=3.9' url = https://opencolorio.org/ [options] diff --git a/share/ci/scripts/multi/install_yaml-cpp.sh b/share/ci/scripts/multi/install_yaml-cpp.sh index 7a916170bc..7265141379 100755 --- a/share/ci/scripts/multi/install_yaml-cpp.sh +++ b/share/ci/scripts/multi/install_yaml-cpp.sh @@ -23,8 +23,10 @@ if [ "$YAMLCPP_VERSION" == "latest" ]; then else if [[ "$YAMLCPP_MINOR" -lt 6 && "$YAMLCPP_PATCH" -lt 3 ]]; then git checkout tags/release-${YAMLCPP_VERSION} -b release-${YAMLCPP_VERSION} - else + elif [[ "$YAMLCPP_MINOR" -lt 8 ]]; then git checkout tags/yaml-cpp-${YAMLCPP_VERSION} -b yaml-cpp-${YAMLCPP_VERSION} + else + git checkout tags/${YAMLCPP_VERSION} -b ${YAMLCPP_VERSION} fi fi diff --git a/share/cmake/macros/GetPythonPreCommand.cmake b/share/cmake/macros/GetPythonPreCommand.cmake index d5539f8ec6..018692a33d 100644 --- a/share/cmake/macros/GetPythonPreCommand.cmake +++ b/share/cmake/macros/GetPythonPreCommand.cmake @@ -22,6 +22,7 @@ macro(get_python_pre_command) if(WIN32) # Use Windows path separators since this is being passed through to cmd file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} _WIN_BINARY_DIR) + file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} _WIN_SOURCE_DIR) set(_DLL_PATH "${_WIN_BINARY_DIR}\\src\\OpenColorIO") if(MSVC_IDE) @@ -42,15 +43,20 @@ macro(get_python_pre_command) # Build path list set(_WIN_PATHS - ${_PYD_PATH} - "${PROJECT_SOURCE_DIR}\\share\\docs" + ${_PYD_PATH} + "${_WIN_SOURCE_DIR}\\share\\docs" ) # Include optional paths from macro arguments foreach(_PATH ${ARGN}) file(TO_NATIVE_PATH ${_PATH} _WIN_PATH) list(APPEND _WIN_PATHS ${_WIN_PATH}) endforeach() - list(APPEND _WIN_PATHS "%PYTHONPATH%") + + # Double % to escape as the cmd.exe will eat one level of %. That + # results in an empty path in the ENV variable and Python fails to + # convert that to absolute path. Possibly due to + # https://www.cve.news/cve-2023-41105/ + list(APPEND _WIN_PATHS "%%PYTHONPATH%%") string(JOIN "\\\\;" _PYTHONPATH_VALUE ${_WIN_PATHS}) string(CONCAT _PYTHONPATH_SET "PYTHONPATH=${_PYTHONPATH_VALUE}") diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake index 7cdb17b4ef..6353bdf5c4 100644 --- a/share/cmake/modules/FindExtPackages.cmake +++ b/share/cmake/modules/FindExtPackages.cmake @@ -55,29 +55,29 @@ message(STATUS "Checking for mandatory dependencies...") # expat # https://github.com/libexpat/libexpat ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL - MIN_VERSION 2.4.1 - RECOMMENDED_VERSION 2.5.0 - RECOMMENDED_VERSION_REASON "CVE fixes and fix issue with symbol leakage when built as a static library") + MIN_VERSION 2.6.0 + RECOMMENDED_VERSION 2.7.2 + RECOMMENDED_VERSION_REASON "CVE fixes and Latest version tested with OCIO") # yaml-cpp # https://github.com/jbeder/yaml-cpp ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL - MIN_VERSION 0.6.3 - RECOMMENDED_VERSION 0.7.0 + MIN_VERSION 0.8.0 + RECOMMENDED_VERSION 0.8.0 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") # pystring # https://github.com/imageworks/pystring ocio_handle_dependency( pystring REQUIRED ALLOW_INSTALL MIN_VERSION 1.1.3 - RECOMMENDED_VERSION 1.1.3 + RECOMMENDED_VERSION 1.1.4 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") -# Imath (>=3.1) +# Imath # https://github.com/AcademySoftwareFoundation/Imath ocio_handle_dependency( Imath REQUIRED ALLOW_INSTALL MIN_VERSION 3.1.1 - RECOMMENDED_VERSION 3.1.12 + RECOMMENDED_VERSION 3.2.1 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") ############################################################################### @@ -101,9 +101,9 @@ ocio_handle_dependency( Imath REQUIRED ALLOW_INSTALL # See https://nvd.nist.gov/vuln/detail/CVE-2022-37434 # See https://github.com/madler/zlib/releases/tag/v1.2.13 ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL - MIN_VERSION 1.2.8 - RECOMMENDED_VERSION 1.2.13 - RECOMMENDED_VERSION_REASON "CVE fixes" + MIN_VERSION 1.2.13 # CVE fixes + RECOMMENDED_VERSION 1.3.1 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO" VERSION_VARS ZLIB_VERSION_STRING ZLIB_VERSION ) ############################################################################### @@ -111,8 +111,8 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL # minizip-ng # https://github.com/zlib-ng/minizip-ng ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL - MIN_VERSION 3.0.6 - RECOMMENDED_VERSION 3.0.7 + MIN_VERSION 4.0.0 + RECOMMENDED_VERSION 4.0.10 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") ############################################################################### @@ -133,7 +133,7 @@ if(OCIO_BUILD_APPS) # https://github.com/mm2/Little-CMS ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL MIN_VERSION 2.2 - RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION 2.17 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") endif() @@ -142,7 +142,7 @@ if(OCIO_BUILD_OPENFX) # https://github.com/ofxa/openfx ocio_handle_dependency( openfx REQUIRED ALLOW_INSTALL MIN_VERSION 1.4 - RECOMMENDED_VERSION 1.4 + RECOMMENDED_VERSION 1.5 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") endif() @@ -179,19 +179,18 @@ if(OCIO_BUILD_PYTHON OR OCIO_BUILD_DOCS) # pybind11 2.9 fixes issues with MS Visual Studio 2022 (Debug). ocio_handle_dependency( pybind11 REQUIRED ALLOW_INSTALL MIN_VERSION 2.9.2 - RECOMMENDED_VERSION 2.12.1) + RECOMMENDED_VERSION 3.0.1) endif() endif() # Set OpenEXR Minimum version as a variable since it it used at multiple places. -set(OpenEXR_MININUM_VERSION "3.1.6") if((OCIO_BUILD_APPS AND OCIO_USE_OIIO_FOR_APPS) OR OCIO_BUILD_TESTS) # OpenImageIO is required for OSL unit test and optional for apps. # OpenImageIO # https://github.com/OpenImageIO/oiio set(OIIO_VERSION "2.2.14") - set(OIIO_RECOMMENDED_VERSION "2.4") + set(OIIO_RECOMMENDED_VERSION "3") # Supported from OIIO 2.4+. Setting this for lower versions doesn't affect anything. set(OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH 1) @@ -259,8 +258,8 @@ if(OCIO_BUILD_APPS) ############################################################################### # Calling find_package in CONFIG mode using PREFER_CONFIG option. ocio_handle_dependency( OpenEXR PREFER_CONFIG ALLOW_INSTALL - MIN_VERSION ${OpenEXR_MININUM_VERSION} - RECOMMENDED_VERSION 3.1.6 + MIN_VERSION 3.2.0 + RECOMMENDED_VERSION 3.3.5 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO" PROMOTE_TARGET OpenEXR::OpenEXR) @@ -285,8 +284,8 @@ if(OCIO_BUILD_TESTS) # OpenShadingLanguage # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage ocio_handle_dependency( OSL - MIN_VERSION 1.11 - RECOMMENDED_VERSION 1.11 + MIN_VERSION 1.13 + RECOMMENDED_VERSION 1.14 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") if(NOT OSL_FOUND) message(WARNING "Skipping build of the OpenShadingLanguage unit tests (OSL missing)") diff --git a/share/cmake/modules/Findyaml-cpp.cmake b/share/cmake/modules/Findyaml-cpp.cmake index 110ae2e4ca..d10bdb4f5e 100644 --- a/share/cmake/modules/Findyaml-cpp.cmake +++ b/share/cmake/modules/Findyaml-cpp.cmake @@ -12,10 +12,6 @@ # Global targets defined by this module: # yaml-cpp::yaml-cpp # -# For compatibility with the upstream CMake package, the following variables and targets are defined: -# YAML_CPP_LIBRARIES - Libraries to link against yaml-cpp -# YAML_CPP_INCLUDE_DIR - Include directory -# # Usually CMake will use the dynamic library rather than static, if both are present. # In this case, you may set yaml-cpp_STATIC_LIBRARY to ON to request use of the static one. # If only the static library is present (such as when OCIO builds the dependency), then the option @@ -163,10 +159,3 @@ if (yaml-cpp_FOUND AND NOT TARGET yaml-cpp::yaml-cpp) add_library(yaml-cpp ALIAS yaml-cpp::yaml-cpp) endif () endif () - -if (yaml-cpp_FOUND) - # TODO: Remove this variable and use the `yaml-cpp::yaml-cpp` target - # directly when the minimum version of yaml-cpp is updated to 0.8. - get_target_property(YAML_CPP_INCLUDE_DIR yaml-cpp::yaml-cpp INCLUDE_DIRECTORIES) - set(YAML_CPP_LIBRARIES yaml-cpp::yaml-cpp) -endif () diff --git a/share/cmake/modules/install/InstallOpenEXR.cmake b/share/cmake/modules/install/InstallOpenEXR.cmake index be9a708729..7fde736eed 100644 --- a/share/cmake/modules/install/InstallOpenEXR.cmake +++ b/share/cmake/modules/install/InstallOpenEXR.cmake @@ -110,7 +110,9 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DOPENEXR_INSTALL_EXAMPLES=OFF + -DOPENEXR_BUILD_EXAMPLES=OFF -DOPENEXR_BUILD_TOOLS=OFF + -DOPENEXR_FORCE_INTERNAL_DEFLATE=ON # Try to use in-source built Imath first, if available. -DCMAKE_PREFIX_PATH=${_EXT_DIST_ROOT} ) @@ -177,6 +179,13 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK add_dependencies(OpenEXR::OpenEXR openexr_install) + # When building Imath ourselves, make sure it has been built first + # so that OpenEXR can find it. Otherwise OpenEXR will build its + # own copy of Imath which might result in version conflicts. + if (TARGET imath_install) + add_dependencies(openexr_install imath_install) + endif() + if(OCIO_VERBOSE) message(STATUS "Installing OpenEXR: ${OpenEXR_LIBRARY} (version \"${OpenEXR_VERSION}\")") endif() @@ -209,7 +218,7 @@ if(_OpenEXR_TARGET_CREATE) set_target_properties(OpenEXR::OpenEXR PROPERTIES IMPORTED_LOCATION ${OpenEXR_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;Imath::Imath;OpenEXR::IlmThreadConfig;OpenEXR::Iex;OpenEXR::IlmThread;ZLIB::ZLIB" + INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;Imath::Imath;OpenEXR::IlmThreadConfig;OpenEXR::Iex;OpenEXR::IlmThread;OpenEXR::OpenEXRCore" ) set_target_properties(OpenEXR::OpenEXRConfig PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR};${OpenEXR_INCLUDE_DIR}/OpenEXR" @@ -217,13 +226,13 @@ if(_OpenEXR_TARGET_CREATE) set_target_properties(OpenEXR::OpenEXRCore PROPERTIES IMPORTED_LOCATION ${OpenEXRCore_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;ZLIB::ZLIB;\$" + INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;Imath::Imath" STATIC_LIBRARY_OPTIONS "-no_warning_for_no_symbols" ) set_target_properties(OpenEXR::OpenEXRUtil PROPERTIES IMPORTED_LOCATION ${OpenEXRUtil_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;OpenEXR::OpenEXR" + INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;OpenEXR::OpenEXR;OpenEXR::OpenEXRCore" ) mark_as_advanced(OpenEXR_INCLUDE_DIR OpenEXR_LIBRARY OpenEXR_VERSION) diff --git a/share/cmake/modules/install/Installminizip-ng.cmake b/share/cmake/modules/install/Installminizip-ng.cmake index 19c54a950a..28b6e6a782 100644 --- a/share/cmake/modules/install/Installminizip-ng.cmake +++ b/share/cmake/modules/install/Installminizip-ng.cmake @@ -45,7 +45,12 @@ if(NOT minizip-ng_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_P set(minizip-ng_INCLUDE_DIR "${_EXT_DIST_ROOT}/${CMAKE_INSTALL_INCLUDEDIR}/minizip-ng") # Minizip-ng use a hardcoded lib prefix instead of CMAKE_STATIC_LIBRARY_PREFIX - set(_minizip-ng_LIB_PREFIX "lib") + # Fixed from 4.0.7, see https://github.com/zlib-ng/minizip-ng/issues/778 + if(${minizip-ng_VERSION} VERSION_GREATER_EQUAL "4.0.7") + set(_minizip-ng_LIB_PREFIX "${CMAKE_STATIC_LIBRARY_PREFIX}") + else() + set(_minizip-ng_LIB_PREFIX "lib") + endif() set(minizip-ng_LIBRARY "${_EXT_DIST_ROOT}/${CMAKE_INSTALL_LIBDIR}/${_minizip-ng_LIB_PREFIX}minizip-ng${_minizip-ng_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") @@ -63,11 +68,6 @@ if(NOT minizip-ng_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_P -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DCMAKE_INSTALL_DATADIR=${CMAKE_INSTALL_DATADIR} -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - # Since the other modules create a subfolder for the includes by default and since - # minizip-ng does not, a suffix is added to CMAKE_INSTALL_INCLUDEDIR in order to - # install the headers under a subdirectory named "minizip-ng". - # Note that this does not affect external builds for minizip-ng. - -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}/minizip-ng -DCMAKE_OBJECT_PATH_MAX=${CMAKE_OBJECT_PATH_MAX} -DBUILD_SHARED_LIBS=OFF -DMZ_OPENSSL=OFF diff --git a/share/cmake/modules/install/Installopenfx.cmake b/share/cmake/modules/install/Installopenfx.cmake index be454de4c2..8ce587b33f 100644 --- a/share/cmake/modules/install/Installopenfx.cmake +++ b/share/cmake/modules/install/Installopenfx.cmake @@ -50,9 +50,11 @@ if(NOT openfx_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACKA ExternalProject_Add(openfx_install GIT_REPOSITORY "https://github.com/ofxa/openfx.git" - # The latest version from 2015 is OFX_Release_1_4_TAG. + # The latest version from 2015 is OFX_Release_1_4_TAG. + # The latest version from 2024 is OFX_Release_1.5. # Need to be careful since older version might have the patch number in the tag. - GIT_TAG "OFX_Release_${openfx_VERSION_MAJOR}_${openfx_VERSION_MINOR}_TAG" + # There don't seem to be enough consistency in tag names that we can rely on. + GIT_TAG "OFX_Release_${openfx_VERSION_MAJOR}.${openfx_VERSION_MINOR}" GIT_CONFIG advice.detachedHead=false GIT_SHALLOW TRUE PREFIX "${_EXT_BUILD_ROOT}/openfx" diff --git a/share/cmake/modules/install/Installpybind11.cmake b/share/cmake/modules/install/Installpybind11.cmake index a0ae71f151..f432d5289e 100644 --- a/share/cmake/modules/install/Installpybind11.cmake +++ b/share/cmake/modules/install/Installpybind11.cmake @@ -120,5 +120,13 @@ if(_pybind11_TARGET_CREATE) INTERFACE_INCLUDE_DIRECTORIES ${pybind11_INCLUDE_DIR} ) + # See pybind11Common.cmake for reasoning + if (MSVC) + set_target_properties(pybind11::module PROPERTIES + INTERFACE_COMPILE_OPTIONS /bigobj + ) + + endif() + mark_as_advanced(pybind11_INCLUDE_DIR pybind11_VERSION) endif() diff --git a/share/cmake/modules/install/Installyaml-cpp.cmake b/share/cmake/modules/install/Installyaml-cpp.cmake index 6353a4d1d1..3ec993969c 100644 --- a/share/cmake/modules/install/Installyaml-cpp.cmake +++ b/share/cmake/modules/install/Installyaml-cpp.cmake @@ -10,12 +10,7 @@ # yaml-cpp_VERSION - Library's version # # Global targets defined by this module: -# yaml-cpp::yaml-cpp -# -# For compatibility with the upstream CMake package, the following variables and targets are defined: -# yaml-cpp::yaml-cpp - Alias of the yaml-cpp target -# YAML_CPP_LIBRARIES - Libraries to link against yaml-cpp -# YAML_CPP_INCLUDE_DIR - Include directory +# yaml-cpp::yaml-cpp # ############################################################################### @@ -118,7 +113,8 @@ if(NOT yaml-cpp_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PAC -DANDROID_STL=${ANDROID_STL}) endif() - set(yaml-cpp_GIT_TAG "yaml-cpp-${yaml-cpp_VERSION}") + # in v0.8.0 yaml switched from "yaml-cpp-vA.B.C" to "vA.B.C" format for tags. + set(yaml-cpp_GIT_TAG "${yaml-cpp_VERSION}") # Hack to let imported target be built from ExternalProject_Add file(MAKE_DIRECTORY ${yaml-cpp_INCLUDE_DIR}) @@ -154,10 +150,9 @@ if(_yaml-cpp_TARGET_CREATE) set_target_properties(yaml-cpp::yaml-cpp PROPERTIES IMPORTED_LOCATION ${yaml-cpp_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES ${yaml-cpp_INCLUDE_DIR} + # https://github.com/jbeder/yaml-cpp/issues/1339 + INTERFACE_COMPILE_DEFINITIONS YAML_CPP_STATIC_DEFINE ) mark_as_advanced(yaml-cpp_INCLUDE_DIR yaml-cpp_LIBRARY yaml-cpp_VERSION) endif() - -set(YAML_CPP_INCLUDE_DIR "${yaml-cpp_INCLUDE_DIR}") -set(YAML_CPP_LIBRARIES yaml-cpp::yaml-cpp) diff --git a/share/cmake/utils/CompilerFlags.cmake b/share/cmake/utils/CompilerFlags.cmake index d87e73f2d4..3e609ef6a6 100644 --- a/share/cmake/utils/CompilerFlags.cmake +++ b/share/cmake/utils/CompilerFlags.cmake @@ -60,12 +60,13 @@ if(USE_MSVC) # /we4062 Enables warning in switch when an enumeration value is not explicitly handled. set(PLATFORM_COMPILE_OPTIONS "${PLATFORM_COMPILE_OPTIONS};/EHsc;/DWIN32;/we4062") - if(${CMAKE_CXX_STANDARD} GREATER_EQUAL 17) - # Inheriting from std::iterator is deprecated starting with C++17 and Yaml 0.6.3 does that. - set(PLATFORM_COMPILE_OPTIONS - "${PLATFORM_COMPILE_OPTIONS};/D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING" - ) - endif() + # seems no longer needed, there were c++ modernization on 0.7.0. /coz +# if(${CMAKE_CXX_STANDARD} GREATER_EQUAL 17) +# # Inheriting from std::iterator is deprecated starting with C++17 and Yaml 0.6.3 does that. +# set(PLATFORM_COMPILE_OPTIONS +# "${PLATFORM_COMPILE_OPTIONS};/D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING" +# ) +# endif() # Make MSVC compiler report correct __cplusplus version (otherwise reports 199711L) set(PLATFORM_COMPILE_OPTIONS "${PLATFORM_COMPILE_OPTIONS};/Zc:__cplusplus") diff --git a/share/cmake/utils/CppVersion.cmake b/share/cmake/utils/CppVersion.cmake index 175d89c206..127ec9e7f1 100644 --- a/share/cmake/utils/CppVersion.cmake +++ b/share/cmake/utils/CppVersion.cmake @@ -5,12 +5,12 @@ ############################################################################### # C++ version configuration -set(SUPPORTED_CXX_STANDARDS 11 14 17) +set(SUPPORTED_CXX_STANDARDS 17 20 23) string(REPLACE ";" ", " SUPPORTED_CXX_STANDARDS_STR "${SUPPORTED_CXX_STANDARDS}") if(NOT DEFINED CMAKE_CXX_STANDARD) - message(STATUS "Setting C++ version to '14' as none was specified.") - set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to compile against") + message(STATUS "Setting C++ version to '17' as none was specified.") + set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to compile against") elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) message(WARNING "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") @@ -29,48 +29,45 @@ else() set(CUSTOM_CXX_FLAGS "-w") endif() -if(${CMAKE_CXX_STANDARD} EQUAL 11) +if(${CMAKE_CXX_STANDARD} EQUAL 17) if(USE_MSVC) - CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std:c++11" COMPILER_SUPPORTS_CXX11) + CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std:c++17" COMPILER_SUPPORTS_CXX17) else() - CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++11" COMPILER_SUPPORTS_CXX11) + CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++17" COMPILER_SUPPORTS_CXX17) endif() - if(NOT COMPILER_SUPPORTS_CXX11) - message(STATUS - "The compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} has no C++11 only support. Use C++14.") - set(CMAKE_CXX_STANDARD 14) + if(NOT COMPILER_SUPPORTS_CXX17) + message(FATAL_ERROR + "The compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} has no C++17 support.") endif() endif() -if(${CMAKE_CXX_STANDARD} EQUAL 14) +if(${CMAKE_CXX_STANDARD} EQUAL 20) if(USE_MSVC) - CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std:c++14" COMPILER_SUPPORTS_CXX14) + CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std:c++20" COMPILER_SUPPORTS_CXX20) else() - CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++14" COMPILER_SUPPORTS_CXX14) + CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++20" COMPILER_SUPPORTS_CXX20) endif() - if(NOT COMPILER_SUPPORTS_CXX14) - message(STATUS - "The compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} has no C++14 only support. Use C++17.") - set(CMAKE_CXX_STANDARD 17) + if(NOT COMPILER_SUPPORTS_CXX20) + message(FATAL_ERROR + "The compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} has no C++20 support.") endif() endif() -if(${CMAKE_CXX_STANDARD} EQUAL 17) +if(${CMAKE_CXX_STANDARD} EQUAL 23) if(USE_MSVC) - CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std:c++17" COMPILER_SUPPORTS_CXX17) + CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std:c++23" COMPILER_SUPPORTS_CXX23) else() - CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++17" COMPILER_SUPPORTS_CXX17) + CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++23" COMPILER_SUPPORTS_CXX23) endif() - if(NOT COMPILER_SUPPORTS_CXX17) + if(NOT COMPILER_SUPPORTS_CXX23) message(FATAL_ERROR - "The compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} has no C++17 support.") + "The compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} has no C++23 support.") endif() endif() - # Disable fallback to other C++ version if standard is not supported. set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt index 7d2894da6b..ebef9328a3 100755 --- a/src/OpenColorIO/CMakeLists.txt +++ b/src/OpenColorIO/CMakeLists.txt @@ -315,7 +315,7 @@ target_link_libraries(OpenColorIO "$" "$" "$" - ${YAML_CPP_LIBRARIES} + yaml-cpp::yaml-cpp MINIZIP::minizip-ng ) diff --git a/src/OpenColorIO/SystemMonitor_macos.cpp b/src/OpenColorIO/SystemMonitor_macos.cpp index 9957903885..4b212e6850 100644 --- a/src/OpenColorIO/SystemMonitor_macos.cpp +++ b/src/OpenColorIO/SystemMonitor_macos.cpp @@ -190,13 +190,13 @@ void SystemMonitorsImpl::getAllMonitors() CFDictionaryGetKeysAndValues(productInfo, nullptr, (const void **)&values[0]); const CFIndex bufferSize = CFStringGetLength(values[0]) + 1; // +1 for null termination - char buffer[bufferSize]; + std::vector buffer(bufferSize); // Return false if the buffer is too small or if the conversion fails. - if (CFStringGetCString(values[0], buffer, bufferSize, kCFStringEncodingUTF8)) + if (CFStringGetCString(values[0], buffer.data(), buffer.size(), kCFStringEncodingUTF8)) { // Build a name using the vendor information. - displayName = buffer; + displayName = buffer.data(); // Add the display unit number (i.e. identify the display's framebuffer) // to differentiate same type of monitors. diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt index 66c32cb8a7..322f0f94bf 100755 --- a/tests/cpu/CMakeLists.txt +++ b/tests/cpu/CMakeLists.txt @@ -35,7 +35,7 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES) sampleicc::sampleicc unittest_data utils::strings - ${YAML_CPP_LIBRARIES} + yaml-cpp::yaml-cpp testutils MINIZIP::minizip-ng xxHash diff --git a/tests/cpu/fileformats/FileFormatCTF_tests.cpp b/tests/cpu/fileformats/FileFormatCTF_tests.cpp index b9b2662165..25cc87a4d2 100644 --- a/tests/cpu/fileformats/FileFormatCTF_tests.cpp +++ b/tests/cpu/fileformats/FileFormatCTF_tests.cpp @@ -1454,7 +1454,7 @@ OCIO_ADD_TEST(FileFormatCTF, difficult_xml_unknown_elements) "(37): Unrecognized element 'just_ignore' where its parent is 'ProcessList' (8): Unknown element", "(69): Unrecognized element 'just_ignore' where its parent is 'Description' (66)", "(70): Unrecognized element 'just_ignore' where its parent is 'just_ignore' (69)", - "(75): Unrecognized element 'Matrix' where its parent is 'LUT1D' (43): 'Matrix' not allowed in this element", + "(75): Unrecognized element 'Matrix' where its parent is 'LUT1D' (", // Line number is expat library version dependent. "(76): Unrecognized element 'Description' where its parent is 'Matrix' (75)", "(77): Unrecognized element 'Array' where its parent is 'Matrix' (75)" }; diff --git a/tests/data/files/configs/context_test1/context_test1_windows.ocioz b/tests/data/files/configs/context_test1/context_test1_windows.ocioz index 091b68e52dff5ca6a84804261552391182cb2e95..eb52db3a76a668985327effc763604f5333c8b2a 100644 GIT binary patch literal 3966 zcmbuBc|4SR8^#~|K4ZyJbPQRNeK^rOWtv1pLMUtYWh|4eY+0ug#UROA4wbDK+sM9T zC$dB|vb9P`wwjK29_4MQw^N;G{+MSz&u6aZ^S!U@ci*?J77gtdfSHjI@bQx~1-@JY ztN_45zPG`+**iJNU~HT){YFPH{6g$i^OBB}8A$xFMpne+e_W4A7)mz35{+QDddx@H zz;gm&6u+7lQZjHcM@+}CWVja&wfBimd>F;uR#^Yo%&GNikFOnDBdw6r)i&cIoR}_l z&X%lz%GdxNz`608P$?fAUTJ+PX3GufUOdZ$#MLK}Ev$0v4a^RwjMnWy6g+^nApU6DBHSglhX_+ieRWTaOuaW5xBd*!t| zEsSo&jJD)T9wby&hA_zaL=tF}>YLQ5Q$Czv5HnGP_Yt&*RV;K5b3%NE(VR%$eT!tlA(VcXWY9 z|B|T)jL=pvD6hR-Grv=Uc-2ttr1<23?^CaNV($Tc8YL4A>p}kzfgYbdlZ_r46VGt_ zCTsClVIS?vu4DDWL@zDk*n>tcyTx<{<1ulyc*Ru36Aw=J`Kezl5NjE(r9Ba~>MW0l zLTaK7i|qIvRQ6tjq{R@n9$XzBS$dSmKeD`}tHr>$&8S#hl^OuRgz5e-d*T-)jMuZ* zOalN+fC%7%!8m)$*x0%-1F*GcQ~)0UWG~HhQx8)C=;?|r;!mj7e>cWiIoHdvpGO{_ zMPdUneivP=FP_swMlgS(Q`>RHyDFy16&b|Kb({NzE>U9jJ#6rO*vD`ID+ z*;t{~(a&mNOL#MteFRQY&7 z7Dp|!$bp=&Gn;I#4-%K%^-M2IJxDRmD+^munLNrY*|jCAcc$1ZD0YEJq+1;}cS!Qb zX9m%LwNAd3ImJN*0ANMGU+d@O!ZL!j_V$vOv2n5gnNk}@bwWbr*s(Jrl@0bYhvRWR zH`s&fnYf@I04xvjph=HW7zRW2XITRAO-Dka;><8&?@fFrcXNNNkcOc%>UG~Ex? zCAPH5K$gAFk7*orIGBoshQ76!BtL&>$L!@xw>r`>ijpZ+R3LYu_|SzkG8stseePG} zClE5Xrz6HoUiL@y!DSXuE{dQTMs<H1N=5gyv2RKOocG~mVjnGW|t(Z zWTDoU0Q0zL*YK1MI4=f-7ovNgluE_}5&sz;{x9I+W8)#Hb$FL=;HxVI$||I7Wi&Tq*5xkv`)Iq?*^xf{^^j{Qemw1&{L z)6zHSmkN_pSKx68RpkxGOb)4gnn`aB?YqN~nJ>_F8;x%&49_4r9+6DVZS{rK>G4Z* zm}Hcjn}1rCnyq8AdZ#)ey|CX;D^L~@#Ny$Hl7p_Ut^hlV@uj{YFm90+dI>susVKh8 zUgqYG>z8Vk;EC`H)vbA_=IBA^M+hIoLHM7Gy~4k7p4iwBy!-{;()yd&$3VZtzH#l) zPn|bN9)D&gwfmZbyNJ%0Lyy)sFww-CocUBO6}We)a+Ut%_=!EB^D&4Pvh$VI!Y?m; ztkJGzbiJHy(XIPJbQCoXI!~k0Sn~=efU}c?DTd zZ);m853mLbzZrlMUMT7Q^;7lt!&CqXZY8|5Q*IrB5WMY4yW8pK?b;^qUqg;MZQq(Y zhHhogz?z`ssS_UPoW^@UmkLK0( zm9RG?>6R(UP~YX%E(X5zJ0%M&+w@V?DjEWO1?q@8ouA4D9+K@5O)2JTasTMB>3+7i zc1nnOJF(7>i)8DioEqIrY#H_YO>pHNl_`;p^z%}zJ#i09ic3YNf@u%kj6ay=Jv`k$ z-rStFw{5n>7WkML&ks| z84{i^`8$~%*1A3}BMJJ|dMavZ=C4aV<;n#v^&2mW6<=5D>mR|5jBFpgh#JPeZ|TZdvXrt!MOm|NS0;u`ma-;Vh$yl&sjKXg$$qnB zPeqn2k@Z%iv1Utt^QwEjUGDR{-FN<&d7gRZJJ08Q&-tEXtWO6+0th%9;ItAq1-?Jr zEC9ev{p^7Abar!*!8y3$I?YUQ9dhjF7xLvgcJ)2>Wsa9pdg${s_M)csJEvr+7hYz+ z=J9)ET1R{yR8c)$##HDF-%p696j8neRjH2U7$+vQaUIqt-Ds2iRZIkasOWfGa)eTd z;1$u47+j`9bSYjUIld{9GrG8V?|?eZ5V_?_(5@Fo;-B$5FREEb>=*H&v7E?Eciw~5 zvhfxj&l$Dbm2uXqOZCc%8-EN-GRn=Yb|7maJKL(X7qv8W11`+iHJ&^?BoXCPJcK+o zr>KC=-&c~(zs)9YadP)|@2J=!i)DhJ471I9&B75$xyslB3b`zDFaxgkLl_~g_fA&D z(;tR+1ic4%0d{=ngIa7o;aj3M0;E`WI`; z=p%liXnyu!298j4QgP`~R&?e9$Bm}#vS4?j&ysh_#KTh${-K@`d6O%UIF~#e7UtND zLv>5!6{MoAak43HAQlENQV%c(m5~susF(EZ@#)0LJ=^@Ol~nUTsKh4|iR>&DH>lI%oEb}z71c1(xvzS9 z+`WS}_tTC^+oo>IZnh$_?ea`f#N^>)d3OgB%;ecbUkeI8 zJ7T^-)f#v#+5sgG|Pg~=!nTq&%I)jcm!u0J^@dA_mcgklOK;by$sga zK4)CQkGx>!<$vqJ&H#UJ2e#k5bnQPQ`y;0_xVP2wnWR{=K6`K#{*@`>R7j{?frz8R z{0LrbYA@fNR>r`X3mjT|Io2%M?NBk9ilw~@{jcmk)p&-s5NLI|GcN~QvE7|Mtp@Y^ zNK|~LrjxXb1}wCn*rX#X4FG`U+$i*T_(q`zs8xl7h4%H4mvQiLhSnMA!Krj^QD@U@ z&k;3p?BSGi(N2_JS8;;tu`k3-#I8A-!#jPeg@mJy4!*sQy70MxS#?%E{$^Ndwf2f; z8&}CKeb{Ns?(3CE!alPiRN~=LMv4W$mZ1QxFTI7!9<7fCzvpJNr77gWrbbsp{CR`P z7l(}&rkg*^Tp9W_y{5Qy(0MXwHvAfkWbC835SX}-BhT0=YY6mMF0SdUj+(138o7APnzNv~zV?dV^OFDwcx2)5)_e+1hAhP<0dB7m{ zj&LoDp0gvO;t;}npX^k^Ws|iw&SU5kC=Kh&q9C}}c#Uq-re^2-o8_qQW3Fh0_qBI) z^9K19|L%OSF7oh}{MRZ$=ffA&BgXhS8f#)n!v|BN>i{<6Vj8LS0^njg11@)5=+FiAjHg&da+5cJ)Tvk^0}W=$u1d5kczW6PXtVGWgIuUL>&4me@_3qg#1_q*^Y z##P{`gr}giTXyyDe)J;_3kC71Nv)0cf8?#_9FNSne5i7>vSTmHkp^#4jo^-%p`7-& zCr0UvznV(`qINmnxG|&Rw?a3J7D&|x9y&~aZ!SK4Gc;l`;g z(f>3ZOEsO>m64k98Xt}eF%W{Yw%M+a`#I{kPmfe51}?mpk!8e(MSc!Rkv=1T6W&Y8 z!vu&=`Q$iDN+mS1y)E7so~#A?fOy>I9^RF7-txq5tdkYfP}73poD%S6+q2Y9BMF^j zJkD!~Mqxa>g6$Z~PFvx}awQcy)by(A2j;>Xr6WHyBhJyfdKN7`!t! zq{pZ?$yU4fpRNw5GPup5+YU_j4dpj5;6Lnks6Mzep*!VA{SNwX`aicpq59xvf+qKm z`p+34`u}=QLG{7>hX&-2`VEZV^nY#}K=r|xh2{?!vm5n)3jb68KZGvyZ@@5v&iaoS s)lA?1=I5dfst+axbfA9JuRuWb|8;&C>(f*10{{f|l|XIrC+m~=KPH;OX#fBK From a4a1677400949750bf87a05fc9d47155a19edbfe Mon Sep 17 00:00:00 2001 From: "cuneyt.ozdas" Date: Fri, 19 Sep 2025 15:11:32 -0700 Subject: [PATCH 02/13] - converting [==] operator to [=] to make them POSIX complaint. Signed-off-by: cuneyt.ozdas --- share/ci/scripts/linux/dnf/install_doxygen.sh | 4 ++-- share/ci/scripts/macos/install_bison.sh | 2 +- share/ci/scripts/macos/install_boost.sh | 2 +- share/ci/scripts/macos/install_doxygen.sh | 2 +- share/ci/scripts/macos/install_oiio.sh | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/share/ci/scripts/linux/dnf/install_doxygen.sh b/share/ci/scripts/linux/dnf/install_doxygen.sh index 58dcd5a5ba..19b5592852 100755 --- a/share/ci/scripts/linux/dnf/install_doxygen.sh +++ b/share/ci/scripts/linux/dnf/install_doxygen.sh @@ -8,7 +8,7 @@ DOXYGEN_VERSION="$1" if ! command -v doxygen >/dev/null; then if command -v dnf >/dev/null; then - if [ "$DOXYGEN_VERSION" == "latest" ]; then + if [ "$DOXYGEN_VERSION" = "latest" ]; then dnf install -y doxygen else dnf install -y doxygen-${DOXYGEN_VERSION} @@ -46,7 +46,7 @@ EOF yum makecache fi - if [ "$DOXYGEN_VERSION" == "latest" ]; then + if [ "$DOXYGEN_VERSION" = "latest" ]; then yum install -y doxygen else yum install -y doxygen-${DOXYGEN_VERSION} diff --git a/share/ci/scripts/macos/install_bison.sh b/share/ci/scripts/macos/install_bison.sh index b04506e46d..dc35806e63 100755 --- a/share/ci/scripts/macos/install_bison.sh +++ b/share/ci/scripts/macos/install_bison.sh @@ -6,7 +6,7 @@ set -ex BISON_VERSION="$1" -if [ "$BISON_VERSION" == "latest" ]; then +if [ "$BISON_VERSION" = "latest" ]; then brew install bison else brew install bison@${BISON_VERSION} diff --git a/share/ci/scripts/macos/install_boost.sh b/share/ci/scripts/macos/install_boost.sh index be3034a0e6..52a0cc5f06 100755 --- a/share/ci/scripts/macos/install_boost.sh +++ b/share/ci/scripts/macos/install_boost.sh @@ -6,7 +6,7 @@ set -ex BOOST_VERSION="$1" -if [ "$BOOST_VERSION" == "latest" ]; then +if [ "$BOOST_VERSION" = "latest" ]; then brew install boost else brew install boost@${BOOST_VERSION} diff --git a/share/ci/scripts/macos/install_doxygen.sh b/share/ci/scripts/macos/install_doxygen.sh index 2dc282fee8..877e59e301 100755 --- a/share/ci/scripts/macos/install_doxygen.sh +++ b/share/ci/scripts/macos/install_doxygen.sh @@ -6,7 +6,7 @@ set -ex DOXYGEN_VERSION="$1" -if [ "$DOXYGEN_VERSION" == "latest" ]; then +if [ "$DOXYGEN_VERSION" = "latest" ]; then brew install --quiet --formula doxygen else brew install --quiet --formula doxygen@${DOXYGEN_VERSION} diff --git a/share/ci/scripts/macos/install_oiio.sh b/share/ci/scripts/macos/install_oiio.sh index 63baa90dd9..358aac6614 100755 --- a/share/ci/scripts/macos/install_oiio.sh +++ b/share/ci/scripts/macos/install_oiio.sh @@ -6,7 +6,7 @@ set -ex OIIO_VERSION="$1" -if [ "$OIIO_VERSION" == "latest" ]; then +if [ "$OIIO_VERSION" = "latest" ]; then brew install openimageio else brew install openimageio@${OIIO_VERSION} From 49e0093bcc39792288472bc0b44571e6a0c7151a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 08:18:43 +0100 Subject: [PATCH 03/13] Code cleanup (PR feedback) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- share/ci/scripts/multi/install_yaml-cpp.sh | 9 ++------- share/cmake/macros/GetPythonPreCommand.cmake | 6 +++--- share/cmake/modules/FindExtPackages.cmake | 1 - share/cmake/modules/install/Installpybind11.cmake | 3 ++- share/cmake/utils/CompilerFlags.cmake | 8 -------- 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/share/ci/scripts/multi/install_yaml-cpp.sh b/share/ci/scripts/multi/install_yaml-cpp.sh index 7265141379..f379ec584c 100755 --- a/share/ci/scripts/multi/install_yaml-cpp.sh +++ b/share/ci/scripts/multi/install_yaml-cpp.sh @@ -21,13 +21,8 @@ if [ "$YAMLCPP_VERSION" == "latest" ]; then LATEST_TAG=$(git describe --abbrev=0 --tags) git checkout tags/${LATEST_TAG} -b ${LATEST_TAG} else - if [[ "$YAMLCPP_MINOR" -lt 6 && "$YAMLCPP_PATCH" -lt 3 ]]; then - git checkout tags/release-${YAMLCPP_VERSION} -b release-${YAMLCPP_VERSION} - elif [[ "$YAMLCPP_MINOR" -lt 8 ]]; then - git checkout tags/yaml-cpp-${YAMLCPP_VERSION} -b yaml-cpp-${YAMLCPP_VERSION} - else - git checkout tags/${YAMLCPP_VERSION} -b ${YAMLCPP_VERSION} - fi + # From 0.8.0, tags are now simply the version number. + git checkout tags/${YAMLCPP_VERSION} -b ${YAMLCPP_VERSION} fi mkdir build diff --git a/share/cmake/macros/GetPythonPreCommand.cmake b/share/cmake/macros/GetPythonPreCommand.cmake index 018692a33d..22b39f33c1 100644 --- a/share/cmake/macros/GetPythonPreCommand.cmake +++ b/share/cmake/macros/GetPythonPreCommand.cmake @@ -52,9 +52,9 @@ macro(get_python_pre_command) list(APPEND _WIN_PATHS ${_WIN_PATH}) endforeach() - # Double % to escape as the cmd.exe will eat one level of %. That - # results in an empty path in the ENV variable and Python fails to - # convert that to absolute path. Possibly due to + # Double % to escape as an intermediate cmd.exe step causes early + # expansion. That results in an empty path in the ENV variable and + # Python 3.11+ fails to convert that to absolute path. Possibly due to # https://www.cve.news/cve-2023-41105/ list(APPEND _WIN_PATHS "%%PYTHONPATH%%") diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake index 6353bdf5c4..dcedb03a92 100644 --- a/share/cmake/modules/FindExtPackages.cmake +++ b/share/cmake/modules/FindExtPackages.cmake @@ -183,7 +183,6 @@ if(OCIO_BUILD_PYTHON OR OCIO_BUILD_DOCS) endif() endif() -# Set OpenEXR Minimum version as a variable since it it used at multiple places. if((OCIO_BUILD_APPS AND OCIO_USE_OIIO_FOR_APPS) OR OCIO_BUILD_TESTS) # OpenImageIO is required for OSL unit test and optional for apps. diff --git a/share/cmake/modules/install/Installpybind11.cmake b/share/cmake/modules/install/Installpybind11.cmake index f432d5289e..85aea7720a 100644 --- a/share/cmake/modules/install/Installpybind11.cmake +++ b/share/cmake/modules/install/Installpybind11.cmake @@ -120,7 +120,8 @@ if(_pybind11_TARGET_CREATE) INTERFACE_INCLUDE_DIRECTORIES ${pybind11_INCLUDE_DIR} ) - # See pybind11Common.cmake for reasoning + # /bigobj is needed for bigger binding projects due to the limit to 64k + # addressable sections (see pybind11Common.cmake). if (MSVC) set_target_properties(pybind11::module PROPERTIES INTERFACE_COMPILE_OPTIONS /bigobj diff --git a/share/cmake/utils/CompilerFlags.cmake b/share/cmake/utils/CompilerFlags.cmake index 3e609ef6a6..92f64fc0d1 100644 --- a/share/cmake/utils/CompilerFlags.cmake +++ b/share/cmake/utils/CompilerFlags.cmake @@ -60,14 +60,6 @@ if(USE_MSVC) # /we4062 Enables warning in switch when an enumeration value is not explicitly handled. set(PLATFORM_COMPILE_OPTIONS "${PLATFORM_COMPILE_OPTIONS};/EHsc;/DWIN32;/we4062") - # seems no longer needed, there were c++ modernization on 0.7.0. /coz -# if(${CMAKE_CXX_STANDARD} GREATER_EQUAL 17) -# # Inheriting from std::iterator is deprecated starting with C++17 and Yaml 0.6.3 does that. -# set(PLATFORM_COMPILE_OPTIONS -# "${PLATFORM_COMPILE_OPTIONS};/D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING" -# ) -# endif() - # Make MSVC compiler report correct __cplusplus version (otherwise reports 199711L) set(PLATFORM_COMPILE_OPTIONS "${PLATFORM_COMPILE_OPTIONS};/Zc:__cplusplus") From 1c7f48181076d52e6b99c5392ae4ccc20b6999d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 08:20:01 +0100 Subject: [PATCH 04/13] Remove ASWF container minor tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/ci_workflow.yml | 2 +- .github/workflows/dependencies_latest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index f76a61205f..ebf3c1fe06 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -57,7 +57,7 @@ jobs: container: # DockerHub: https://hub.docker.com/u/aswf # Source: https://github.com/AcademySoftwareFoundation/aswf-docker - image: aswf/ci-ocio:${{ matrix.vfx-cy }}.1 + image: aswf/ci-ocio:${{ matrix.vfx-cy }} strategy: fail-fast: true matrix: diff --git a/.github/workflows/dependencies_latest.yml b/.github/workflows/dependencies_latest.yml index 211e6f23b9..5774ec2258 100644 --- a/.github/workflows/dependencies_latest.yml +++ b/.github/workflows/dependencies_latest.yml @@ -38,7 +38,7 @@ jobs: container: # DockerHub: https://hub.docker.com/u/aswf # Source: https://github.com/AcademySoftwareFoundation/aswf-docker - image: aswf/ci-base:${{ matrix.vfx-cy }}.1 + image: aswf/ci-base:${{ matrix.vfx-cy }} strategy: matrix: build: [1, 2, 3, 4] From 3e3f6ee77e9948817eb957d2185331fb76d340a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 08:41:00 +0100 Subject: [PATCH 05/13] Debug dependencies latest Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/dependencies_latest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dependencies_latest.yml b/.github/workflows/dependencies_latest.yml index 5774ec2258..372c02098e 100644 --- a/.github/workflows/dependencies_latest.yml +++ b/.github/workflows/dependencies_latest.yml @@ -40,6 +40,7 @@ jobs: # Source: https://github.com/AcademySoftwareFoundation/aswf-docker image: aswf/ci-base:${{ matrix.vfx-cy }} strategy: + fail-fast: false matrix: build: [1, 2, 3, 4] include: From f1aede1d36553637208de74c1b24dad11010b8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 10:18:36 +0100 Subject: [PATCH 06/13] Attempt fixing dependencies latest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/dependencies_latest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dependencies_latest.yml b/.github/workflows/dependencies_latest.yml index 372c02098e..7b09761cf2 100644 --- a/.github/workflows/dependencies_latest.yml +++ b/.github/workflows/dependencies_latest.yml @@ -146,6 +146,8 @@ jobs: -DCMAKE_BUILD_TYPE=Release cmake --build . \ --config Release + # ASWF ci-base 2025.2 is missing lib64 (2025.1 have it) + export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH ./consumer working-directory: _build/tests/cmake-consumer-dist From 26087a37cd6979f8e102b83a31ea6eb8a76453a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 15:25:03 +0100 Subject: [PATCH 07/13] Try OpenEXR 3.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- share/cmake/modules/FindExtPackages.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake index dcedb03a92..8c697cc9e3 100644 --- a/share/cmake/modules/FindExtPackages.cmake +++ b/share/cmake/modules/FindExtPackages.cmake @@ -258,7 +258,7 @@ if(OCIO_BUILD_APPS) # Calling find_package in CONFIG mode using PREFER_CONFIG option. ocio_handle_dependency( OpenEXR PREFER_CONFIG ALLOW_INSTALL MIN_VERSION 3.2.0 - RECOMMENDED_VERSION 3.3.5 + RECOMMENDED_VERSION 3.4.0 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO" PROMOTE_TARGET OpenEXR::OpenEXR) From ae0cfe1ab0ea2a20b444ea4b4afc28606a09b37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 16:07:49 +0100 Subject: [PATCH 08/13] Adjust CMake imported target for OpenEXR 3.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .../modules/install/InstallOpenEXR.cmake | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/share/cmake/modules/install/InstallOpenEXR.cmake b/share/cmake/modules/install/InstallOpenEXR.cmake index 7fde736eed..6cc1354c4c 100644 --- a/share/cmake/modules/install/InstallOpenEXR.cmake +++ b/share/cmake/modules/install/InstallOpenEXR.cmake @@ -79,6 +79,7 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK set(_OpenEXR_LIB_VER "${_OpenEXR_VERSION_MAJOR}_${_OpenEXR_VERSION_MINOR}") + set(openjph_LIBRARY "${_EXT_DIST_ROOT}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}openjph${CMAKE_STATIC_LIBRARY_SUFFIX}") set_target_location(Iex) set_target_location(IlmThread) set_target_location(OpenEXR) @@ -150,6 +151,7 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK GIT_SHALLOW TRUE PREFIX "${_EXT_BUILD_ROOT}/openexr" BUILD_BYPRODUCTS + ${openjph_LIBRARY} ${Iex_LIBRARY} ${IlmThread_LIBRARY} ${OpenEXR_LIBRARY} @@ -168,6 +170,7 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK # Additional targets. ALIAS to UNKNOWN imported target is only possible # from CMake 3.15, so we explicitly define targets as STATIC here. + add_library(OpenEXR::openjph STATIC IMPORTED GLOBAL) add_library(OpenEXR::Iex STATIC IMPORTED GLOBAL) add_library(OpenEXR::IexConfig INTERFACE IMPORTED GLOBAL) add_library(OpenEXR::IlmThread STATIC IMPORTED GLOBAL) @@ -197,11 +200,17 @@ endif() if(_OpenEXR_TARGET_CREATE) file(MAKE_DIRECTORY ${OpenEXR_INCLUDE_DIR}/OpenEXR) + file(MAKE_DIRECTORY ${OpenEXR_INCLUDE_DIR}/openjph) + set_target_properties(OpenEXR::openjph PROPERTIES + IMPORTED_LOCATION ${openjph_LIBRARY} + INTERFACE_COMPILE_DEFINITIONS "_FILE_OFFSET_BITS=64" + INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}/openjph" + ) set_target_properties(OpenEXR::Iex PROPERTIES IMPORTED_LOCATION ${Iex_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;OpenEXR::IlmThreadConfig" + INTERFACE_LINK_LIBRARIES "OpenEXR::OpenEXRConfig;OpenEXR::OpenEXRConfig" ) set_target_properties(OpenEXR::IexConfig PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR};${OpenEXR_INCLUDE_DIR}/OpenEXR" @@ -209,7 +218,7 @@ if(_OpenEXR_TARGET_CREATE) set_target_properties(OpenEXR::IlmThread PROPERTIES IMPORTED_LOCATION ${IlmThread_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;OpenEXR::IlmThreadConfig;OpenEXR::Iex;Threads::Threads" + INTERFACE_LINK_LIBRARIES "OpenEXR::OpenEXRConfig;OpenEXR::OpenEXRConfig;OpenEXR::Iex;Threads::Threads" STATIC_LIBRARY_OPTIONS "-no_warning_for_no_symbols" ) set_target_properties(OpenEXR::IlmThreadConfig PROPERTIES @@ -218,7 +227,7 @@ if(_OpenEXR_TARGET_CREATE) set_target_properties(OpenEXR::OpenEXR PROPERTIES IMPORTED_LOCATION ${OpenEXR_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;Imath::Imath;OpenEXR::IlmThreadConfig;OpenEXR::Iex;OpenEXR::IlmThread;OpenEXR::OpenEXRCore" + INTERFACE_LINK_LIBRARIES "OpenEXR::OpenEXRConfig;Imath::Imath;OpenEXR::OpenEXRConfig;OpenEXR::Iex;OpenEXR::IlmThread;OpenEXR::OpenEXRCore" ) set_target_properties(OpenEXR::OpenEXRConfig PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR};${OpenEXR_INCLUDE_DIR}/OpenEXR" @@ -226,13 +235,13 @@ if(_OpenEXR_TARGET_CREATE) set_target_properties(OpenEXR::OpenEXRCore PROPERTIES IMPORTED_LOCATION ${OpenEXRCore_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;Imath::Imath" + INTERFACE_LINK_LIBRARIES "OpenEXR::OpenEXRConfig;Imath::Imath;OpenEXR::openjph" STATIC_LIBRARY_OPTIONS "-no_warning_for_no_symbols" ) set_target_properties(OpenEXR::OpenEXRUtil PROPERTIES IMPORTED_LOCATION ${OpenEXRUtil_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "OpenEXR::IlmThreadConfig;OpenEXR::OpenEXR;OpenEXR::OpenEXRCore" + INTERFACE_LINK_LIBRARIES "OpenEXR::OpenEXRConfig;OpenEXR::OpenEXR;OpenEXR::OpenEXRCore" ) mark_as_advanced(OpenEXR_INCLUDE_DIR OpenEXR_LIBRARY OpenEXR_VERSION) From 067b2711be3132b42eea17c9cf75ea46a46eb21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 16:47:50 +0100 Subject: [PATCH 09/13] Force internal OpenJPH when building OpenEXR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- share/cmake/modules/install/InstallOpenEXR.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/share/cmake/modules/install/InstallOpenEXR.cmake b/share/cmake/modules/install/InstallOpenEXR.cmake index 6cc1354c4c..8a43645e47 100644 --- a/share/cmake/modules/install/InstallOpenEXR.cmake +++ b/share/cmake/modules/install/InstallOpenEXR.cmake @@ -114,6 +114,7 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK -DOPENEXR_BUILD_EXAMPLES=OFF -DOPENEXR_BUILD_TOOLS=OFF -DOPENEXR_FORCE_INTERNAL_DEFLATE=ON + -DOPENEXR_FORCE_INTERNAL_OPENJPH=ON # Try to use in-source built Imath first, if available. -DCMAKE_PREFIX_PATH=${_EXT_DIST_ROOT} ) From 4a51ad47b05b4825dd2a8fae2bbccba53c9bd2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 20 Sep 2025 18:02:21 +0100 Subject: [PATCH 10/13] Attempt to fix OpenJPH library name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- share/cmake/modules/FindExtPackages.cmake | 1 + share/cmake/modules/install/InstallOpenEXR.cmake | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake index 8c697cc9e3..9bf17cf84e 100644 --- a/share/cmake/modules/FindExtPackages.cmake +++ b/share/cmake/modules/FindExtPackages.cmake @@ -245,6 +245,7 @@ if(OCIO_BUILD_APPS) # OpenEXR_VERSION - Library's version # # Imported targets defined by this module, if found: + # OpenEXR::openjph (version 3.4.0+) # OpenEXR::Iex # OpenEXR::IexConfig # OpenEXR::IlmThread diff --git a/share/cmake/modules/install/InstallOpenEXR.cmake b/share/cmake/modules/install/InstallOpenEXR.cmake index 8a43645e47..86404d27ee 100644 --- a/share/cmake/modules/install/InstallOpenEXR.cmake +++ b/share/cmake/modules/install/InstallOpenEXR.cmake @@ -79,7 +79,20 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK set(_OpenEXR_LIB_VER "${_OpenEXR_VERSION_MAJOR}_${_OpenEXR_VERSION_MINOR}") - set(openjph_LIBRARY "${_EXT_DIST_ROOT}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}openjph${CMAKE_STATIC_LIBRARY_SUFFIX}") + # Specify which OpenJPH version to use as we need to know the library name + # for the Windows library, and OpenEXR would otherwise pull the latest master + # branch commit which may result in less stable builds. + set(openjph_VERSION_MAJOR 0) + set(openjph_VERSION_MINOR 23) + set(openjph_VERSION_PATCH 1) + set(openjph_VERSION "${openjph_VERSION_MAJOR}.${openjph_VERSION_MINOR}.${openjph_VERSION_PATCH}") + + if (MSVC) + set(openjph_LIBRARY "${_EXT_DIST_ROOT}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}openjph.${openjph_VERSION_MAJOR}.${openjph_VERSION_MINOR}${_OpenEXR_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + else() + set(openjph_LIBRARY "${_EXT_DIST_ROOT}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}openjph${_OpenEXR_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + endif() + set_target_location(Iex) set_target_location(IlmThread) set_target_location(OpenEXR) @@ -115,6 +128,7 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK -DOPENEXR_BUILD_TOOLS=OFF -DOPENEXR_FORCE_INTERNAL_DEFLATE=ON -DOPENEXR_FORCE_INTERNAL_OPENJPH=ON + -DOPENEXR_OPENJPH_TAG=${openjph_VERSION} # Try to use in-source built Imath first, if available. -DCMAKE_PREFIX_PATH=${_EXT_DIST_ROOT} ) From 57a42f951bb575071a73f912cc70130a50d2fc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Tue, 23 Sep 2025 09:00:41 +0100 Subject: [PATCH 11/13] Adjust comment on OpenJPH version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- share/cmake/modules/install/InstallOpenEXR.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/cmake/modules/install/InstallOpenEXR.cmake b/share/cmake/modules/install/InstallOpenEXR.cmake index 86404d27ee..3cd9a7893a 100644 --- a/share/cmake/modules/install/InstallOpenEXR.cmake +++ b/share/cmake/modules/install/InstallOpenEXR.cmake @@ -80,8 +80,8 @@ if(NOT OpenEXR_FOUND AND OCIO_INSTALL_EXT_PACKAGES AND NOT OCIO_INSTALL_EXT_PACK set(_OpenEXR_LIB_VER "${_OpenEXR_VERSION_MAJOR}_${_OpenEXR_VERSION_MINOR}") # Specify which OpenJPH version to use as we need to know the library name - # for the Windows library, and OpenEXR would otherwise pull the latest master - # branch commit which may result in less stable builds. + # for the Windows library. OpenEXR 3.4.0 would install 0.22.0 by default, + # here we request the latest version at release time including build fixes. set(openjph_VERSION_MAJOR 0) set(openjph_VERSION_MINOR 23) set(openjph_VERSION_PATCH 1) From cfa76f57510f6b5e517bdd165af102ee41770c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Tue, 23 Sep 2025 09:01:14 +0100 Subject: [PATCH 12/13] Disable Python 3.14 wheels until the official release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/wheel_workflow.yml | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/wheel_workflow.yml b/.github/workflows/wheel_workflow.yml index f0877d8637..ed83e68457 100644 --- a/.github/workflows/wheel_workflow.yml +++ b/.github/workflows/wheel_workflow.yml @@ -101,10 +101,10 @@ jobs: manylinux: manylinux_2_28 python: cp313-manylinux_x86_64 arch: x86_64 - - build: CPython 3.14 64 bits manylinux_2_28 - manylinux: manylinux_2_28 - python: cp314-manylinux_x86_64 - arch: x86_64 + # - build: CPython 3.14 64 bits manylinux_2_28 + # manylinux: manylinux_2_28 + # python: cp314-manylinux_x86_64 + # arch: x86_64 # ------------------------------------------------------------------- # CPython 64 bits manylinux2014 # ------------------------------------------------------------------- @@ -128,10 +128,10 @@ jobs: manylinux: manylinux2014 python: cp313-manylinux_x86_64 arch: x86_64 - - build: CPython 3.14 64 bits manylinux2014 - manylinux: manylinux2014 - python: cp314-manylinux_x86_64 - arch: x86_64 + # - build: CPython 3.14 64 bits manylinux2014 + # manylinux: manylinux2014 + # python: cp314-manylinux_x86_64 + # arch: x86_64 steps: - uses: actions/checkout@v4 @@ -190,10 +190,10 @@ jobs: manylinux: manylinux2014 python: cp313-manylinux_aarch64 arch: aarch64 - - build: CPython 3.14 ARM 64 bits manylinux2014 - manylinux: manylinux2014 - python: cp314-manylinux_aarch64 - arch: aarch64 + # - build: CPython 3.14 ARM 64 bits manylinux2014 + # manylinux: manylinux2014 + # python: cp314-manylinux_aarch64 + # arch: aarch64 steps: - uses: actions/checkout@v4 @@ -247,9 +247,9 @@ jobs: - build: CPython 3.13 64 bits python: cp313-macosx_x86_64 arch: x86_64 - - build: CPython 3.14 64 bits - python: cp314-macosx_x86_64 - arch: x86_64 + # - build: CPython 3.14 64 bits + # python: cp314-macosx_x86_64 + # arch: x86_64 steps: - uses: actions/checkout@v4 @@ -306,9 +306,9 @@ jobs: - build: CPython 3.13 ARM 64 bits python: cp313-macosx_arm64 arch: arm64 - - build: CPython 3.14 ARM 64 bits - python: cp314-macosx_arm64 - arch: arm64 + # - build: CPython 3.14 ARM 64 bits + # python: cp314-macosx_arm64 + # arch: arm64 steps: - uses: actions/checkout@v4 @@ -361,9 +361,9 @@ jobs: - build: CPython 3.13 64 bits python: cp313-win_amd64 arch: AMD64 - - build: CPython 3.14 64 bits - python: cp314-win_amd64 - arch: AMD64 + # - build: CPython 3.14 64 bits + # python: cp314-win_amd64 + # arch: AMD64 steps: - uses: actions/checkout@v4 From 2938d119d2a99233694d7fb025d54117b5199586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Tue, 23 Sep 2025 09:19:55 +0100 Subject: [PATCH 13/13] Cleanup obsolete workarounds for OCIO_PYTHON_LOAD_DLLS_FROM_PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/ci_workflow.yml | 2 -- .github/workflows/platform_latest.yml | 4 ---- pyproject.toml | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index ebf3c1fe06..62ea921776 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -732,8 +732,6 @@ jobs: # --------------------------------------------------------------------------- # Windows # --------------------------------------------------------------------------- - # TODO: Install pythonXX_d.lib (or work around it being needed) to support - # Debug build testing with Python bindings and docs enabled. windows: name: 'Windows 2022 diff --git a/.github/workflows/platform_latest.yml b/.github/workflows/platform_latest.yml index aa0be17dd5..563e3561ea 100644 --- a/.github/workflows/platform_latest.yml +++ b/.github/workflows/platform_latest.yml @@ -351,10 +351,6 @@ jobs: - name: Test run: ctest -V -C ${{ matrix.build-type }} shell: bash - # See below issue for context: - # https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/2040 - env: - OCIO_PYTHON_LOAD_DLLS_FROM_PATH: "0" working-directory: _build - name: Test CMake Consumer with shared OCIO if: matrix.build-shared == 'ON' diff --git a/pyproject.toml b/pyproject.toml index f5677d1216..23631c12bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,5 @@ environment = { MACOSX_DEPLOYMENT_TARGET="10.15" } before-build = "share/ci/scripts/macos/install_docs_env.sh" [tool.cibuildwheel.windows] -# OCIO_PYTHON_LOAD_DLLS_FROM_PATH can cause segfaults in the current wheel workflow -# Disable for now as wheels are built with static dependencies. -environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH", OCIO_PYTHON_LOAD_DLLS_FROM_PATH="0" } +environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH" } before-build = 'bash -c "share/ci/scripts/windows/install_docs_env.sh $GITHUB_WORKSPACE/doxygen"'