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..ced7859f64 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. + # if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # 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: | @@ -169,7 +159,7 @@ jobs: docs=${{ matrix.build-docs }}, python=${{ matrix.python-version }}>' # Don't run on OCIO forks - if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' runs-on: macos-latest strategy: matrix: @@ -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 @@ -274,7 +256,7 @@ jobs: docs=${{ matrix.build-docs }}, python=${{ matrix.python-version }}>' # Don't run on OCIO forks - if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' runs-on: windows-latest strategy: matrix: @@ -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..c6f1ab1c26 100644 --- a/.github/workflows/platform_latest.yml +++ b/.github/workflows/platform_latest.yml @@ -33,7 +33,7 @@ jobs: shared=${{ matrix.build-shared }}, cxx=${{ matrix.cxx-standard }}>' # Don't run on OCIO forks - if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' runs-on: ubuntu-latest strategy: matrix: @@ -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 \ @@ -175,7 +175,7 @@ jobs: cxx=${{ matrix.cxx-standard }}, python=${{ matrix.python-version }}>' # Don't run on OCIO forks - if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' runs-on: macos-latest strategy: matrix: @@ -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 \ @@ -288,7 +288,7 @@ jobs: cxx=${{ matrix.cxx-standard }}, python=${{ matrix.python-version }}>' # Don't run on OCIO forks - if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: github.repository == 'AcademySoftwareFoundation/OpenColorIO' runs-on: windows-latest strategy: matrix: @@ -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 376b006c04..e61ac1f034 100644 --- a/.github/workflows/wheel_workflow.yml +++ b/.github/workflows/wheel_workflow.yml @@ -45,9 +45,9 @@ jobs: name: Build SDist runs-on: ubuntu-latest # Don't run on OCIO forks - if: | - github.event_name != 'schedule' || - github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: | + # github.event_name != 'schedule' || + # github.repository == 'AcademySoftwareFoundation/OpenColorIO' steps: @@ -72,19 +72,16 @@ jobs: name: Build wheels on Linux runs-on: ubuntu-latest # Don't run on OCIO forks - if: | - github.event_name != 'schedule' || - github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: | + # github.event_name != 'schedule' || + # github.repository == 'AcademySoftwareFoundation/OpenColorIO' strategy: + fail-fast: false matrix: include: # ------------------------------------------------------------------- # 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 +102,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 +129,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 +140,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 }} @@ -161,19 +162,16 @@ jobs: name: Build wheels on Linux ARM runs-on: ubuntu-24.04-arm # Don't run on OCIO forks - if: | - github.event_name != 'schedule' || - github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # if: | + # github.event_name != 'schedule' || + # github.repository == 'AcademySoftwareFoundation/OpenColorIO' strategy: + fail-fast: false matrix: include: # ------------------------------------------------------------------- # 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 +192,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 +203,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 }} @@ -222,19 +224,16 @@ jobs: macos: name: Build wheels on macOS runs-on: macos-13 - # Don't run on OCIO forks - if: | - github.event_name != 'schedule' || - github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # # Don't run on OCIO forks + # if: | + # github.event_name != 'schedule' || + # github.repository == 'AcademySoftwareFoundation/OpenColorIO' strategy: matrix: include: # ------------------------------------------------------------------- # 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 +249,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,10 +259,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 }} @@ -277,19 +279,16 @@ jobs: macos-arm: name: Build wheels on macOS ARM runs-on: macos-14 - # Don't run on OCIO forks - if: | - github.event_name != 'schedule' || - github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # # Don't run on OCIO forks + # if: | + # github.event_name != 'schedule' || + # github.repository == 'AcademySoftwareFoundation/OpenColorIO' strategy: matrix: include: # ------------------------------------------------------------------- # 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 @@ -305,6 +304,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 @@ -312,10 +314,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 }} @@ -332,19 +334,17 @@ jobs: windows: name: Build wheels on Windows runs-on: windows-2022 - # Don't run on OCIO forks - if: | - github.event_name != 'schedule' || - github.repository == 'AcademySoftwareFoundation/OpenColorIO' + # # Don't run on OCIO forks + # if: | + # github.event_name != 'schedule' || + # github.repository == 'AcademySoftwareFoundation/OpenColorIO' strategy: + fail-fast: false matrix: include: # ------------------------------------------------------------------- # 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 @@ -360,6 +360,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 @@ -367,10 +370,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 }} @@ -382,7 +385,7 @@ jobs: upload_pypi: - needs: [sdist, linux, macos, macos-arm, windows] + needs: [sdist, linux, linux-arm, macos, macos-arm, windows] runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') steps: 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..8f8f343526 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) +- \*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 >= 3.0.8 (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.1.6 (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 aa2550ac76..4dd9a64513 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") ############################################################################### @@ -97,13 +97,10 @@ ocio_handle_dependency( Imath REQUIRED ALLOW_INSTALL # ZLIB_USE_STATIC_LIBS Set to ON if static library is prefered (CMake 3.24+) # ############################################################################### -# ZLIB 1.2.13 is used since it fixes a critical vulnerability. -# 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 +108,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 +130,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 +139,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 +176,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.0.5") 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 +255,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.5 + MIN_VERSION 3.2.0 + RECOMMENDED_VERSION 3.3.5 RECOMMENDED_VERSION_REASON "Latest version tested with OCIO" PROMOTE_TARGET OpenEXR::OpenEXR) @@ -285,8 +281,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/src/apps/ocioconvert/main.cpp b/src/apps/ocioconvert/main.cpp index e8071c76fa..4f35899ffe 100644 --- a/src/apps/ocioconvert/main.cpp +++ b/src/apps/ocioconvert/main.cpp @@ -15,6 +15,9 @@ namespace OCIO = OCIO_NAMESPACE; #ifdef OCIO_GPU_ENABLED #include "oglapp.h" +#if __APPLE__ +#include "metalapp.h" +#endif #endif // OCIO_GPU_ENABLED #include "imageio.h" @@ -53,6 +56,9 @@ int main(int argc, const char **argv) std::string inputconfig; bool usegpu = false; +#if __APPLE__ + bool useMetal = false; +#endif bool usegpuLegacy = false; bool outputgpuInfo = false; bool verbose = false; @@ -80,6 +86,9 @@ int main(int argc, const char **argv) "--namedtransform", &useNamedTransform, "Convert using a named transform in the forward direction", "--invnamedtransform", &useInvNamedTransform, "Convert using a named transform in the inverse direction", "--gpu", &usegpu, "Use GPU color processing instead of CPU (CPU is the default)", +#if __APPLE__ + "--metal", &useMetal, "Use Metal", +#endif "--gpulegacy", &usegpuLegacy, "Use the legacy (i.e. baked) GPU color processing " "instead of the CPU one (--gpu is ignored)", "--gpuinfo", &outputgpuInfo, "Output the OCIO shader program", @@ -383,7 +392,16 @@ int main(int argc, const char **argv) try { - oglApp = OCIO::OglApp::CreateOglApp("ocioconvert", 256, 20); + #if __APPLE__ + if (useMetal) + { + oglApp = std::make_shared("ocioconvert", 256, 20); + } + else + #endif + { + oglApp = OCIO::OglApp::CreateOglApp("ocioconvert", 256, 20); + } } catch (const OCIO::Exception & e) { @@ -486,7 +504,11 @@ int main(int argc, const char **argv) { // Get the GPU shader program from the processor and set oglApp to use it. OCIO::GpuShaderDescRcPtr shaderDesc = OCIO::GpuShaderDesc::CreateShaderDesc(); - shaderDesc->setLanguage(OCIO::GPU_LANGUAGE_GLSL_1_2); + shaderDesc->setLanguage( + #if __APPLE__ + useMetal ? OCIO::GPU_LANGUAGE_MSL_2_0 : + #endif + OCIO::GPU_LANGUAGE_GLSL_1_2); OCIO::ConstGPUProcessorRcPtr gpu = usegpuLegacy ? processor->getOptimizedLegacyGPUProcessor(OCIO::OPTIMIZATION_DEFAULT, 32) 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 091b68e52d..eb52db3a76 100644 Binary files a/tests/data/files/configs/context_test1/context_test1_windows.ocioz and b/tests/data/files/configs/context_test1/context_test1_windows.ocioz differ