aboutsummaryrefslogtreecommitdiff
path: root/ports/openimageio/fix-dependencies.patch
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-10-12 01:22:36 +0800
committerGitHub <noreply@github.com>2021-10-11 10:22:36 -0700
commita6768f64260f0380e7daca3d2a5519bbd496e13b (patch)
tree18f71a38557412b5ff5f4d1725cd048c508e93df /ports/openimageio/fix-dependencies.patch
parent822eb4b4ce82d76fa5bcfa8f5774f47db4e01e8b (diff)
downloadvcpkg-a6768f64260f0380e7daca3d2a5519bbd496e13b.tar.gz
vcpkg-a6768f64260f0380e7daca3d2a5519bbd496e13b.zip
[openimageio/libsquish] Export libsquish cmake target and fix find dependency libsquish (#20240)
* [libsquish] Export cmake target * [openimageio] Fix find dependency libsquish * version * Rename the target * Re-fix dependency libsquish, apply official changes * version stuff * more version * Change namespace * Update patch * version * Remove unused patch * version Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'ports/openimageio/fix-dependencies.patch')
-rw-r--r--ports/openimageio/fix-dependencies.patch95
1 files changed, 88 insertions, 7 deletions
diff --git a/ports/openimageio/fix-dependencies.patch b/ports/openimageio/fix-dependencies.patch
index 81b95ff9c..433d960e3 100644
--- a/ports/openimageio/fix-dependencies.patch
+++ b/ports/openimageio/fix-dependencies.patch
@@ -1,22 +1,22 @@
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
-index 740da06..1a326f7 100644
+index 740da06..a34d4c9 100644
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -11,6 +11,9 @@ elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONF
HINTS @IlmBase_DIR@ @OpenEXR_DIR@)
find_dependency(OpenEXR @OpenEXR_VERSION@
HINTS @OpenEXR_DIR@)
-+ find_dependency(libpng CONFIG)
-+ find_dependency(libheif CONFIG)
-+ find_dependency(Libsquish)
++ find_dependency(libpng CONFIG REQUIRED)
++ find_dependency(libheif CONFIG REQUIRED)
++ find_dependency(unofficial-libsquish CONFIG REQUIRED)
find_dependency(ZLIB @ZLIB_VERSION@) # Because OpenEXR doesn't do it
find_dependency(Threads) # Because OpenEXR doesn't do it
endif ()
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
-index 21e18b5..badee4b 100644
+index 957abe3..2c093dd 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
-@@ -151,7 +151,7 @@ find_python()
+@@ -148,7 +148,7 @@ find_python()
# Dependencies for optional formats and features. If these are not found,
# we will continue building, but the related functionality will be disabled.
@@ -25,7 +25,25 @@ index 21e18b5..badee4b 100644
checked_find_package (BZip2) # Used by ffmpeg and freetype
if (NOT BZIP2_FOUND)
-@@ -185,7 +185,8 @@ checked_find_package (GIF
+@@ -158,8 +158,6 @@ endif ()
+ checked_find_package (Freetype
+ DEFINITIONS -DUSE_FREETYPE=1 )
+
+-checked_find_package (HDF5
+- ISDEPOF Field3D)
+ checked_find_package (OpenColorIO
+ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1
+ # PREFER_CONFIG
+@@ -176,15 +174,15 @@ checked_find_package (TBB 2017
+ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images
+ checked_find_package (FFmpeg VERSION_MIN 3.0)
+ checked_find_package (Field3D
+- DEPS HDF5
+- DEFINITIONS -DUSE_FIELD3D=1)
++ DEFINITIONS -DUSE_FIELD3D=1)
+ checked_find_package (GIF
+ VERSION_MIN 4
+ RECOMMEND_MIN 5.0
RECOMMEND_MIN_REASON "for stability and thread safety")
# For HEIF/HEIC/AVIF formats
@@ -35,6 +53,42 @@ index 21e18b5..badee4b 100644
RECOMMEND_MIN 1.7
RECOMMEND_MIN_REASON "for AVIF support")
if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11)
+@@ -291,7 +289,8 @@ endmacro()
+ option (USE_EMBEDDED_LIBSQUISH
+ "Force use of embedded Libsquish, even if external is found" OFF)
+ if (NOT USE_EMBEDDED_LIBSQUISH)
+- checked_find_package (Libsquish)
++ checked_find_package (unofficial-libsquish PREFER_CONFIG)
++ set(Libsquish_FOUND 1)
+ endif ()
+
+
+diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt
+index d693453..9bef055 100644
+--- a/src/dds.imageio/CMakeLists.txt
++++ b/src/dds.imageio/CMakeLists.txt
+@@ -5,7 +5,7 @@
+ if (Libsquish_FOUND)
+ # External libsquish was found -- use it
+ add_oiio_plugin (ddsinput.cpp
+- LINK_LIBRARIES Libsquish::Libsquish
++ LINK_LIBRARIES unofficial::libsquish::squish
+ )
+ else ()
+ # No external libsquish was found -- use the embedded version.
+diff --git a/src/field3d.imageio/CMakeLists.txt b/src/field3d.imageio/CMakeLists.txt
+index a9e54e3..cc73ac4 100644
+--- a/src/field3d.imageio/CMakeLists.txt
++++ b/src/field3d.imageio/CMakeLists.txt
+@@ -9,7 +9,7 @@ if (Field3D_FOUND)
+ endif ()
+ add_oiio_plugin (field3dinput.cpp field3doutput.cpp
+ INCLUDE_DIRS ${FIELD3D_INCLUDES}
+- LINK_LIBRARIES Field3D::Field3D
++ LINK_LIBRARIES ${FIELD3D_LIBRARIES}
+ # ${HDF5_LIBRARIES}
+ ${SZIP_LIBRARY})
+ endif()
diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt
index fed8001..15e87ae 100644
--- a/src/heif.imageio/CMakeLists.txt
@@ -73,3 +127,30 @@ index 9ba76ac..13db4ac 100644
else ()
message (WARNING "libpng not found, so ICO support will not work")
set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE)
+diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt
+index 57a0f62..3a07c31 100644
+--- a/src/openvdb.imageio/CMakeLists.txt
++++ b/src/openvdb.imageio/CMakeLists.txt
+@@ -4,6 +4,6 @@
+
+ if (OpenVDB_FOUND)
+ add_oiio_plugin (openvdbinput.cpp
+- INCLUDE_DIRS ${TBB_INCLUDE_DIRS}
+- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES})
++ INCLUDE_DIRS ${OPENVDB_INCLUDES} ${TBB_INCLUDE_DIRS}
++ LINK_LIBRARIES ${OPENVDB_LIBRARIES} ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES})
+ endif()
+diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt
+index 44462c4..e1cb068 100644
+--- a/src/webp.imageio/CMakeLists.txt
++++ b/src/webp.imageio/CMakeLists.txt
+@@ -4,7 +4,8 @@
+
+ if (WebP_FOUND)
+ add_oiio_plugin (webpinput.cpp webpoutput.cpp
+- LINK_LIBRARIES WebP::WebP WebP::WebPDemux
++ INCLUDE_DIRS ${WEBP_INCLUDES}
++ LINK_LIBRARIES ${WEBP_LIBRARIES}
+ DEFINITIONS "-DUSE_WEBP=1")
+ else ()
+ message (STATUS "WebP plugin will not be built")