Skip to content

Commit

Permalink
fix ZERO_CHECK OpenEXR's deps timestamp issues, update libdeflate sub…
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
AnastaZIuk committed Sep 19, 2024
1 parent 337d13a commit 05607aa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
33 changes: 16 additions & 17 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,42 +193,41 @@ option(PNG_TESTS "Build libpng tests" OFF)
add_subdirectory(libpng libpng EXCLUDE_FROM_ALL)
add_dependencies(png_static zlibstatic)


# OpenEXR
option(_NBL_COMPILE_WITH_OPEN_EXR_ "Build with OpenEXR library" ON)

# Imath
set(IMATH_INSTALL OFF)
add_subdirectory(imath EXCLUDE_FROM_ALL)

if(_NBL_COMPILE_WITH_OPEN_EXR_)
# Deflate
option(LIBDEFLATE_BUILD_SHARED_LIB "" OFF)
option(LIBDEFLATE_BUILD_STATIC_LIB "" ON)
option(LIBDEFLATE_GZIP_SUPPORT "" OFF)
option(LIBDEFLATE_BUILD_GZIP "" OFF)
set(LIBDEFLATE_BUILD_SHARED_LIB OFF)
set(LIBDEFLATE_BUILD_STATIC_LIB ON)
set(LIBDEFLATE_GZIP_SUPPORT OFF)
set(LIBDEFLATE_BUILD_GZIP OFF)
add_subdirectory(libdeflate EXCLUDE_FROM_ALL)
set(libdeflate_DIR "${CMAKE_CURRENT_BINARY_DIR}/libdeflate")

# OpenEXR
set(OPENEXR_FORCE_INTERNAL_DEFLATE ON) # trick it into thinking its internal
set(EXR_DEFLATE_LIB libdeflate_static) # and pass deflate target directly from our build tree
set(OPENEXR_FORCE_INTERNAL_IMATH ON) # similar case, force it to look into target from build tree
set(_OLD_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
set(_OLD_BUILD_STATIC_LIBS ${BUILD_STATIC_LIBS})
set(_OLD_BUILD_TESTING ${BUILD_TESTING})
set(BUILD_SHARED_LIBS OFF)
set(BUILD_STATIC_LIBS OFF)
set(BUILD_TESTING OFF)
set(PYILMBASE_ENABLE OFF CACHE STRING "" FORCE)
set(OPENEXR_BUILD_UTILS OFF CACHE STRING "" FORCE)
set(OPENEXR_FORCE_INTERNAL_IMATH OFF CACHE STRING "" FORCE)
set(OPENEXR_FORCE_INTERNAL_DEFLATE OFF CACHE STRING "" FORCE)
set(OPENEXR_BUILD_TOOLS OFF CACHE STRING "" FORCE)
set(OPENEXR_INSTALL OFF CACHE STRING "" FORCE)
set(OPENEXR_INSTALL_DOCS OFF CACHE STRING "" FORCE)
set(OPENEXR_INSTALL_EXAMPLES OFF CACHE STRING "" FORCE)
set(OPENEXR_INSTALL_PKG_CONFIG OFF CACHE STRING "" FORCE)
set(OPENEXR_INSTALL_TOOLS OFF CACHE STRING "" FORCE)

set(PYILMBASE_ENABLE OFF)
set(OPENEXR_BUILD_UTILS OFF)
set(OPENEXR_BUILD_TOOLS OFF)
set(OPENEXR_INSTALL OFF)
set(OPENEXR_INSTALL_DOCS OFF)
set(OPENEXR_INSTALL_EXAMPLES OFF)
set(OPENEXR_INSTALL_PKG_CONFIG OFF)
set(OPENEXR_INSTALL_TOOLS OFF)
add_subdirectory(openexr EXCLUDE_FROM_ALL)

set(BUILD_SHARED_LIBS ${_OLD_BUILD_SHARED_LIBS})
set(BUILD_STATIC_LIBS ${_OLD_BUILD_STATIC_LIBS})
set(BUILD_TESTING ${_OLD_BUILD_TESTING})
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libdeflate
Submodule libdeflate updated 1 files
+0 −4 CMakeLists.txt

1 comment on commit 05607aa

@AnastaZIuk
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolves our issues with AcademySoftwareFoundation/Imath#437

Please sign in to comment.