[openimageio] Bump to 2.2.10.0. (#15509)

* [openimageio] Bump to 2.2.10.0.

* Update port_versions

Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
This commit is contained in:
Adam Johnson 2021-01-16 22:39:12 -05:00 committed by GitHub
parent 083c86d05e
commit 8296ef265d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 149 additions and 163 deletions

View File

@ -4229,8 +4229,8 @@
"port-version": 0 "port-version": 0
}, },
"openimageio": { "openimageio": {
"baseline": "2.1.16.0", "baseline": "2.2.10.0",
"port-version": 4 "port-version": 0
}, },
"openjpeg": { "openjpeg": {
"baseline": "2.3.1", "baseline": "2.3.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "f3b1e2083feeb5968429f3349acaa46fa71f3054",
"version-string": "2.2.10.0",
"port-version": 0
},
{ {
"git-tree": "08ea57c10b4cf3c92b6c880b9ab9b8e9ae069088", "git-tree": "08ea57c10b4cf3c92b6c880b9ab9b8e9ae069088",
"version-string": "2.1.16.0", "version-string": "2.1.16.0",

View File

@ -1,9 +1,8 @@
Source: openimageio Source: openimageio
Version: 2.1.16.0 Version: 2.2.10.0
Port-Version: 4
Homepage: https://github.com/OpenImageIO/oiio Homepage: https://github.com/OpenImageIO/oiio
Description: A library for reading and writing images, and a bunch of related classes, utilities, and application Description: A library for reading and writing images, and a bunch of related classes, utilities, and application
Build-Depends: libjpeg-turbo, tiff, libpng, libheif, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace, fmt Build-Depends: boost-algorithm, boost-asio, boost-config, boost-filesystem, boost-foreach, boost-random, boost-regex, boost-smart-ptr, boost-stacktrace, boost-static-assert, boost-system, boost-thread, boost-type-traits, fmt, libheif, libjpeg-turbo, libpng, openexr, robin-map, tiff, zlib
Feature: libraw Feature: libraw
Build-Depends: libraw Build-Depends: libraw

View File

@ -1,97 +1,122 @@
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 2f4f7ce..16035df 100644 index e7261af3..195f46cb 100644
--- a/src/cmake/externalpackages.cmake --- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake
@@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) @@ -102,7 +102,6 @@ if (MSVC AND NOT LINKSTATIC)
checked_find_package (TIFF 3.0 REQUIRED) add_definitions (-DOPENEXR_DLL) # Is this needed for new versions?
endif ()
# IlmBase & OpenEXR
+find_package (Threads) -
+if (CMAKE_USE_PTHREADS_INIT) # JPEG -- prefer Turbo-JPEG to regular libjpeg
+ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) checked_find_package (JPEGTurbo
+endif () DEFINITIONS -DUSE_JPEG_TURBO=1
checked_find_package (OpenEXR 2.0 REQUIRED) @@ -145,7 +144,7 @@ checked_find_package (HDF5
# We use Imath so commonly, may as well include it everywhere. ISDEPOF Field3D)
-include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" checked_find_package (OpenColorIO
- "${ILMBASE_INCLUDES}/OpenEXR") DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1)
+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") -checked_find_package (OpenCV
+set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") +checked_find_package (OpenCV CONFIG
+set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) DEFINITIONS -DUSE_OPENCV=1)
+set(ILMBASE_FOUND TRUE)
+include_directories ("${OPENEXR_INCLUDE_DIR}") # Intel TBB
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) @@ -155,7 +154,7 @@ checked_find_package (TBB 2017
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers ISDEPOF OpenVDB)
add_compile_options (-Wno-deprecated-register)
@@ -217,7 +224,7 @@ checked_find_package (HDF5 checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images
ISDEPOF Field3D) -checked_find_package (FFmpeg VERSION_MIN 2.6)
checked_find_package (OpenColorIO +checked_find_package (FFMPEG)
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) checked_find_package (Field3D
-checked_find_package (OpenCV DEPS HDF5
+checked_find_package (OpenCV CONFIG DEFINITIONS -DUSE_FIELD3D=1)
DEFINITIONS -DUSE_OPENCV=1) @@ -163,18 +162,25 @@ checked_find_package (GIF
VERSION_MIN 4
# Intel TBB RECOMMEND_MIN 5.0
@@ -226,19 +233,23 @@ checked_find_package (TBB 2017 RECOMMEND_MIN_REASON "for stability and thread safety")
ISDEPOF OpenVDB) -checked_find_package (Libheif VERSION_MIN 1.3) # For HEIF/HEIC format
-checked_find_package (LibRaw
checked_find_package (DCMTK 3.6.1) # For DICOM images +checked_find_package (libheif CONFIG) # For HEIF/HEIC format
-checked_find_package (FFmpeg 2.6) +checked_find_package (LibRaw CONFIG
+checked_find_package (FFMPEG) RECOMMEND_MIN 0.18
checked_find_package (Field3D RECOMMEND_MIN_REASON "for ACES support and better camera metadata"
DEPS HDF5 - PRINT LibRaw_r_LIBRARIES )
DEFINITIONS -DUSE_FIELD3D=1) -checked_find_package (OpenJpeg VERSION_MIN 2.0)
checked_find_package (GIF 4) + PRINT LibRaw_LIBRARIES )
checked_find_package (Libheif 1.3) # For HEIF/HEIC format +checked_find_package (OpenJPEG CONFIG)
checked_find_package (LibRaw) checked_find_package (OpenVDB
-checked_find_package (OpenJpeg) VERSION_MIN 5.0
+checked_find_package (OpenJPEG CONFIG) DEPS TBB
checked_find_package (OpenVDB 5.0 DEFINITIONS -DUSE_OPENVDB=1)
DEPS TBB -checked_find_package (PTex)
DEFINITIONS -DUSE_OPENVDB=1) -checked_find_package (WebP)
-checked_find_package (PTex) +checked_find_package (ptex CONFIG)
-checked_find_package (Webp) +set(PTEX_FOUND ${ptex_FOUND})
+checked_find_package (ptex CONFIG) +set(PTEX_LIBRARIES Ptex::Ptex)
+set(PTEX_FOUND ${ptex_FOUND}) +checked_find_package (WebP CONFIG)
+set(PTEX_LIBRARIES Ptex::Ptex) +if(WebP_FOUND)
+checked_find_package (Webp CONFIG) + set(WEBP_FOUND TRUE)
+set(WEBP_FOUND ${Webp_FOUND}) + add_library(WebP::WebP ALIAS WebP::webp)
+set(WEBP_LIBRARY WebP::webp WebP::webpdemux WebP::webpdecoder) + add_library(WebP::WebPDemux ALIAS WebP::webpdemux)
+endif()
option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF)
checked_find_package (R3DSDK) # RED camera option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF)
@@ -254,7 +265,9 @@ if (OPENGL_FOUND) checked_find_package (R3DSDK) # RED camera
list (APPEND qt5_modules OpenGL) @@ -287,5 +293,7 @@ macro (find_or_download_fmt)
endif () checked_find_package (fmt REQUIRED)
option (USE_QT "Use Qt if found" ON) endmacro()
+if (USE_QT)
checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -find_or_download_fmt()
+endif() +find_package(fmt CONFIG REQUIRED)
if (USE_QT AND NOT Qt5_FOUND AND APPLE) +get_property(FMT_INCLUDES TARGET fmt::fmt PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") +checked_find_package (fmt CONFIG REQUIRED)
message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") include_directories (${FMT_INCLUDES})
diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt
index 7bc6adb..0ac8937 100644 index 6cf07636..8e77b1ed 100644
--- a/src/jpeg2000.imageio/CMakeLists.txt --- a/src/ffmpeg.imageio/CMakeLists.txt
+++ b/src/jpeg2000.imageio/CMakeLists.txt +++ b/src/ffmpeg.imageio/CMakeLists.txt
@@ -3,7 +3,7 @@ @@ -11,7 +11,7 @@ if (NOT MSVC)
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()
if (OPENJPEG_FOUND)
- if (${OPENJPEG_VERSION} VERSION_LESS 2.0) -if (FFmpeg_FOUND)
+ if (0) +if (FFMPEG_FOUND)
# Old OpenJpeg 1.5. Remove this eventually. add_oiio_plugin (ffmpeginput.cpp
# INCLUDE_DIRS ${FFMPEG_INCLUDES}
# For reasons I don't understand, OpenJPEG 1.5 fails imageinout_test LINK_LIBRARIES ${FFMPEG_LIBRARIES}
diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt diff --git a/src/field3d.imageio/CMakeLists.txt b/src/field3d.imageio/CMakeLists.txt
index 81a0ff5..23326a0 100644 index a9e54e3f..00fac073 100644
--- a/src/raw.imageio/CMakeLists.txt --- a/src/field3d.imageio/CMakeLists.txt
+++ b/src/raw.imageio/CMakeLists.txt +++ b/src/field3d.imageio/CMakeLists.txt
@@ -5,7 +5,7 @@ @@ -10,6 +10,6 @@ if (Field3D_FOUND)
if (LIBRAW_FOUND) add_oiio_plugin (field3dinput.cpp field3doutput.cpp
add_oiio_plugin (rawinput.cpp INCLUDE_DIRS ${FIELD3D_INCLUDES}
INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} LINK_LIBRARIES Field3D::Field3D
- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} - # ${HDF5_LIBRARIES}
+ LINK_LIBRARIES ${LibRaw_LIBRARIES} + ${HDF5_LIBRARIES}
DEFINITIONS "-DUSE_LIBRAW=1") ${SZIP_LIBRARY})
else () endif()
message (WARNING "Raw plugin will not be built") 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")

View File

@ -1,13 +0,0 @@
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 4f1dfaf..1a17d1e 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -385,5 +385,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})

View File

@ -1,26 +0,0 @@
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 1a17d1e..2ba4264 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -259,7 +259,7 @@ 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 (libheif CONFIG) # For HEIF/HEIC format
checked_find_package (LibRaw)
checked_find_package (OpenJPEG CONFIG)
checked_find_package (OpenVDB 5.0
diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt
index cb5e5f9..f773fd5 100644
--- a/src/heif.imageio/CMakeLists.txt
+++ b/src/heif.imageio/CMakeLists.txt
@@ -5,7 +5,7 @@
if (LIBHEIF_FOUND)
add_oiio_plugin (heifinput.cpp heifoutput.cpp
INCLUDE_DIRS ${LIBHEIF_INCLUDES}
- LINK_LIBRARIES ${LIBHEIF_LIBRARIES}
+ LINK_LIBRARIES heif
DEFINITIONS "-DUSE_HEIF=1")
else ()
message (WARNING "heif plugin will not be built")

View File

@ -1,13 +0,0 @@
diff --git a/src/cmake/oiio_macros.cmake b/src/cmake/oiio_macros.cmake
index 9e54f67..d9c9437 100644
--- a/src/cmake/oiio_macros.cmake
+++ b/src/cmake/oiio_macros.cmake
@@ -142,7 +142,7 @@ macro (fancy_add_executable)
target_link_libraries (${_target_NAME} PRIVATE ${_target_LINK_LIBRARIES})
endif ()
set_target_properties (${_target_NAME} PROPERTIES FOLDER "Tools")
- install_targets (${_target_NAME})
+ install(TARGETS ${_target_NAME} RUNTIME DESTINATION tools/openimageio)
else ()
message (STATUS "${ColorRed}Disabling ${_target_NAME} ${ColorReset}")
endif ()

View File

@ -1,16 +1,20 @@
if("field3d" IN_LIST FEATURES)
vcpkg_fail_port_install(
ON_TARGET WINDOWS UWP
MESSAGE "The field3d feature is not supported on Windows"
)
endif()
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO OpenImageIO/oiio REPO OpenImageIO/oiio
REF e028a5264bd229e128b37a4362f7eb9c73ea82cc #2.1.16.0 REF 5167b11277fffcd9fe18fe4dc35b3eb2669d8c44 # 2.2.10
SHA512 be5741e139c3c1d2fe62d6706833e9b158b6b00e1a57d141626f28cd3653f63e587b76de676b6b45d1a2330a0e71ebb2f1d00c108b68509cc418b6026424cfda SHA512 d5812cf93bbaf8a384e8ee9f443db95a92320b4c35959a528dff40eac405355d1dec924a975bef7f367d3a2179ded0a15b4be9737d37521719739958bb7f3123
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix-config-cmake.patch
fix-dependency.patch fix-dependency.patch
fix_static_build.patch fix_static_build.patch
fix-tools-path.patch
fix-config-cmake.patch
fix-dependfmt.patch
fix-libheif.patch # Remove this patch on the next update
) )
file(REMOVE_RECURSE "${SOURCE_PATH}/ext") file(REMOVE_RECURSE "${SOURCE_PATH}/ext")
@ -58,8 +62,10 @@ vcpkg_configure_cmake(
-DUSE_QT=OFF -DUSE_QT=OFF
-DUSE_PTEX=OFF -DUSE_PTEX=OFF
-DLINKSTATIC=${LINKSTATIC} -DLINKSTATIC=${LINKSTATIC}
-DBUILD_MISSING_PYBIND11=OFF -DBUILD_MISSING_FMT=OFF
-DBUILD_MISSING_ROBINMAP=OFF
-DBUILD_MISSING_DEPS=OFF -DBUILD_MISSING_DEPS=OFF
-DSTOP_ON_WARNING=OFF
-DVERBOSE=ON -DVERBOSE=ON
) )
@ -69,8 +75,11 @@ vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenImageIO TARGET_PATH share/OpenImageIO) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenImageIO TARGET_PATH share/OpenImageIO)
if ("tools" IN_LIST FEATURES) if("tools" IN_LIST FEATURES)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openimageio) vcpkg_copy_tools(
TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool
AUTO_CLEAN
)
endif() endif()
# Clean # Clean