From da9f785d6c3a2311079f314fe6f7e3e28392dd8f Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Fri, 28 Jul 2023 06:42:01 -0700 Subject: [PATCH] Rename IMATH_REPO/TAG to OPENEXR_IMATH_REPO/TAG and update install docs (#1495) For consistency with ``OPENEXR_DEFLATE_REPO`` and other config options. Also, add docs section for the ``DEFLATE`` options. Signed-off-by: Cary Phillips --- cmake/OpenEXRSetup.cmake | 12 +++++------ docs/install.rst | 45 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/cmake/OpenEXRSetup.cmake b/cmake/OpenEXRSetup.cmake index dc92e028be..1d631aba77 100644 --- a/cmake/OpenEXRSetup.cmake +++ b/cmake/OpenEXRSetup.cmake @@ -226,9 +226,9 @@ endif() option(OPENEXR_FORCE_INTERNAL_IMATH "Force using an internal imath" OFF) # Check to see if Imath is installed outside of the current build directory. -set(IMATH_REPO "https://github.com/AcademySoftwareFoundation/Imath.git" CACHE STRING +set(OPENEXR_IMATH_REPO "https://github.com/AcademySoftwareFoundation/Imath.git" CACHE STRING "Repo for auto-build of Imath") -set(IMATH_TAG "main" CACHE STRING +set(OPENEXR_IMATH_TAG "main" CACHE STRING "Tag for auto-build of Imath (branch, tag, or SHA)") if(NOT OPENEXR_FORCE_INTERNAL_IMATH) #TODO: ^^ Release should not clone from main, this is a place holder @@ -239,14 +239,14 @@ endif() if(NOT TARGET Imath::Imath AND NOT Imath_FOUND) if(OPENEXR_FORCE_INTERNAL_IMATH) - message(STATUS "Imath forced internal, installing from ${IMATH_REPO} (${IMATH_TAG})") + message(STATUS "Imath forced internal, installing from ${OPENEXR_IMATH_REPO} (${OPENEXR_IMATH_TAG})") else() - message(STATUS "Imath was not found, installing from ${IMATH_REPO} (${IMATH_TAG})") + message(STATUS "Imath was not found, installing from ${OPENEXR_IMATH_REPO} (${OPENEXR_IMATH_TAG})") endif() include(FetchContent) FetchContent_Declare(Imath - GIT_REPOSITORY "${IMATH_REPO}" - GIT_TAG "${IMATH_TAG}" + GIT_REPOSITORY "${OPENEXR_IMATH_REPO}" + GIT_TAG "${OPENEXR_IMATH_TAG}" GIT_SHALLOW ON ) diff --git a/docs/install.rst b/docs/install.rst index 4a864ffad7..cd34e18e4c 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -284,9 +284,9 @@ Imath Dependency * ``CMAKE_PREFIX_PATH`` - The standard CMake path in which to - search for dependencies, Imath in particular. A comma-separated - path. Add the root directory where Imath is installed. + The standard CMake path in which to search for dependencies, Imath + in particular. A comma-separated path. Add the root directory where + Imath is installed. * ``Imath_DIR`` @@ -296,6 +296,45 @@ Imath Dependency file, which is typically the ``lib/cmake/Imath`` folder of the root install directory. +* ``OPENEXR_IMATH_REPO`` and ``OPENEXR_IMATH_TAG`` + + The github Imath repo to auto-fetch if an installed library cannot + be found, and the tag to sync it to. The default repo is + ``https://github.com/AcademySoftwareFoundation/Imath.git`` and the + tag is specific to the OpenEXR release. The internal build is + configured as a CMake subproject. + +* ``OPENEXR_FORCE_INTERNAL_IMATH`` + + If set to ``ON``, force auto-fetching and internal building of Imath + using ``OPENEXR_IMATH_REPO`` and ``OPENEXR_IMATH_TAG``. This means + do *not* use any existing installation of Imath. + +libdeflate Dependency +~~~~~~~~~~~~~~~~~~~~~ + +As of OpenEXR release v3.2, OpenEXR depends on +`libdeflate `_ for +DEFLATE-based compression. Previous OpenEXR releases relied on `zlib +`_. Builds of OpenEXR can choose either an +libdeflat installation, or CMake can auto-fetch the source and build it +internally. The internal build is linked statically, so no extra +shared object is produced. + +* ``OPENEXR_DEFLATE_REPO`` and ``OPENEXR_DEFLATE_TAG`` + + The github Imath repo to auto-fetch if an installed library cannot + be found, and the tag to sync it to. The default repo is + ``https://github.com/ebiggers/libdeflate.git`` and the tag is + ``v1.18``. The internal build is configured as a CMake subproject. + +* ``OPENEXR_FORCE_INTERNAL_DEFLATE`` + + If set to ``ON``, force auto-fetching and internal building of + ``libdeflate`` using ``OPENEXR_DEFLATE_REPO`` and + ``OPENEXR_DEFLATE_TAG``. This means do *not* use any existing + installation of ``libdeflate``. + Namespace Options ~~~~~~~~~~~~~~~~~