forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openimageio] Bump to 2.2.10.0. (microsoft#15509)
* [openimageio] Bump to 2.2.10.0. * Update port_versions Co-authored-by: NancyLi1013 <[email protected]>
- Loading branch information
Showing
8 changed files
with
149 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,122 @@ | ||
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake | ||
index 2f4f7ce..16035df 100644 | ||
--- a/src/cmake/externalpackages.cmake | ||
+++ b/src/cmake/externalpackages.cmake | ||
@@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) | ||
checked_find_package (TIFF 3.0 REQUIRED) | ||
|
||
# IlmBase & OpenEXR | ||
+find_package (Threads) | ||
+if (CMAKE_USE_PTHREADS_INIT) | ||
+ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) | ||
+endif () | ||
checked_find_package (OpenEXR 2.0 REQUIRED) | ||
# We use Imath so commonly, may as well include it everywhere. | ||
-include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" | ||
- "${ILMBASE_INCLUDES}/OpenEXR") | ||
+set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") | ||
+set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") | ||
+set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) | ||
+set(ILMBASE_FOUND TRUE) | ||
+include_directories ("${OPENEXR_INCLUDE_DIR}") | ||
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) | ||
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers | ||
add_compile_options (-Wno-deprecated-register) | ||
@@ -217,7 +224,7 @@ checked_find_package (HDF5 | ||
ISDEPOF Field3D) | ||
checked_find_package (OpenColorIO | ||
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) | ||
-checked_find_package (OpenCV | ||
+checked_find_package (OpenCV CONFIG | ||
DEFINITIONS -DUSE_OPENCV=1) | ||
|
||
# Intel TBB | ||
@@ -226,19 +233,23 @@ checked_find_package (TBB 2017 | ||
ISDEPOF OpenVDB) | ||
|
||
checked_find_package (DCMTK 3.6.1) # For DICOM images | ||
-checked_find_package (FFmpeg 2.6) | ||
+checked_find_package (FFMPEG) | ||
checked_find_package (Field3D | ||
DEPS HDF5 | ||
DEFINITIONS -DUSE_FIELD3D=1) | ||
checked_find_package (GIF 4) | ||
checked_find_package (Libheif 1.3) # For HEIF/HEIC format | ||
checked_find_package (LibRaw) | ||
-checked_find_package (OpenJpeg) | ||
+checked_find_package (OpenJPEG CONFIG) | ||
checked_find_package (OpenVDB 5.0 | ||
DEPS TBB | ||
DEFINITIONS -DUSE_OPENVDB=1) | ||
-checked_find_package (PTex) | ||
-checked_find_package (Webp) | ||
+checked_find_package (ptex CONFIG) | ||
+set(PTEX_FOUND ${ptex_FOUND}) | ||
+set(PTEX_LIBRARIES Ptex::Ptex) | ||
+checked_find_package (Webp CONFIG) | ||
+set(WEBP_FOUND ${Webp_FOUND}) | ||
+set(WEBP_LIBRARY WebP::webp WebP::webpdemux WebP::webpdecoder) | ||
|
||
option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) | ||
checked_find_package (R3DSDK) # RED camera | ||
@@ -254,7 +265,9 @@ if (OPENGL_FOUND) | ||
list (APPEND qt5_modules OpenGL) | ||
endif () | ||
option (USE_QT "Use Qt if found" ON) | ||
+if (USE_QT) | ||
checked_find_package (Qt5 COMPONENTS ${qt5_modules}) | ||
+endif() | ||
if (USE_QT AND NOT Qt5_FOUND AND APPLE) | ||
message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") | ||
message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") | ||
diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt | ||
index 7bc6adb..0ac8937 100644 | ||
--- a/src/jpeg2000.imageio/CMakeLists.txt | ||
+++ b/src/jpeg2000.imageio/CMakeLists.txt | ||
@@ -3,7 +3,7 @@ | ||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md | ||
|
||
if (OPENJPEG_FOUND) | ||
- if (${OPENJPEG_VERSION} VERSION_LESS 2.0) | ||
+ if (0) | ||
# Old OpenJpeg 1.5. Remove this eventually. | ||
# | ||
# For reasons I don't understand, OpenJPEG 1.5 fails imageinout_test | ||
diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt | ||
index 81a0ff5..23326a0 100644 | ||
--- a/src/raw.imageio/CMakeLists.txt | ||
+++ b/src/raw.imageio/CMakeLists.txt | ||
@@ -5,7 +5,7 @@ | ||
if (LIBRAW_FOUND) | ||
add_oiio_plugin (rawinput.cpp | ||
INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} | ||
- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} | ||
+ LINK_LIBRARIES ${LibRaw_LIBRARIES} | ||
DEFINITIONS "-DUSE_LIBRAW=1") | ||
else () | ||
message (WARNING "Raw plugin will not be built") | ||
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake | ||
index e7261af3..195f46cb 100644 | ||
--- a/src/cmake/externalpackages.cmake | ||
+++ b/src/cmake/externalpackages.cmake | ||
@@ -102,7 +102,6 @@ if (MSVC AND NOT LINKSTATIC) | ||
add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? | ||
endif () | ||
|
||
- | ||
# JPEG -- prefer Turbo-JPEG to regular libjpeg | ||
checked_find_package (JPEGTurbo | ||
DEFINITIONS -DUSE_JPEG_TURBO=1 | ||
@@ -145,7 +144,7 @@ checked_find_package (HDF5 | ||
ISDEPOF Field3D) | ||
checked_find_package (OpenColorIO | ||
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) | ||
-checked_find_package (OpenCV | ||
+checked_find_package (OpenCV CONFIG | ||
DEFINITIONS -DUSE_OPENCV=1) | ||
|
||
# Intel TBB | ||
@@ -155,7 +154,7 @@ checked_find_package (TBB 2017 | ||
ISDEPOF OpenVDB) | ||
|
||
checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images | ||
-checked_find_package (FFmpeg VERSION_MIN 2.6) | ||
+checked_find_package (FFMPEG) | ||
checked_find_package (Field3D | ||
DEPS HDF5 | ||
DEFINITIONS -DUSE_FIELD3D=1) | ||
@@ -163,18 +162,25 @@ checked_find_package (GIF | ||
VERSION_MIN 4 | ||
RECOMMEND_MIN 5.0 | ||
RECOMMEND_MIN_REASON "for stability and thread safety") | ||
-checked_find_package (Libheif VERSION_MIN 1.3) # For HEIF/HEIC format | ||
-checked_find_package (LibRaw | ||
+checked_find_package (libheif CONFIG) # For HEIF/HEIC format | ||
+checked_find_package (LibRaw CONFIG | ||
RECOMMEND_MIN 0.18 | ||
RECOMMEND_MIN_REASON "for ACES support and better camera metadata" | ||
- PRINT LibRaw_r_LIBRARIES ) | ||
-checked_find_package (OpenJpeg VERSION_MIN 2.0) | ||
+ PRINT LibRaw_LIBRARIES ) | ||
+checked_find_package (OpenJPEG CONFIG) | ||
checked_find_package (OpenVDB | ||
VERSION_MIN 5.0 | ||
DEPS TBB | ||
DEFINITIONS -DUSE_OPENVDB=1) | ||
-checked_find_package (PTex) | ||
-checked_find_package (WebP) | ||
+checked_find_package (ptex CONFIG) | ||
+set(PTEX_FOUND ${ptex_FOUND}) | ||
+set(PTEX_LIBRARIES Ptex::Ptex) | ||
+checked_find_package (WebP CONFIG) | ||
+if(WebP_FOUND) | ||
+ set(WEBP_FOUND TRUE) | ||
+ add_library(WebP::WebP ALIAS WebP::webp) | ||
+ add_library(WebP::WebPDemux ALIAS WebP::webpdemux) | ||
+endif() | ||
|
||
option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) | ||
checked_find_package (R3DSDK) # RED camera | ||
@@ -287,5 +293,7 @@ macro (find_or_download_fmt) | ||
checked_find_package (fmt REQUIRED) | ||
endmacro() | ||
|
||
-find_or_download_fmt() | ||
+find_package(fmt CONFIG REQUIRED) | ||
+get_property(FMT_INCLUDES TARGET fmt::fmt PROPERTY INTERFACE_INCLUDE_DIRECTORIES) | ||
+checked_find_package (fmt CONFIG REQUIRED) | ||
include_directories (${FMT_INCLUDES}) | ||
diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt | ||
index 6cf07636..8e77b1ed 100644 | ||
--- a/src/ffmpeg.imageio/CMakeLists.txt | ||
+++ b/src/ffmpeg.imageio/CMakeLists.txt | ||
@@ -11,7 +11,7 @@ if (NOT MSVC) | ||
PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations") | ||
endif() | ||
|
||
-if (FFmpeg_FOUND) | ||
+if (FFMPEG_FOUND) | ||
add_oiio_plugin (ffmpeginput.cpp | ||
INCLUDE_DIRS ${FFMPEG_INCLUDES} | ||
LINK_LIBRARIES ${FFMPEG_LIBRARIES} | ||
diff --git a/src/field3d.imageio/CMakeLists.txt b/src/field3d.imageio/CMakeLists.txt | ||
index a9e54e3f..00fac073 100644 | ||
--- a/src/field3d.imageio/CMakeLists.txt | ||
+++ b/src/field3d.imageio/CMakeLists.txt | ||
@@ -10,6 +10,6 @@ if (Field3D_FOUND) | ||
add_oiio_plugin (field3dinput.cpp field3doutput.cpp | ||
INCLUDE_DIRS ${FIELD3D_INCLUDES} | ||
LINK_LIBRARIES Field3D::Field3D | ||
- # ${HDF5_LIBRARIES} | ||
+ ${HDF5_LIBRARIES} | ||
${SZIP_LIBRARY}) | ||
endif() | ||
diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt | ||
index fed80015..884d1312 100644 | ||
--- a/src/heif.imageio/CMakeLists.txt | ||
+++ b/src/heif.imageio/CMakeLists.txt | ||
@@ -4,7 +4,7 @@ | ||
|
||
if (Libheif_FOUND) | ||
add_oiio_plugin (heifinput.cpp heifoutput.cpp | ||
- LINK_LIBRARIES Libheif::Libheif | ||
+ LINK_LIBRARIES heif | ||
DEFINITIONS "-DUSE_HEIF=1") | ||
else () | ||
message (WARNING "heif plugin will not be built") | ||
diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt | ||
index 81a0ff54..23326a0a 100644 | ||
--- a/src/raw.imageio/CMakeLists.txt | ||
+++ b/src/raw.imageio/CMakeLists.txt | ||
@@ -5,7 +5,7 @@ | ||
if (LIBRAW_FOUND) | ||
add_oiio_plugin (rawinput.cpp | ||
INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} | ||
- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} | ||
+ LINK_LIBRARIES ${LibRaw_LIBRARIES} | ||
DEFINITIONS "-DUSE_LIBRAW=1") | ||
else () | ||
message (WARNING "Raw plugin will not be built") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters