-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[openimageio] Fix find and use dependencies #19916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8d29b2d
[openimageio] Fix find and use dependencies
225f82d
version
cad3cc5
Restore FindOpenEXR.cmake
41ca3bb
version
f36bf6b
Update ports/openimageio/portfile.cmake
JackBoosY 76a26c2
Update versions/o-/openimageio.json
JackBoosY b69ed36
Re-make patch
96197dd
version
c865116
Merge branch 'dev/jack/19878' of https://github.com/JackBoosY/vcpkg i…
79a18e3
Update versions/o-/openimageio.json
JackBoosY d0c54bc
Update ports/openimageio/portfile.cmake
JackBoosY ce84ab3
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
a02f4db
version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in | ||
| index 740da06..1a326f7 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(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 | ||
| --- a/src/cmake/externalpackages.cmake | ||
| +++ b/src/cmake/externalpackages.cmake | ||
| @@ -151,7 +151,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. | ||
|
|
||
| -checked_find_package (PNG) | ||
| +checked_find_package (png PREFER_CONFIG) | ||
|
|
||
| checked_find_package (BZip2) # Used by ffmpeg and freetype | ||
| if (NOT BZIP2_FOUND) | ||
| @@ -185,7 +185,8 @@ checked_find_package (GIF | ||
| RECOMMEND_MIN_REASON "for stability and thread safety") | ||
|
|
||
| # For HEIF/HEIC/AVIF formats | ||
| -checked_find_package (Libheif VERSION_MIN 1.3 | ||
| +checked_find_package (libheif VERSION_MIN 1.3 | ||
| + PREFER_CONFIG | ||
| 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) | ||
| diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt | ||
| index fed8001..15e87ae 100644 | ||
| --- a/src/heif.imageio/CMakeLists.txt | ||
| +++ b/src/heif.imageio/CMakeLists.txt | ||
| @@ -2,9 +2,9 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md | ||
|
|
||
| -if (Libheif_FOUND) | ||
| +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/ico.imageio/CMakeLists.txt b/src/ico.imageio/CMakeLists.txt | ||
| index 9ba76ac..13db4ac 100644 | ||
| --- a/src/ico.imageio/CMakeLists.txt | ||
| +++ b/src/ico.imageio/CMakeLists.txt | ||
| @@ -2,9 +2,15 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md | ||
|
|
||
| -if (TARGET PNG::PNG) | ||
| +if (libpng_FOUND) | ||
| + if (TARGET png_static) | ||
| + set(PNG_TARGET png_static) | ||
| + elseif (TARGET png) | ||
| + set(PNG_TARGET png) | ||
| + endif() | ||
| + | ||
| add_oiio_plugin (icoinput.cpp icooutput.cpp | ||
| - LINK_LIBRARIES PNG::PNG ZLIB::ZLIB) | ||
| + LINK_LIBRARIES ${PNG_TARGET} ZLIB::ZLIB) | ||
| else () | ||
| message (WARNING "libpng not found, so ICO support will not work") | ||
| set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.