[openvdb] Update to 7.0.0 (#10020)

This commit is contained in:
Phoebe 2020-02-12 08:45:01 +08:00 committed by GitHub
parent 716d189d6b
commit be6d78f1e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 589 additions and 573 deletions

View File

@ -1,129 +1,145 @@
diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake
index 03e361e..b44f46d 100644
--- a/cmake/FindBlosc.cmake
+++ b/cmake/FindBlosc.cmake
@@ -104,11 +104,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find blosc
-
-find_package(PkgConfig)
-pkg_check_modules(PC_Blosc QUIET blosc)
-
# ------------------------------------------------------------------------
# Search for blosc include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake
index fb8a28b..fea685e 100644
--- a/cmake/FindCppUnit.cmake
+++ b/cmake/FindCppUnit.cmake
@@ -106,11 +106,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find cppunit
-
-find_package(PkgConfig)
-pkg_check_modules(PC_CppUnit QUIET cppunit)
-
# ------------------------------------------------------------------------
# Search for CppUnit include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake
index f0a0d7f..9f31355 100644
--- a/cmake/FindIlmBase.cmake
+++ b/cmake/FindIlmBase.cmake
@@ -152,11 +152,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find IlmBase
-
-find_package(PkgConfig)
-pkg_check_modules(PC_IlmBase QUIET IlmBase)
-
# ------------------------------------------------------------------------
# Search for IlmBase include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindLog4cplus.cmake b/cmake/FindLog4cplus.cmake
index 6890724..10dc931 100644
--- a/cmake/FindLog4cplus.cmake
+++ b/cmake/FindLog4cplus.cmake
@@ -106,11 +106,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find log4cplus
-
-find_package(PkgConfig)
-pkg_check_modules(PC_Log4cplus QUIET log4cplus)
-
# ------------------------------------------------------------------------
# Search for Log4cplus include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
index 302c1df..3d00c3d 100644
--- a/cmake/FindOpenEXR.cmake
+++ b/cmake/FindOpenEXR.cmake
@@ -145,11 +145,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find OpenEXR
-
-find_package(PkgConfig)
-pkg_check_modules(PC_OpenEXR QUIET OpenEXR)
-
# ------------------------------------------------------------------------
# Search for OpenEXR include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index 783dfed..1fd43be 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -153,11 +153,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find OpenVDB
-
-find_package(PkgConfig)
-pkg_check_modules(PC_OpenVDB QUIET OpenVDB)
-
# This CMake module supports being called from external packages AND from
# within the OpenVDB repository for building openvdb components with the
# core library build disabled. Determine where we are being called from:
diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
index 01696ce..8fe73e5 100644
--- a/cmake/FindTBB.cmake
+++ b/cmake/FindTBB.cmake
@@ -141,11 +141,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find Tbb
-
-find_package(PkgConfig)
-pkg_check_modules(PC_Tbb QUIET tbb)
-
# ------------------------------------------------------------------------
# Search for tbb include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/OpenVDBGLFW3Setup.cmake b/cmake/OpenVDBGLFW3Setup.cmake
index 3a29dc7..4dc6269 100644
--- a/cmake/OpenVDBGLFW3Setup.cmake
+++ b/cmake/OpenVDBGLFW3Setup.cmake
@@ -77,12 +77,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find glfw, though we only use
-# pkg-config to re-direct to the cmake. In other words, glfw's cmake is
-# expected to be installed
-find_package(PkgConfig)
-pkg_check_modules(PC_glfw3 QUIET glfw3)
-
if(PC_glfw3_FOUND)
foreach(DIR ${PC_glfw3_LIBRARY_DIRS})
list(APPEND _GLFW3_ROOT_SEARCH_DIR ${DIR})
diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake
index cc80fc5..3ead1b3 100644
--- a/cmake/FindBlosc.cmake
+++ b/cmake/FindBlosc.cmake
@@ -99,13 +99,6 @@ elseif(DEFINED ENV{BLOSC_ROOT})
set(_BLOSC_ROOT $ENV{BLOSC_ROOT})
endif()
-# Additionally try and use pkconfig to find blosc
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_Blosc QUIET blosc)
-
# ------------------------------------------------------------------------
# Search for blosc include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake
index af121ba..8fda97c 100644
--- a/cmake/FindCppUnit.cmake
+++ b/cmake/FindCppUnit.cmake
@@ -101,13 +101,6 @@ elseif(DEFINED ENV{CPPUNIT_ROOT})
set(_CPPUNIT_ROOT $ENV{CPPUNIT_ROOT})
endif()
-# Additionally try and use pkconfig to find cppunit
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_CppUnit QUIET cppunit)
-
# ------------------------------------------------------------------------
# Search for CppUnit include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake
index f20f803..00a6d30 100644
--- a/cmake/FindIlmBase.cmake
+++ b/cmake/FindIlmBase.cmake
@@ -142,13 +142,6 @@ elseif(DEFINED ENV{ILMBASE_ROOT})
set(_ILMBASE_ROOT $ENV{ILMBASE_ROOT})
endif()
-# Additionally try and use pkconfig to find IlmBase
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_IlmBase QUIET IlmBase)
-
# ------------------------------------------------------------------------
# Search for IlmBase include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindLog4cplus.cmake b/cmake/FindLog4cplus.cmake
index f11472e..f7388d4 100644
--- a/cmake/FindLog4cplus.cmake
+++ b/cmake/FindLog4cplus.cmake
@@ -101,13 +101,6 @@ elseif(DEFINED ENV{LOG4CPLUS_ROOT})
set(_LOG4CPLUS_ROOT $ENV{LOG4CPLUS_ROOT})
endif()
-# Additionally try and use pkconfig to find log4cplus
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_Log4cplus QUIET log4cplus)
-
# ------------------------------------------------------------------------
# Search for Log4cplus include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
index d0d356f..3d243d0 100644
--- a/cmake/FindOpenEXR.cmake
+++ b/cmake/FindOpenEXR.cmake
@@ -135,13 +135,6 @@ elseif(DEFINED ENV{OPENEXR_ROOT})
set(_OPENEXR_ROOT $ENV{OPENEXR_ROOT})
endif()
-# Additionally try and use pkconfig to find OpenEXR
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_OpenEXR QUIET OpenEXR)
-
# ------------------------------------------------------------------------
# Search for OpenEXR include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index 18b1c83..01a2f04 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -142,13 +142,6 @@ elseif(DEFINED ENV{OPENVDB_ROOT})
set(_OPENVDB_ROOT $ENV{OPENVDB_ROOT})
endif()
-# Additionally try and use pkconfig to find OpenVDB
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_OpenVDB QUIET OpenVDB)
-
# This CMake module supports being called from external packages AND from
# within the OpenVDB repository for building openvdb components with the
# core library build disabled. Determine where we are being called from:
diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
index a537300..4be895b 100644
--- a/cmake/FindTBB.cmake
+++ b/cmake/FindTBB.cmake
@@ -126,13 +126,6 @@ elseif(DEFINED ENV{TBB_ROOT})
set(_TBB_ROOT $ENV{TBB_ROOT})
endif()
-# Additionally try and use pkconfig to find Tbb
-
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_Tbb QUIET tbb)
-
# ------------------------------------------------------------------------
# Search for tbb include DIR
# ------------------------------------------------------------------------
diff --git a/cmake/OpenVDBGLFW3Setup.cmake b/cmake/OpenVDBGLFW3Setup.cmake
index 84e54d9..bac685c 100644
--- a/cmake/OpenVDBGLFW3Setup.cmake
+++ b/cmake/OpenVDBGLFW3Setup.cmake
@@ -65,14 +65,6 @@ else()
endif()
endif()
-# Additionally try and use pkconfig to find glfw, though we only use
-# pkg-config to re-direct to the cmake. In other words, glfw's cmake is
-# expected to be installed
-if(NOT DEFINED PKG_CONFIG_FOUND)
- find_package(PkgConfig)
-endif()
-pkg_check_modules(PC_glfw3 QUIET glfw3)
-
if(PC_glfw3_FOUND)
foreach(DIR ${PC_glfw3_LIBRARY_DIRS})
list(APPEND _GLFW3_ROOT_SEARCH_DIR ${DIR})

View File

@ -1,311 +1,308 @@
diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake
index ae84240..5630b6b 100644
--- a/cmake/FindBlosc.cmake
+++ b/cmake/FindBlosc.cmake
@@ -86,7 +86,7 @@ may be provided to tell this module where to look.
Paths appended to all include and lib searches.
#]=======================================================================]
-
+if (0)
mark_as_advanced(
Blosc_INCLUDE_DIR
Blosc_LIBRARY
@@ -211,3 +211,30 @@ if(Blosc_FOUND)
elseif(Blosc_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find Blosc")
endif()
+else()
+FIND_PACKAGE ( PackageHandleStandardArgs )
+FIND_PATH( BLOSC_LOCATION include/blosc.h)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc
+ REQUIRED_VARS BLOSC_LOCATION
+ )
+IF ( BLOSC_FOUND )
+SET ( _blosc_library_name "blosc" )
+ # Static library setup
+ IF (Blosc_USE_STATIC_LIBS)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ IF (WIN32)
+ SET ( _blosc_library_name "libblosc" )
+ ELSE ()
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ ENDIF ()
+ ENDIF()
+ FIND_LIBRARY ( BLOSC_blosc_LIBRARY ${_blosc_library_name}
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ # Static library tear down
+ IF (Blosc_USE_STATIC_LIBS)
+ SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} )
+ ENDIF()
+ SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/include" CACHE STRING "Blosc include directory" )
+ENDIF ( BLOSC_FOUND )
+endif()
\ No newline at end of file
diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake
index c58083e..438fc83 100644
--- a/cmake/FindIlmBase.cmake
+++ b/cmake/FindIlmBase.cmake
@@ -100,7 +100,7 @@ may be provided to tell this module where to look.
Paths appended to all include and lib searches.
#]=======================================================================]
-
+if (0)
# Support new if() IN_LIST operator
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
@@ -330,3 +330,144 @@ if(IlmBase_FOUND)
elseif(IlmBase_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find IlmBase")
endif()
+else()
+FIND_PACKAGE ( PackageHandleStandardArgs )
+FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS ( ILMBase
+ REQUIRED_VARS ILMBASE_LOCATION
+ )
+OPTION ( ILMBASE_NAMESPACE_VERSIONING "Namespace versioning of libraries" ON )
+
+IF ( ILMBASE_FOUND )
+
+ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ")
+ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}")
+ STRING ( STRIP "${_ilmbase_version_major_unstrip}" ILMBASE_VERSION_MAJOR )
+
+ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ")
+ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}")
+ STRING ( STRIP "${_ilmbase_version_minor_unstrip}" ILMBASE_VERSION_MINOR )
+
+ IF ( ILMBASE_NAMESPACE_VERSIONING )
+ SET ( IEX_LIBRARY_NAME Iex-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( IMATH_LIBRARY_NAME Imath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( HALF_LIBRARY_NAME Half-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ ELSE ( ILMBASE_NAMESPACE_VERSIONING )
+ SET ( IEX_LIBRARY_NAME Iex )
+ SET ( IEXMATH_LIBRARY_NAME IexMath )
+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread )
+ SET ( IMATH_LIBRARY_NAME Imath )
+ SET ( HALF_LIBRARY_NAME Half )
+ ENDIF ( ILMBASE_NAMESPACE_VERSIONING )
+
+ SET ( ILMBASE_INCLUDE_DIRS
+ ${ILMBASE_LOCATION}/include
+ ${ILMBASE_LOCATION}/include/OpenEXR
+ CACHE STRING "ILMBase include directories")
+ SET ( ILMBASE_LIBRARYDIR ${ILMBASE_LOCATION}/lib
+ CACHE STRING "ILMBase library directories")
+ SET ( ILMBASE_FOUND TRUE )
+
+ SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ IF (Ilmbase_USE_STATIC_LIBS)
+ IF (APPLE)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} )
+ ELSEIF (WIN32)
+ # Link library
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half_static PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex_static PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread_static PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath_static PATHS ${ILMBASE_LIBRARYDIR} )
+ ELSE (APPLE)
+ SET ( CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ ENDIF (APPLE)
+ ELSE (Ilmbase_USE_STATIC_LIBS)
+ IF (APPLE)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} )
+ ELSEIF (WIN32)
+ # Link library
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ # Load library
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
+ FIND_LIBRARY ( Ilmbase_HALF_DLL ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LOCATION}/bin
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEX_DLL ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEXMATH_DLL ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_DLL ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IMATH_DLL ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ ELSE (APPLE)
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ ENDIF (APPLE)
+ ENDIF ()
+ # MUST reset
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES})
+
+ELSE ( ILMBASE_FOUND )
+ MESSAGE ( FATAL_ERROR "Unable to find ILMBase, ILMBASE_ROOT = $ENV{ILMBASE_ROOT}")
+ENDIF ( ILMBASE_FOUND )
+endif()
\ No newline at end of file
diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
index 98bd53d..c3b449e 100644
--- a/cmake/FindOpenEXR.cmake
+++ b/cmake/FindOpenEXR.cmake
@@ -96,7 +96,7 @@ may be provided to tell this module where to look.
Paths appended to all include and lib searches.
#]=======================================================================]
-
+if (0)
# Support new if() IN_LIST operator
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
@@ -322,3 +322,92 @@ if(OpenEXR_FOUND)
elseif(OpenEXR_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find OpenEXR")
endif()
+else()
+include(FindPackageHandleStandardArgs)
+
+find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h)
+find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR)
+
+file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H)
+
+string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}")
+string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}")
+set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}")
+
+include(SelectLibraryConfigurations)
+
+if(NOT OpenEXR_BASE_LIBRARY)
+ find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_BASE)
+endif()
+
+if(NOT OpenEXR_UTIL_LIBRARY)
+ find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_UTIL)
+endif()
+
+if(NOT OpenEXR_HALF_LIBRARY)
+ find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_HALF)
+endif()
+
+if(NOT OpenEXR_IEX_LIBRARY)
+ find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_IEX)
+endif()
+
+if(NOT OpenEXR_MATH_LIBRARY)
+ find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_MATH)
+endif()
+
+if(NOT OpenEXR_THREAD_LIBRARY)
+ find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_THREAD)
+endif()
+
+if(NOT OpenEXR_IEXMATH_LIBRARY)
+ find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}d)
+ select_library_configurations(OpenEXR_IEXMATH)
+endif()
+
+set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}")
+set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}")
+set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}")
+set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}")
+set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}")
+set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}")
+
+set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}")
+
+set(OpenEXR_LIBRARIES
+ ${OpenEXR_LIBRARY}
+ ${OpenEXR_MATH_LIBRARY}
+ ${OpenEXR_IEXMATH_LIBRARY}
+ ${OpenEXR_UTIL_LIBRARY}
+ ${OpenEXR_HALF_LIBRARY}
+ ${OpenEXR_IEX_LIBRARY}
+ ${OpenEXR_THREAD_LIBRARY}
+)
+
+set(OPENEXR_LIBRARIES
+ ${OPENEXR_HALF_LIBRARY}
+ ${OPENEXR_IEX_LIBRARY}
+ ${OPENEXR_IMATH_LIBRARY}
+ ${OPENEXR_ILMIMF_LIBRARY}
+ ${OPENEXR_ILMTHREAD_LIBRARY}
+)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS)
+
+if(OpenEXR_FOUND)
+ set(OPENEXR_FOUND 1)
+endif()
+endif()
\ No newline at end of file
diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake
index 3ead1b3..0522e4a 100644
--- a/cmake/FindBlosc.cmake
+++ b/cmake/FindBlosc.cmake
@@ -75,6 +75,7 @@ if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
+if(0)
mark_as_advanced(
Blosc_INCLUDE_DIR
Blosc_LIBRARY
@@ -206,3 +207,30 @@ if(Blosc_FOUND)
elseif(Blosc_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find Blosc")
endif()
+else()
+FIND_PACKAGE ( PackageHandleStandardArgs )
+FIND_PATH( BLOSC_LOCATION include/blosc.h)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc
+ REQUIRED_VARS BLOSC_LOCATION
+ )
+IF ( BLOSC_FOUND )
+SET ( _blosc_library_name "blosc" )
+ # Static library setup
+ IF (Blosc_USE_STATIC_LIBS)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ IF (WIN32)
+ SET ( _blosc_library_name "libblosc" )
+ ELSE ()
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ ENDIF ()
+ ENDIF()
+ FIND_LIBRARY ( BLOSC_blosc_LIBRARY ${_blosc_library_name}
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ # Static library tear down
+ IF (Blosc_USE_STATIC_LIBS)
+ SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} )
+ ENDIF()
+ SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/include" CACHE STRING "Blosc include directory" )
+ENDIF ( BLOSC_FOUND )
+endif()
\ No newline at end of file
diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake
index 00a6d30..10322fd 100644
--- a/cmake/FindIlmBase.cmake
+++ b/cmake/FindIlmBase.cmake
@@ -84,6 +84,7 @@ may be provided to tell this module where to look.
cmake_minimum_required(VERSION 3.3)
+if(0)
# Monitoring <PackageName>_ROOT variables
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
@@ -320,3 +321,144 @@ if(IlmBase_FOUND)
elseif(IlmBase_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find IlmBase")
endif()
+else()
+FIND_PACKAGE ( PackageHandleStandardArgs )
+FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS ( ILMBase
+ REQUIRED_VARS ILMBASE_LOCATION
+ )
+OPTION ( ILMBASE_NAMESPACE_VERSIONING "Namespace versioning of libraries" ON )
+
+IF ( ILMBASE_FOUND )
+
+ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ")
+ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}")
+ STRING ( STRIP "${_ilmbase_version_major_unstrip}" ILMBASE_VERSION_MAJOR )
+
+ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ")
+ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}")
+ STRING ( STRIP "${_ilmbase_version_minor_unstrip}" ILMBASE_VERSION_MINOR )
+
+ IF ( ILMBASE_NAMESPACE_VERSIONING )
+ SET ( IEX_LIBRARY_NAME Iex-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( IMATH_LIBRARY_NAME Imath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ SET ( HALF_LIBRARY_NAME Half-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} )
+ ELSE ( ILMBASE_NAMESPACE_VERSIONING )
+ SET ( IEX_LIBRARY_NAME Iex )
+ SET ( IEXMATH_LIBRARY_NAME IexMath )
+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread )
+ SET ( IMATH_LIBRARY_NAME Imath )
+ SET ( HALF_LIBRARY_NAME Half )
+ ENDIF ( ILMBASE_NAMESPACE_VERSIONING )
+
+ SET ( ILMBASE_INCLUDE_DIRS
+ ${ILMBASE_LOCATION}/include
+ ${ILMBASE_LOCATION}/include/OpenEXR
+ CACHE STRING "ILMBase include directories")
+ SET ( ILMBASE_LIBRARYDIR ${ILMBASE_LOCATION}/lib
+ CACHE STRING "ILMBase library directories")
+ SET ( ILMBASE_FOUND TRUE )
+
+ SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ IF (Ilmbase_USE_STATIC_LIBS)
+ IF (APPLE)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} )
+ ELSEIF (WIN32)
+ # Link library
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half_static PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex_static PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread_static PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath_static PATHS ${ILMBASE_LIBRARYDIR} )
+ ELSE (APPLE)
+ SET ( CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ ENDIF (APPLE)
+ ELSE (Ilmbase_USE_STATIC_LIBS)
+ IF (APPLE)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} )
+ ELSEIF (WIN32)
+ # Link library
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} )
+ # Load library
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
+ FIND_LIBRARY ( Ilmbase_HALF_DLL ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LOCATION}/bin
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEX_DLL ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEXMATH_DLL ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_DLL ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IMATH_DLL ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ ELSE (APPLE)
+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR}
+ NO_DEFAULT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+ ENDIF (APPLE)
+ ENDIF ()
+ # MUST reset
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES})
+
+ELSE ( ILMBASE_FOUND )
+ MESSAGE ( FATAL_ERROR "Unable to find ILMBase, ILMBASE_ROOT = $ENV{ILMBASE_ROOT}")
+ENDIF ( ILMBASE_FOUND )
+endif()
\ No newline at end of file
diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
index 3d243d0..a3340da 100644
--- a/cmake/FindOpenEXR.cmake
+++ b/cmake/FindOpenEXR.cmake
@@ -80,6 +80,7 @@ may be provided to tell this module where to look.
cmake_minimum_required(VERSION 3.3)
+if(0)
# Monitoring <PackageName>_ROOT variables
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
@@ -312,3 +313,92 @@ if(OpenEXR_FOUND)
elseif(OpenEXR_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find OpenEXR")
endif()
+else()
+include(FindPackageHandleStandardArgs)
+
+find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h)
+find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR)
+
+file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H)
+
+string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}")
+string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}")
+set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}")
+
+include(SelectLibraryConfigurations)
+
+if(NOT OpenEXR_BASE_LIBRARY)
+ find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_BASE)
+endif()
+
+if(NOT OpenEXR_UTIL_LIBRARY)
+ find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_UTIL)
+endif()
+
+if(NOT OpenEXR_HALF_LIBRARY)
+ find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_HALF)
+endif()
+
+if(NOT OpenEXR_IEX_LIBRARY)
+ find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_IEX)
+endif()
+
+if(NOT OpenEXR_MATH_LIBRARY)
+ find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_MATH)
+endif()
+
+if(NOT OpenEXR_THREAD_LIBRARY)
+ find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d)
+ select_library_configurations(OpenEXR_THREAD)
+endif()
+
+if(NOT OpenEXR_IEXMATH_LIBRARY)
+ find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX})
+ find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}d)
+ select_library_configurations(OpenEXR_IEXMATH)
+endif()
+
+set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}")
+set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}")
+set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}")
+set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}")
+set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}")
+set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}")
+
+set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}")
+
+set(OpenEXR_LIBRARIES
+ ${OpenEXR_LIBRARY}
+ ${OpenEXR_MATH_LIBRARY}
+ ${OpenEXR_IEXMATH_LIBRARY}
+ ${OpenEXR_UTIL_LIBRARY}
+ ${OpenEXR_HALF_LIBRARY}
+ ${OpenEXR_IEX_LIBRARY}
+ ${OpenEXR_THREAD_LIBRARY}
+)
+
+set(OPENEXR_LIBRARIES
+ ${OPENEXR_HALF_LIBRARY}
+ ${OPENEXR_IEX_LIBRARY}
+ ${OPENEXR_IMATH_LIBRARY}
+ ${OPENEXR_ILMIMF_LIBRARY}
+ ${OPENEXR_ILMTHREAD_LIBRARY}
+)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS)
+
+if(OpenEXR_FOUND)
+ set(OPENEXR_FOUND 1)
+endif()
+endif()
\ No newline at end of file

View File

@ -1,130 +1,133 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 580b353..d40418c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -274,7 +274,6 @@ if(OPENVDB_INSTALL_CMAKE_MODULES)
cmake/FindLog4cplus.cmake
cmake/FindOpenEXR.cmake
cmake/FindOpenVDB.cmake
- cmake/FindTBB.cmake
cmake/OpenVDBGLFW3Setup.cmake
cmake/OpenVDBHoudiniSetup.cmake
cmake/OpenVDBMayaSetup.cmake
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index dd9b0b3..36ec0d0 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -310,7 +310,7 @@ endif()
# Add standard dependencies
find_package(IlmBase REQUIRED COMPONENTS Half)
-find_package(TBB REQUIRED COMPONENTS tbb)
+find_package(TBB CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(Boost REQUIRED COMPONENTS iostreams system)
diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
index 89301bd..e363a13 100644
--- a/openvdb/CMakeLists.txt
+++ b/openvdb/CMakeLists.txt
@@ -71,16 +71,10 @@ message(STATUS "----------------------------------------------------")
# Collect and configure lib dependencies
if(USE_EXR)
- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED)
- find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED)
+ find_package(IlmBase REQUIRED)
+ find_package(OpenEXR REQUIRED)
else()
- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half)
-endif()
-
-find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb)
-if(${Tbb_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION)
- message(DEPRECATION "Support for TBB versions < ${FUTURE_MINIMUM_TBB_VERSION} "
- "is deprecated and will be removed.")
+ find_package(IlmBase REQUIRED COMPONENTS Half)
endif()
find_package(ZLIB ${MINIMUM_ZLIB_VERSION} REQUIRED)
@@ -117,10 +111,10 @@ if(CONCURRENT_MALLOC STREQUAL "Jemalloc")
message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc.
It is recommended to use Jemalloc for optimum performance."
)
- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc tbbmalloc_proxy)
+ find_package(TBB CONFIG REQUIRED)
endif()
elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc")
- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc tbbmalloc_proxy)
+ find_package(TBB CONFIG REQUIRED)
endif()
# Set deps. Note that the order here is important. If we're building against
@@ -132,15 +126,15 @@ endif()
set(OPENVDB_CORE_DEPENDENT_LIBS
Boost::iostreams
Boost::system
- IlmBase::Half
+ ${Ilmbase_HALF_LIBRARY}
)
if(USE_EXR)
list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ ${Ilmbase_ILMTHREAD_LIBRARY}
+ ${Ilmbase_IEX_LIBRARY}
+ ${Ilmbase_IMATH_LIBRARY}
+ ${OPENEXR_ILMIMF_LIBRARY}
)
endif()
@@ -152,7 +146,7 @@ endif()
# See FindOpenVDB.cmake
if(USE_BLOSC)
- list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc)
+ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS ${BLOSC_blosc_LIBRARY})
endif()
list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
@@ -187,7 +181,11 @@ endif()
# @todo Should be target definitions
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX)
+ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
+ if (OPENVDB_SHARED)
+ add_definitions(-DOPENEXR_DLL -DOPENVDB_DLL)
+ endif()
endif()
##### Core library configuration
@@ -404,6 +402,7 @@ list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_PRIVATE")
if(USE_BLOSC)
list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_USE_BLOSC")
endif()
+list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "$<$<CXX_COMPILER_ID:MSVC>:/bigobj>")
# Public defines
diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt
index 57fbec0..d817044 100644
--- a/openvdb/cmd/CMakeLists.txt
+++ b/openvdb/cmd/CMakeLists.txt
@@ -155,9 +155,9 @@ if(OPENVDB_BUILD_VDB_RENDER)
# headers
target_link_libraries(vdb_render
- OpenEXR::IlmImf
- IlmBase::IlmThread
- IlmBase::Iex
+ ${OPENEXR_ILMIMF_LIBRARY}
+ ${Ilmbase_ILMTHREAD_LIBRARY}
+ ${Ilmbase_IEX_LIBRARY}
${OPENVDB_BINARIES_DEPENDENT_LIBS}
)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7c4ff8..123e50f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -302,7 +302,6 @@ if(OPENVDB_INSTALL_CMAKE_MODULES)
cmake/FindLog4cplus.cmake
cmake/FindOpenEXR.cmake
cmake/FindOpenVDB.cmake
- cmake/FindTBB.cmake
cmake/OpenVDBGLFW3Setup.cmake
cmake/OpenVDBHoudiniSetup.cmake
cmake/OpenVDBMayaSetup.cmake
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index 01a2f04..16b71bb 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -299,7 +299,7 @@ endif()
# Add standard dependencies
find_package(IlmBase REQUIRED COMPONENTS Half)
-find_package(TBB REQUIRED COMPONENTS tbb)
+find_package(TBB CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
if(NOT OPENVDB_USE_STATIC_LIBS)
diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
index 9501ff1..ab14fd9 100644
--- a/openvdb/CMakeLists.txt
+++ b/openvdb/CMakeLists.txt
@@ -48,6 +48,7 @@ message(STATUS "----------------------------------------------------")
# Collect and configure lib dependencies
+if(0)
if(USE_EXR)
find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED)
find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED)
@@ -76,6 +77,14 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION)
"is deprecated and will be removed.")
endif()
endif()
+endif()
+
+if(USE_EXR)
+ find_package(IlmBase REQUIRED)
+ find_package(OpenEXR REQUIRED)
+else()
+ find_package(IlmBase REQUIRED COMPONENTS Half)
+endif()
find_package(ZLIB ${MINIMUM_ZLIB_VERSION} REQUIRED)
@@ -127,10 +136,10 @@ if(CONCURRENT_MALLOC STREQUAL "Jemalloc")
message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc.
It is recommended to use Jemalloc for optimum performance."
)
- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc tbbmalloc_proxy)
+ find_package(TBB CONFIG REQUIRED)
endif()
elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc")
- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc tbbmalloc_proxy)
+ find_package(TBB CONFIG REQUIRED)
endif()
# Set deps. Note that the order here is important. If we're building against
@@ -142,15 +151,15 @@ endif()
set(OPENVDB_CORE_DEPENDENT_LIBS
Boost::iostreams
Boost::system
- IlmBase::Half
+ ${Ilmbase_HALF_LIBRARY}
)
if(USE_EXR)
list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ ${Ilmbase_ILMTHREAD_LIBRARY}
+ ${Ilmbase_IEX_LIBRARY}
+ ${Ilmbase_IMATH_LIBRARY}
+ ${OPENEXR_ILMIMF_LIBRARY}
)
endif()
@@ -162,7 +171,7 @@ endif()
# See FindOpenVDB.cmake
if(USE_BLOSC)
- list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc)
+ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS ${BLOSC_blosc_LIBRARY})
endif()
list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
@@ -197,7 +206,11 @@ endif()
# @todo Should be target definitions
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX)
+ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
+ if (OPENVDB_SHARED)
+ add_definitions(-DOPENEXR_DLL -DOPENVDB_DLL)
+ endif()
endif()
##### Core library configuration
@@ -415,6 +428,7 @@ if(USE_BLOSC)
list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_USE_BLOSC")
endif()
+list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "$<$<CXX_COMPILER_ID:MSVC>:/bigobj>")
# Public defines
if(USE_EXR)
diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt
index 1e5ef0d..8e78efe 100644
--- a/openvdb/cmd/CMakeLists.txt
+++ b/openvdb/cmd/CMakeLists.txt
@@ -133,9 +133,9 @@ if(OPENVDB_BUILD_VDB_RENDER)
# headers
target_link_libraries(vdb_render
- OpenEXR::IlmImf
- IlmBase::IlmThread
- IlmBase::Iex
+ ${OPENEXR_ILMIMF_LIBRARY}
+ ${Ilmbase_ILMTHREAD_LIBRARY}
+ ${Ilmbase_IEX_LIBRARY}
${OPENVDB_BINARIES_DEPENDENT_LIBS}
)

View File

@ -1,5 +1,5 @@
Source: openvdb
Version: 6.2.1
Version: 7.0.0
Build-Depends: boost-ptr-container, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess, ilmbase
Homepage: https://github.com/dreamworksanimation/openvdb
Description: Sparse volume data structure and tools

View File

@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO AcademySoftwareFoundation/openvdb
REF aebaf8d95be5e57fd33949281ec357db4a576c2e # v6.2.1
SHA512 e5cf03e77ed0600252cb97aa4bbf9468345ad037a3053626900bd8233e89720f981f0706e5103c2d33ea9c246ba1cf695af68e60d395e5be90e655f2e127db9b
REF c5e9e2944f085907e973b627843c49c838afe912 # v7.0.0
SHA512 351611b04a192bcc501da599e55892a5dc7570dce6c0aea287d800612a20f6cb2a0d7825e062aa99f12bc2a968c51c7fe6af61badfdbd746edbd4e9fc9e4f2a4
HEAD_REF master
PATCHES
0001-remove-pkgconfig.patch