early-access version 2853
This commit is contained in:
13
externals/vcpkg/ports/openimageio/fix-config-cmake.patch
vendored
Executable file
13
externals/vcpkg/ports/openimageio/fix-config-cmake.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
|
||||
index b498ece..fb45388 100644
|
||||
--- a/src/cmake/Config.cmake.in
|
||||
+++ b/src/cmake/Config.cmake.in
|
||||
@@ -30,7 +30,7 @@ endif ()
|
||||
#...logic to determine installedPrefix from the own location...
|
||||
#set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@")
|
||||
|
||||
-include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/OpenImageIOTargets.cmake")
|
||||
|
||||
check_required_components ("@PROJECT_NAME@")
|
||||
|
||||
69
externals/vcpkg/ports/openimageio/fix-dependencies.patch
vendored
Executable file
69
externals/vcpkg/ports/openimageio/fix-dependencies.patch
vendored
Executable file
@@ -0,0 +1,69 @@
|
||||
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
|
||||
index b690864..fb45388 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 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 631035a..9f4d096 100644
|
||||
--- a/src/cmake/externalpackages.cmake
|
||||
+++ b/src/cmake/externalpackages.cmake
|
||||
@@ -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.
|
||||
|
||||
-checked_find_package (PNG)
|
||||
+checked_find_package (png PREFER_CONFIG)
|
||||
|
||||
checked_find_package (BZip2) # Used by ffmpeg and freetype
|
||||
if (NOT BZIP2_FOUND)
|
||||
@@ -200,7 +200,8 @@ if (ENABLE_FIELD3D)
|
||||
endif ()
|
||||
|
||||
# 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)
|
||||
@@ -307,7 +308,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/ico.imageio/CMakeLists.txt b/src/ico.imageio/CMakeLists.txt
|
||||
index d290625..cff954c 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
|
||||
|
||||
-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)
|
||||
17
externals/vcpkg/ports/openimageio/fix-ffmpeg-tool.patch
vendored
Executable file
17
externals/vcpkg/ports/openimageio/fix-ffmpeg-tool.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt
|
||||
index 5840206..cc52e4c 100644
|
||||
--- a/src/ffmpeg.imageio/CMakeLists.txt
|
||||
+++ b/src/ffmpeg.imageio/CMakeLists.txt
|
||||
@@ -2,9 +2,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
-if (FFmpeg_FOUND)
|
||||
+if (USE_FFMPEG)
|
||||
+ find_package(FFMPEG REQUIRED)
|
||||
add_oiio_plugin (ffmpeginput.cpp
|
||||
- INCLUDE_DIRS ${FFMPEG_INCLUDES}
|
||||
+ INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS}
|
||||
LINK_LIBRARIES ${FFMPEG_LIBRARIES}
|
||||
${BZIP2_LIBRARIES}
|
||||
DEFINITIONS "-DUSE_FFMPEG"
|
||||
13
externals/vcpkg/ports/openimageio/fix-openjpeg-linkage.patch
vendored
Executable file
13
externals/vcpkg/ports/openimageio/fix-openjpeg-linkage.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
|
||||
index 1fc2059..62c4efb 100644
|
||||
--- a/src/cmake/externalpackages.cmake
|
||||
+++ b/src/cmake/externalpackages.cmake
|
||||
@@ -222,7 +222,7 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER
|
||||
# set (LIBRAW_FOUND 0)
|
||||
endif ()
|
||||
|
||||
-checked_find_package (OpenJPEG VERSION_MIN 2.0)
|
||||
+checked_find_package (OpenJPEG PREFER_CONFIG VERSION_MIN 2.0)
|
||||
|
||||
checked_find_package (OpenVDB
|
||||
VERSION_MIN 5.0
|
||||
82
externals/vcpkg/ports/openimageio/portfile.cmake
vendored
Executable file
82
externals/vcpkg/ports/openimageio/portfile.cmake
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO OpenImageIO/oiio
|
||||
REF ff71703961f7758409fb7e6e689258e2997f7c18 # 2.3.10.1
|
||||
SHA512 f56cb58329a496ca1fe3537fe87d469038ac0e74a555990a4510d2c019d2ad14b556240c0d5087a9a25ac01d9b371b5c77ce5a719e71a85fcd56e9cd099bc31e
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-dependencies.patch
|
||||
fix-config-cmake.patch
|
||||
fix-openjpeg-linkage.patch
|
||||
fix-ffmpeg-tool.patch
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/ext")
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake"
|
||||
"${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake"
|
||||
"${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake")
|
||||
|
||||
file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl")
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LINKSTATIC)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
libraw USE_LIBRAW
|
||||
opencolorio USE_OPENCOLORIO
|
||||
ffmpeg USE_FFMPEG
|
||||
freetype USE_FREETYPE
|
||||
gif USE_GIF
|
||||
opencv USE_OPENCV
|
||||
openjpeg USE_OPENJPEG
|
||||
webp USE_WEBP
|
||||
pybind11 USE_PYTHON
|
||||
tools OIIO_BUILD_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DOIIO_BUILD_TESTS=OFF
|
||||
-DUSE_DCMTK=OFF
|
||||
-DUSE_NUKE=OFF
|
||||
-DUSE_QT=OFF
|
||||
-DUSE_PTEX=OFF
|
||||
-DLINKSTATIC=${LINKSTATIC}
|
||||
-DBUILD_MISSING_FMT=OFF
|
||||
-DBUILD_MISSING_ROBINMAP=OFF
|
||||
-DBUILD_MISSING_DEPS=OFF
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
-DVERBOSE=ON
|
||||
-DBUILD_DOCS=OFF
|
||||
-DINSTALL_DOCS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenImageIO CONFIG_PATH lib/cmake/OpenImageIO)
|
||||
|
||||
if("tools" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool iv
|
||||
AUTO_CLEAN
|
||||
)
|
||||
endif()
|
||||
|
||||
# Clean
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/doc"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
108
externals/vcpkg/ports/openimageio/vcpkg.json
vendored
Executable file
108
externals/vcpkg/ports/openimageio/vcpkg.json
vendored
Executable file
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"name": "openimageio",
|
||||
"version": "2.3.10.1",
|
||||
"port-version": 4,
|
||||
"description": "A library for reading and writing images, and a bunch of related classes, utilities, and application.",
|
||||
"homepage": "https://github.com/OpenImageIO/oiio",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
"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",
|
||||
"libsquish",
|
||||
"openexr",
|
||||
"robin-map",
|
||||
"tiff",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"ffmpeg": {
|
||||
"description": "Enable ffmpeg support for openimageio",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "ffmpeg",
|
||||
"features": [
|
||||
"avresample"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"freetype": {
|
||||
"description": "Enable freetype support for openimageio",
|
||||
"dependencies": [
|
||||
"freetype"
|
||||
]
|
||||
},
|
||||
"gif": {
|
||||
"description": "Enable giflib support for openimageio",
|
||||
"dependencies": [
|
||||
"giflib"
|
||||
]
|
||||
},
|
||||
"libraw": {
|
||||
"description": "Enable RAW image files support",
|
||||
"dependencies": [
|
||||
"libraw"
|
||||
]
|
||||
},
|
||||
"opencolorio": {
|
||||
"description": "Enable opencolorio support for openimageio",
|
||||
"dependencies": [
|
||||
"opencolorio"
|
||||
]
|
||||
},
|
||||
"opencv": {
|
||||
"description": "Enable opencv support for openimageio",
|
||||
"dependencies": [
|
||||
"opencv"
|
||||
]
|
||||
},
|
||||
"openjpeg": {
|
||||
"description": "Enable openjpeg support for openimageio",
|
||||
"dependencies": [
|
||||
"openjpeg"
|
||||
]
|
||||
},
|
||||
"pybind11": {
|
||||
"description": "Enable Python bindings support for openimageio",
|
||||
"dependencies": [
|
||||
"pybind11"
|
||||
]
|
||||
},
|
||||
"tools": {
|
||||
"description": "Build openimageio tools",
|
||||
"dependencies": [
|
||||
"opengl",
|
||||
"qt5-base"
|
||||
]
|
||||
},
|
||||
"webp": {
|
||||
"description": "Enable libwebp support for openimageio",
|
||||
"dependencies": [
|
||||
"libwebp"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user