Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename IMATH_REPO/TAG to OPENEXR_IMATH_REPO/TAG and update install docs #1495

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cmake/OpenEXRSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)

Expand Down
45 changes: 42 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``

Expand All @@ -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 </~https://github.com/ebiggers/libdeflate>`_ for
DEFLATE-based compression. Previous OpenEXR releases relied on `zlib
<https://www.zlib.net>`_. 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
~~~~~~~~~~~~~~~~~

Expand Down