[openexr] Update from 2 to 3.1.5, patch all consuming ports (#26862)

* Update to 3.1.5

* Add feature 'tools'

* ilmbase is now imath

* [theia] Use openimageio cmake config

* [freeimage] Use OpenEXR 3 and Imath

* [opencv4] Use upstream's OpenEXR 3 support

* [opencv3] Use upstream's OpenEXR 3 support

* [opencv2] Use OpenEXR 3 and Imath

* [osg] Use OpenEXR 3

* [openvdb] Use Imath, enable OpenEXR

* [pangolin] Use OpenEXR 3

* [directxtex] Use OpenEXR 3

* [uvatlas] Disable /guard:ehcont when directxtex uses openexr

* Update versions

Co-authored-by: chausner <chausner@users.noreply.github.com>
This commit is contained in:
Kai Pastor 2022-09-26 08:45:07 +02:00 committed by GitHub
parent 1ea1da790e
commit 94b089b7c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 374 additions and 277 deletions

View File

@ -1,3 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc0a3e8..7447741 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,7 +156,7 @@ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
if(ENABLE_OPENEXR_SUPPORT)
find_package(OpenEXR REQUIRED)
- target_include_directories(${PROJECT_NAME} PRIVATE ${OPENEXR_INCLUDE_DIRS}/OpenEXR)
+ target_link_libraries(${PROJECT_NAME} PRIVATE OpenEXR::OpenEXR)
endif()
if ((${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16") AND (NOT MINGW))
@@ -299,6 +299,7 @@ if(MSVC)
endif()
if((MSVC_VERSION GREATER_EQUAL 1928) AND (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ AND NOT ENABLE_OPENEXR_SUPPORT
AND ((NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)))
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>")
diff --git a/DirectXTexEXR.cpp b/DirectXTexEXR.cpp
index 17bd171..825cfe4 100644
--- a/DirectXTex/DirectXTexEXR.cpp
@ -20,3 +41,47 @@ index 17bd171..825cfe4 100644
namespace
{
struct handle_closer { void operator()(HANDLE h) noexcept { assert(h != INVALID_HANDLE_VALUE); if (h) CloseHandle(h); } };
@@ -161,7 +161,7 @@ namespace
return result.QuadPart >= m_EOF;
}
- Imf::Int64 tellg() override
+ uint64_t tellg() override
{
const LARGE_INTEGER dist = {};
LARGE_INTEGER result;
@@ -169,10 +169,10 @@ namespace
{
throw com_exception(HRESULT_FROM_WIN32(GetLastError()));
}
- return static_cast<Imf::Int64>(result.QuadPart);
+ return static_cast<uint64_t>(result.QuadPart);
}
- void seekg(Imf::Int64 pos) override
+ void seekg(uint64_t pos) override
{
LARGE_INTEGER dist;
dist.QuadPart = static_cast<LONGLONG>(pos);
@@ -213,7 +213,7 @@ namespace
}
}
- Imf::Int64 tellp() override
+ uint64_t tellp() override
{
const LARGE_INTEGER dist = {};
LARGE_INTEGER result;
@@ -221,10 +221,10 @@ namespace
{
throw com_exception(HRESULT_FROM_WIN32(GetLastError()));
}
- return static_cast<Imf::Int64>(result.QuadPart);
+ return static_cast<uint64_t>(result.QuadPart);
}
- void seekp(Imf::Int64 pos) override
+ void seekp(uint64_t pos) override
{
LARGE_INTEGER dist;
dist.QuadPart = static_cast<LONGLONG>(pos);

View File

@ -1,6 +1,7 @@
{
"name": "directxtex",
"version-date": "2022-07-29",
"port-version": 1,
"description": "DirectXTex texture processing library",
"homepage": "https://github.com/Microsoft/DirectXTex",
"documentation": "https://github.com/microsoft/DirectXTex/wiki",

View File

@ -107,7 +107,8 @@ target_link_libraries(FreeImage ${ZLIB_LIBRARIES}
WebP::webp WebP::webpdemux WebP::libwebpmux WebP::webpdecoder
${JXR_LIBRARIES}
${LibRaw_LIBRARIES}
OpenEXR::IlmImf)
OpenEXR::OpenEXR
Imath::Imath)
target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS})
@ -153,6 +154,7 @@ find_dependency(WebP CONFIG)
find_dependency(JXR)
find_dependency(LibRaw)
find_dependency(OpenEXR)
find_dependency(Imath)
include(\"\${CMAKE_CURRENT_LIST_DIR}/freeimage-targets.cmake\")
")

View File

@ -25,10 +25,38 @@ index b286430..82b3b72 100644
+#include <OpenEXR/ImfRgba.h>
+#include <OpenEXR/ImfArray.h>
+#include <OpenEXR/ImfPreviewImage.h>
+#include <OpenEXR/half.h>
+#include <Imath/half.h>
// ==========================================================
@@ -66,11 +66,11 @@ public:
return ((unsigned)n != _io->read_proc(c, 1, n, _handle));
}
- virtual Imath::Int64 tellg() {
+ virtual uint64_t tellg() {
return _io->tell_proc(_handle);
}
- virtual void seekg(Imath::Int64 pos) {
+ virtual void seekg(uint64_t pos) {
_io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}
@@ -100,11 +100,11 @@ public:
}
}
- virtual Imath::Int64 tellp() {
+ virtual uint64_t tellp() {
return _io->tell_proc(_handle);
}
- virtual void seekp(Imath::Int64 pos) {
+ virtual void seekp(uint64_t pos) {
_io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}
};
diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
index 562fdd7..ce12649 100644
--- a/Source/FreeImage/PluginTIFF.cpp
@ -38,7 +66,7 @@ index 562fdd7..ce12649 100644
#include <tiffio.h>
#include "../Metadata/FreeImageTag.h"
-#include "../OpenEXR/Half/half.h"
+#include <OpenEXR/half.h>
+#include <Imath/half.h>
#include "FreeImageIO.h"
#include "PSDParser.h"

View File

@ -1,10 +1,12 @@
{
"name": "freeimage",
"version": "3.18.0",
"port-version": 23,
"port-version": 24,
"description": "Support library for graphics image formats",
"homepage": "https://sourceforge.net/projects/freeimage/",
"license": "GPL-2.0-only OR GPL-3.0-only OR FreeImage",
"dependencies": [
"imath",
"jxrlib",
"libjpeg-turbo",
"libpng",

View File

@ -1,9 +1,8 @@
{
"name": "ilmbase",
"version-string": "2.3.0",
"port-version": 1,
"description": "empty package, linking to newer one",
"version": "3",
"description": "Obsolete, use port imath instead",
"dependencies": [
"openexr"
"imath"
]
}

View File

@ -45,12 +45,3 @@
if(PNG_FOUND)
include(CheckIncludeFile)
check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H)
@@ -151,7 +151,7 @@ if(WITH_OPENEXR)
if(BUILD_OPENEXR)
ocv_clear_vars(OPENEXR_FOUND)
else()
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+ find_package(OpenEXR REQUIRED)
endif()
if(NOT OPENEXR_FOUND)

View File

@ -0,0 +1,30 @@
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
index 9b43066..c1cc11f 100644
--- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
@@ -151,7 +151,12 @@ if(WITH_OPENEXR)
if(BUILD_OPENEXR)
ocv_clear_vars(OPENEXR_FOUND)
else()
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+ find_package(Imath CONFIG REQUIRED)
+ find_package(OpenEXR CONFIG REQUIRED)
+ set(OPENEXR_LIBRARIES Imath::Imath OpenEXR::OpenEXR)
+ set(OPENEXR_INCLUDE_PATHS "")
+ set(OPENEXR_VERSION "${OpenEXR_VERSION}")
+ set(OPENEXR_FOUND 1)
endif()
if(NOT OPENEXR_FOUND)
diff --git a/modules/highgui/src/grfmt_exr.cpp b/modules/highgui/src/grfmt_exr.cpp
index 399e586..b8cd270 100644
--- a/modules/highgui/src/grfmt_exr.cpp
+++ b/modules/highgui/src/grfmt_exr.cpp
@@ -57,6 +57,7 @@
#include <ImfOutputFile.h>
#include <ImfChannelList.h>
#include <ImfStandardAttributes.h>
+#include <ImfFrameBuffer.h>
#include <half.h>
#include "grfmt_exr.hpp"

View File

@ -15,7 +15,10 @@ vcpkg_from_github(
0005-fix-cuda.patch
0006-fix-jasper.patch
0007-fix-config.patch
0019-fix-openexr.patch
)
# Disallow accidental build of vendored copies
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdparty/openexr")
file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake")
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA")
@ -126,7 +129,7 @@ find_dependency(Threads)")
string(APPEND DEPS_STRING "\nfind_dependency(CUDA)")
endif()
if("openexr" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)")
string(APPEND DEPS_STRING "\nfind_dependency(Imath CONFIG)\nfind_dependency(OpenEXR CONFIG)")
endif()
if("png" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(PNG)")

View File

@ -1,7 +1,7 @@
{
"name": "opencv2",
"version": "2.4.13.7",
"port-version": 14,
"port-version": 15,
"description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause",
@ -102,6 +102,7 @@
"openexr": {
"description": "OpenEXR support for opencv",
"dependencies": [
"imath",
"openexr"
]
},

View File

@ -54,15 +54,6 @@
if(PNG_FOUND)
include(CheckIncludeFile)
check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H)
@@ -229,7 +229,7 @@ if(WITH_OPENEXR)
ocv_clear_vars(HAVE_OPENEXR)
if(NOT BUILD_OPENEXR)
ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+ find_package(OpenEXR REQUIRED)
endif()
if(OPENEXR_FOUND)
@@ -247,7 +247,7 @@ endif()
# --- GDAL (optional) ---

View File

@ -22,6 +22,8 @@ vcpkg_from_github(
0011-remove-python2.patch
0012-fix-zlib.patch
)
# Disallow accidental build of vendored copies
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdparty/openexr")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(TARGET_IS_AARCH64 1)

View File

@ -1,7 +1,7 @@
{
"name": "opencv3",
"version": "3.4.18",
"port-version": 1,
"port-version": 2,
"description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause",

View File

@ -63,15 +63,6 @@
if(PNG_FOUND)
include(CheckIncludeFile)
check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H)
@@ -257,7 +257,7 @@ if(WITH_OPENEXR)
ocv_clear_vars(HAVE_OPENEXR)
if(NOT BUILD_OPENEXR)
ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+ find_package(OpenEXR REQUIRED)
endif()
if(OPENEXR_FOUND)
@@ -275,7 +275,7 @@ endif()
# --- GDAL (optional) ---

View File

@ -25,6 +25,8 @@ vcpkg_from_github(
0015-fix-freetype.patch
0017-mingw-strsafe-no-deprecate.patch
)
# Disallow accidental build of vendored copies
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdparty/openexr")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(TARGET_IS_AARCH64 1)

View File

@ -1,7 +1,7 @@
{
"name": "opencv4",
"version": "4.6.0",
"port-version": 4,
"port-version": 5,
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0",

View File

@ -1,38 +0,0 @@
diff --git a/OpenEXR/config/OpenEXRSetup.cmake b/OpenEXR/config/OpenEXRSetup.cmake
index 5116726..34c7c87 100644
--- a/OpenEXR/config/OpenEXRSetup.cmake
+++ b/OpenEXR/config/OpenEXRSetup.cmake
@@ -33,7 +33,7 @@ endif()
# Whether to build & install the various command line utility programs
option(OPENEXR_BUILD_UTILS "Enables building of utility programs" ON)
-# This is a variable here for use in controlling where include files are
+# This is a variable here for use in controlling where include files are
# installed. Care must be taken when changing this, as many things
# probably assume this is OpenEXR
set(OPENEXR_OUTPUT_SUBDIR OpenEXR CACHE STRING "Destination sub-folder of the include path for install")
diff --git a/OpenEXR_Viewers/CMakeLists.txt b/OpenEXR_Viewers/CMakeLists.txt
index 5efa353..5246fa7 100644
--- a/OpenEXR_Viewers/CMakeLists.txt
+++ b/OpenEXR_Viewers/CMakeLists.txt
@@ -24,8 +24,6 @@ project(OpenEXR_Viewers VERSION ${OPENEXR_VIEWERS_VERSION})
#######################################
include(config/OpenEXRViewersSetup.cmake)
-find_package(IlmBase ${OPENEXR_VIEWERS_VERSION} EXACT REQUIRED CONFIG)
-find_package(OpenEXR ${OPENEXR_VIEWERS_VERSION} EXACT REQUIRED CONFIG)
# This is for newer cmake versions who know about vendor versions
set(OpenGL_GL_PREFERENCE GLVND)
diff --git a/PyIlmBase/CMakeLists.txt b/PyIlmBase/CMakeLists.txt
index 291b96e..7d5074f 100644
--- a/PyIlmBase/CMakeLists.txt
+++ b/PyIlmBase/CMakeLists.txt
@@ -27,7 +27,6 @@ project(PyIlmBase VERSION ${PYILMBASE_VERSION} LANGUAGES C CXX)
include(config/PyIlmBaseSetup.cmake)
# we have a strong dependence on IlmBase being an exact match
-find_package(IlmBase ${PYILMBASE_VERSION} EXACT REQUIRED CONFIG)
# we are building a python extension, so of course we depend on
# python as well. Except we don't know which version...

View File

@ -1,69 +0,0 @@
diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt
index d9c5ae4..45ee6cc 100644
--- a/IlmBase/config/CMakeLists.txt
+++ b/IlmBase/config/CMakeLists.txt
@@ -105,7 +105,7 @@ endif()
include(CMakePackageConfigHelpers)
configure_package_config_file(IlmBaseConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ INSTALL_DESTINATION share/ilmbase
)
write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
VERSION ${ILMBASE_VERSION}
@@ -113,10 +113,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ DESTINATION share/ilmbase
)
install(EXPORT ${PROJECT_NAME}
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ DESTINATION share/ilmbase
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
EXPORT_LINK_INTERFACE_LIBRARIES
diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt
index b52ad0d..3dc6d22 100644
--- a/OpenEXR/config/CMakeLists.txt
+++ b/OpenEXR/config/CMakeLists.txt
@@ -100,7 +100,7 @@ endif()
include(CMakePackageConfigHelpers)
configure_package_config_file(OpenEXRConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ INSTALL_DESTINATION share/openexr
)
write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
VERSION ${OPENEXR_VERSION}
@@ -108,10 +108,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ DESTINATION share/openexr
)
install(EXPORT ${PROJECT_NAME}
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ DESTINATION share/openexr
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
EXPORT_LINK_INTERFACE_LIBRARIES
diff --git a/PyIlmBase/config/CMakeLists.txt b/PyIlmBase/config/CMakeLists.txt
index 1872c89..bc61f43 100644
--- a/PyIlmBase/config/CMakeLists.txt
+++ b/PyIlmBase/config/CMakeLists.txt
@@ -39,10 +39,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ DESTINATION share/pyilmbase
)
install(EXPORT ${PROJECT_NAME}
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ DESTINATION share/pyilmbase
FILE ${PROJECT_NAME}Config.cmake
NAMESPACE ${PROJECT_NAME}::
EXPORT_LINK_INTERFACE_LIBRARIES

View File

@ -1,13 +0,0 @@
diff --git a/src/lib/OpenEXR/ImfSimd.h b/src/lib/OpenEXR/ImfSimd.h
index 810e7ccc3..9bb4e11ae 100644
--- a/OpenEXR/IlmImf/ImfSimd.h
+++ b/OpenEXR/IlmImf/ImfSimd.h
@@ -14,7 +14,7 @@
// GCC and Visual Studio SSE2 compiler flags
-#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE)
+#if defined __SSE2__ || (_MSC_VER >= 1300 && (_M_IX86 || _M_X64))
#define IMF_HAVE_SSE2 1
#endif

View File

@ -1,43 +1,44 @@
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "UWP build not supported")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openexr/openexr
REF 918b8f543e81b5a1e1aca494ab7352ca280afc9e # v2.5.8
SHA512 7c4a22779718cb1a8962d53d0817a0b3cba90fc9ad4c6469e845bdfbf9ae8be8e43905ad8672955838976caeffd7dabcc6ea9c1f00babef0d5dfc8b5e058cce9
HEAD_REF master
PATCHES
0001-remove_find_package_macro.patch
0002-fixup_cmake_exports_path.patch
0003-fix-arm-intrin-detection-pr-1216.patch
OUT_SOURCE_PATH SOURCE_PATH
REPO AcademySoftwareFoundation/openexr
REF v3.1.5
SHA512 01ef16eacd2dde83c67b81522bae87f47ba272a41ce7d4e35d865dbdcaa03093e7ac504b95d2c1b3a19535f2364a4f937b0e0570c74243bb1c6e021fce7b620c
HEAD_REF master
)
vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DCMAKE_DEBUG_POSTFIX=_d
-DPYILMBASE_ENABLE=FALSE
vcpkg_check_features(OUT_FEATURE_OPTIONS OPTIONS
FEATURES
tools OPENEXR_BUILD_TOOLS
tools OPENEXR_INSTALL_TOOLS
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${OPTIONS}
-DBUILD_TESTING=OFF
-DOPENEXR_INSTALL_EXAMPLES=OFF
-DDOCS=OFF
OPTIONS_DEBUG
-DOPENEXR_BUILD_TOOLS=OFF
-DOPENEXR_INSTALL_TOOLS=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_cmake_config_fixup(PACKAGE_NAME ilmbase CONFIG_PATH share/ilmbase)
vcpkg_fixup_pkgconfig()
vcpkg_copy_tools(
TOOL_NAMES exrenvmap exrheader exrmakepreview exrmaketiled exrmultipart exrmultiview exrstdattr exr2aces
AUTO_CLEAN
)
vcpkg_copy_pdbs()
if (VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenEXR)
vcpkg_fixup_pkgconfig()
if(OPENEXR_INSTALL_TOOLS)
vcpkg_copy_tools(
TOOL_NAMES exrenvmap exrheader exrinfo exrmakepreview exrmaketiled exrmultipart exrmultiview exrstdattr exr2aces
AUTO_CLEAN
)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

4
ports/openexr/usage Normal file
View File

@ -0,0 +1,4 @@
openexr provides CMake targets:
find_package(OpenEXR CONFIG REQUIRED)
target_link_libraries(main PRIVATE OpenEXR::OpenEXR)

View File

@ -1,38 +0,0 @@
_find_package(${ARGS})
if(TARGET OpenEXR::IlmImf AND NOT OPENEXR_LIBRARIES AND NOT OPENEXR_FOUND)
set(OPENEXR_FOUND TRUE CACHE BOOL "")
set(OpenEXR_FOUND TRUE CACHE BOOL "")
set(OPENEXR_VERSION "2.5.0" CACHE STRING "")
set(OpenEXR_VERSION "2.5.0" CACHE STRING "")
get_target_property(OpenEXR_INCLUDE_DIRS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(OPENEXR_INCLUDE_PATHS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(OPENEXR_INCLUDE_DIRS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(OPENEXR_INCLUDE_DIR OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES)
set(OpenEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS} CACHE STRING "")
set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATHS} CACHE STRING "")
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIRS} CACHE STRING "")
set(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR} CACHE STRING "")
set(OPENEXR_ILMIMF_LIBRARY "OpenEXR::IlmImf" CACHE STRING "")
set(OPENEXR_ILMIMFUTIL_LIBRARY "OpenEXR::IlmImfUtil" CACHE STRING "")
set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMFUTIL_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} CACHE STRING "")
endif()
if(TARGET IlmBase::Half AND NOT ILMBASE_LIBRARIES AND NOT ILMBASE_FOUND)
set(ILMBASE_FOUND TRUE CACHE BOOL "")
set(IlmBASE_FOUND TRUE CACHE BOOL "")
set(ILMBASE_VERSION "2.5.0" CACHE STRING "")
set(IlmBASE_VERSION "2.5.0" CACHE STRING "")
get_target_property(ILMBASE_INCLUDE_DIR IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(ILMBASE_INCLUDE_DIRS IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(ILMBASE_INCLUDE_PATHS IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES)
set(ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_DIR} CACHE STRING "")
set(ILMBASE_INCLUDE_DIRS ${ILMBASE_INCLUDE_DIRS} CACHE STRING "")
set(ILMBASE_INCLUDE_PATHS ${ILMBASE_INCLUDE_PATHS} CACHE STRING "")
set(OPENEXR_HALF_LIBRARY "IlmBase::Half" CACHE STRING "")
set(OPENEXR_IEX_LIBRARY "IlmBase::Iex" CACHE STRING "")
set(OPENEXR_IEXMATH_LIBRARY "IlmBase::IexMath" CACHE STRING "")
set(OPENEXR_ILMTHREAD_LIBRARY "IlmBase::IlmThread" CACHE STRING "")
set(OPENEXR_IMATH_LIBRARY "IlmBase::Imath" CACHE STRING "")
set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${OPENEXR_IEXMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} CACHE STRING "")
endif()

View File

@ -1,12 +1,12 @@
{
"name": "openexr",
"version": "2.5.8",
"port-version": 1,
"version": "3.1.5",
"description": "OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications",
"homepage": "https://www.openexr.com/",
"license": "BSD-3-Clause",
"supports": "!uwp",
"dependencies": [
"imath",
{
"name": "vcpkg-cmake",
"host": true
@ -16,5 +16,10 @@
"host": true
},
"zlib"
]
],
"features": {
"tools": {
"description": "Build tools"
}
}
}

View File

@ -39,7 +39,9 @@ vcpkg_cmake_configure(
-DOPENVDB_BUILD_UNITTESTS=OFF
-DOPENVDB_BUILD_PYTHON_MODULE=OFF
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DUSE_EXR=ON
-DUSE_GLFW3=ON
-DUSE_IMATH_HALF=ON
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
-DOPENVDB_BUILD_VDB_PRINT=${OPENVDB_BUILD_TOOLS}

View File

@ -1,6 +1,7 @@
{
"name": "openvdb",
"version": "9.0.0",
"port-version": 1,
"description": "Sparse volume data structure and tools",
"homepage": "https://github.com/dreamworksanimation/openvdb",
"license": "MPL-2.0",
@ -14,7 +15,7 @@
"boost-system",
"boost-thread",
"boost-uuid",
"ilmbase",
"imath",
"openexr",
"tbb",
{

46
ports/osg/openexr3.patch Normal file
View File

@ -0,0 +1,46 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7de889..2a58f19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -743,6 +743,9 @@ ELSE()
FIND_PACKAGE(Inventor)
FIND_PACKAGE(Jasper)
FIND_PACKAGE(OpenEXR)
+ set(OPENEXR_FOUND "${OpenEXR_FOUND}")
+ set(OPENEXR_LIBRARIES OpenEXR::OpenEXR)
+ set(OPENEXR_LIBRARIES_VARS OPENEXR_LIBRARIES)
FIND_PACKAGE(OpenCascade)
FIND_PACKAGE(COLLADA)
FIND_PACKAGE(FBX)
diff --git a/src/osgPlugins/exr/ReaderWriterEXR.cpp b/src/osgPlugins/exr/ReaderWriterEXR.cpp
index 7132e97..bea1483 100644
--- a/src/osgPlugins/exr/ReaderWriterEXR.cpp
+++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp
@@ -41,11 +41,11 @@ public:
{
return _inStream->read(c,n).good();
};
- virtual Int64 tellg ()
+ virtual uint64_t tellg ()
{
return _inStream->tellg();
};
- virtual void seekg (Int64 pos)
+ virtual void seekg (uint64_t pos)
{
_inStream->seekg(pos);
};
@@ -69,11 +69,11 @@ public:
{
_outStream->write(c,n);
};
- virtual Int64 tellp ()
+ virtual uint64_t tellp ()
{
return _outStream->tellp();
};
- virtual void seekp (Int64 pos)
+ virtual void seekp (uint64_t pos)
{
_outStream->seekp(pos);
};

View File

@ -14,7 +14,7 @@ vcpkg_from_github(
plugin-pdb-install.patch
use-boost-asio.patch
osgdb_zip_nozip.patch # This is fix symbol clashes with other libs when built in static-lib mode
use-openexr-config.patch
openexr3.patch
unofficial-export.patch
)

View File

@ -1,20 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3363305..8516539 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -739,10 +739,13 @@ IF(ANDROID)
ELSE()
# Common to all platforms except android:
FIND_PACKAGE(Freetype)
- FIND_PACKAGE(ilmbase)
FIND_PACKAGE(Inventor)
FIND_PACKAGE(Jasper)
- FIND_PACKAGE(OpenEXR)
+ FIND_PACKAGE(OpenEXR CONFIG)
+ set(OPENEXR_LIBRARY OpenEXR::IlmImf)
+ set(OPENEXR_LIBRARIES_VARS OPENEXR_LIBRARY)
+ set(OPENEXR_INCLUDE_DIR "${OpenEXR_DIR}/../../include")
+ set(ILMBASE_INCLUDE_DIR "${OpenEXR_DIR}/../../include")
FIND_PACKAGE(OpenCascade)
FIND_PACKAGE(COLLADA)
FIND_PACKAGE(FBX)

View File

@ -1,7 +1,7 @@
{
"name": "osg",
"version": "3.6.5",
"port-version": 16,
"port-version": 17,
"description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.",
"homepage": "https://www.openscenegraph.com/",
"license": null,

View File

@ -52,7 +52,7 @@ index ddeb144..ee27d57 100644
list(APPEND HEADERS ${INCDIR}/video/drivers/uvc.h )
list(APPEND SOURCES video/drivers/uvc.cpp)
list(APPEND VIDEO_FACTORY_REG RegisterUvcVideoFactory )
@@ -584,11 +590,10 @@ endif()
@@ -584,11 +590,14 @@ endif()
option(BUILD_PANGOLIN_LIBOPENEXR "Build support for libopenexr image input" ON)
if(BUILD_PANGOLIN_LIBOPENEXR)
@ -62,7 +62,11 @@ index ddeb144..ee27d57 100644
set(HAVE_OPENEXR 1)
- list(APPEND INTERNAL_INC ${OpenEXR_INCLUDE_DIR} )
- list(APPEND LINK_LIBS ${OpenEXR_LIBRARY} )
+ list(APPEND LINK_LIBS OpenEXR::IlmImf OpenEXR::IlmImfUtil OpenEXR::IlmImfConfig )
+ list(APPEND LINK_LIBS OpenEXR::OpenEXR)
+ string(APPEND ExternConfig "
+ include(CMakeFindDependencyMacro)
+ find_dependency(OpenEXR CONFIG)
+")
message(STATUS "libopenexr Found and Enabled")
endif()
endif()
@ -95,3 +99,31 @@ index ddeb144..ee27d57 100644
target_link_libraries(pypangolin PRIVATE ${LIBRARY_NAME})
target_include_directories(pypangolin PRIVATE "${USER_INC}")
endif()
diff --git a/src/image/image_io_exr.cpp b/src/image/image_io_exr.cpp
index 52c0078..1bd6c55 100644
--- a/src/image/image_io_exr.cpp
+++ b/src/image/image_io_exr.cpp
@@ -4,6 +4,8 @@
#include <pangolin/image/typed_image.h>
#ifdef HAVE_OPENEXR
+#include <ImfFrameBuffer.h>
+#include <ImfHeader.h>
#include <ImfChannelList.h>
#include <ImfInputFile.h>
#include <ImfOutputFile.h>
@@ -54,12 +56,12 @@ class StdIStream: public Imf::IStream
return true;
}
- virtual Imf::Int64 tellg ()
+ virtual uint64_t tellg ()
{
return std::streamoff (_is->tellg());
}
- virtual void seekg (Imf::Int64 pos)
+ virtual void seekg (uint64_t pos)
{
_is->seekg (pos);
}

View File

@ -1,7 +1,7 @@
{
"name": "pangolin",
"version": "0.6",
"port-version": 2,
"port-version": 3,
"description": "Lightweight GUI Library",
"homepage": "https://github.com/stevenlovegrove/Pangolin",
"supports": "!uwp",

View File

@ -158,7 +158,7 @@ index 9c1b150..1adbfed 100644
# This "exports" all targets which have been put into the export set
# "TheiaExport". This means that CMake generates a file with the given
@@ -319,9 +270,5 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/TheiaConfigVersion.cmake.in"
@@ -319,9 +270,4 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/TheiaConfigVersion.cmake.in"
# in the public API of Theia and should thus be present in THEIA_INCLUDE_DIRS.
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/TheiaConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/TheiaConfigVersion.cmake"
@ -167,7 +167,6 @@ index 9c1b150..1adbfed 100644
- "${CMAKE_SOURCE_DIR}/cmake/FindGflags.cmake"
- "${CMAKE_SOURCE_DIR}/cmake/FindOpenImageIO.cmake"
- "${CMAKE_SOURCE_DIR}/cmake/FindSuiteSparse.cmake"
+ "${CMAKE_SOURCE_DIR}/cmake/FindOpenImageIO.cmake"
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
diff --git a/cmake/TheiaConfig.cmake.in b/cmake/TheiaConfig.cmake.in
index a3ea187..7e9d912 100644

View File

@ -13,6 +13,7 @@ vcpkg_from_github(
)
file(REMOVE ${SOURCE_PATH}/cmake/FindSuiteSparse.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/FindOpenImageIO.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/FindGlog.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake)

View File

@ -1,9 +1,10 @@
{
"name": "theia",
"version-string": "0.8",
"port-version": 6,
"version": "0.8",
"port-version": 7,
"description": "An open source library for multiview geometry and structure from motion",
"homepage": "https://github.com/sweeneychris/TheiaSfM",
"license": "BSD-3-Clause",
"dependencies": [
"cereal",
{

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9c3d37..52c6f93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -228,6 +228,7 @@ if(MSVC)
endif()
if((MSVC_VERSION GREATER_EQUAL 1928) AND (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ AND NOT TARGET OpenEXR::OpenEXR # as dependency of package directxtex
AND ((NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)))
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>")

View File

@ -6,6 +6,8 @@ vcpkg_from_github(
REF jul2022
SHA512 fe857766d598c73badba6eda3128775f9195d0a1a7658e9b48a77dd631da4bbd31ab946bc98f8e9b229a6bc99a785ac3da693cb655be0f6a1393ad176e26b688
HEAD_REF main
PATCHES
openexr.patch
)
if (VCPKG_HOST_IS_LINUX)

View File

@ -1,6 +1,7 @@
{
"name": "uvatlas",
"version-date": "2022-07-30",
"port-version": 1,
"description": "UVAtlas isochart texture atlas",
"homepage": "https://github.com/Microsoft/UVAtlas",
"documentation": "https://github.com/Microsoft/UVAtlas/wiki",

View File

@ -1930,7 +1930,7 @@
},
"directxtex": {
"baseline": "2022-07-29",
"port-version": 0
"port-version": 1
},
"directxtk": {
"baseline": "2022-07-29",
@ -2410,7 +2410,7 @@
},
"freeimage": {
"baseline": "3.18.0",
"port-version": 23
"port-version": 24
},
"freeopcua": {
"baseline": "20190125",
@ -3021,8 +3021,8 @@
"port-version": 0
},
"ilmbase": {
"baseline": "2.3.0",
"port-version": 1
"baseline": "3",
"port-version": 0
},
"imath": {
"baseline": "3.1.5",
@ -5322,23 +5322,23 @@
},
"opencv2": {
"baseline": "2.4.13.7",
"port-version": 14
"port-version": 15
},
"opencv3": {
"baseline": "3.4.18",
"port-version": 1
"port-version": 2
},
"opencv4": {
"baseline": "4.6.0",
"port-version": 4
"port-version": 5
},
"opendnp3": {
"baseline": "3.1.1",
"port-version": 1
},
"openexr": {
"baseline": "2.5.8",
"port-version": 1
"baseline": "3.1.5",
"port-version": 0
},
"openfbx": {
"baseline": "2022-07-18",
@ -5430,7 +5430,7 @@
},
"openvdb": {
"baseline": "9.0.0",
"port-version": 0
"port-version": 1
},
"openvpn3": {
"baseline": "3.7.0",
@ -5474,7 +5474,7 @@
},
"osg": {
"baseline": "3.6.5",
"port-version": 16
"port-version": 17
},
"osg-qt": {
"baseline": "Qt5",
@ -5526,7 +5526,7 @@
},
"pangolin": {
"baseline": "0.6",
"port-version": 2
"port-version": 3
},
"pangomm": {
"baseline": "2.50.0",
@ -7214,7 +7214,7 @@
},
"theia": {
"baseline": "0.8",
"port-version": 6
"port-version": 7
},
"think-cell-range": {
"baseline": "498839d",
@ -7558,7 +7558,7 @@
},
"uvatlas": {
"baseline": "2022-07-30",
"port-version": 0
"port-version": 1
},
"uvw": {
"baseline": "2.12.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b72dbe4138eac6fea28e42828e2fc2a7ed99259b",
"version-date": "2022-07-29",
"port-version": 1
},
{
"git-tree": "e383685c947595287b5fbc51436378981c248793",
"version-date": "2022-07-29",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b72eaa94f12facf42b2180bf49ff9121d9477eaa",
"version": "3.18.0",
"port-version": 24
},
{
"git-tree": "748b7f37d074522ba08e6c4d6e6cf3afb3107da6",
"version": "3.18.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6926b258aab64f6946a04ba1f8f23592bfaf44ec",
"version": "3",
"port-version": 0
},
{
"git-tree": "7d1a248f37b30f491ebf4430ee294e1e9018ec44",
"version-string": "2.3.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2c74bb03ea3451c670c4ec82b3a1acda11baeaf6",
"version": "2.4.13.7",
"port-version": 15
},
{
"git-tree": "5161f9b494cb04f39503980cdca10bdac6e7ee53",
"version": "2.4.13.7",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ab004823dbf456854654e2e0851be69ee4e5c5c5",
"version": "3.4.18",
"port-version": 2
},
{
"git-tree": "6f45f46b8a492b795cce92786a3d2048ef24ef38",
"version": "3.4.18",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fdfecadf1577e25595f58dbe2d6c26bd2cb99296",
"version": "4.6.0",
"port-version": 5
},
{
"git-tree": "970c048b2d380fe84e110c02a99dc099f8b877d0",
"version": "4.6.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1426fa9af15b03db5bacc50dcdd4569da1c18bde",
"version": "3.1.5",
"port-version": 0
},
{
"git-tree": "447c9eae823d9570dfc549995efba4f623ddaae2",
"version": "2.5.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fd83349668c7c8ec38e4850437ec678b44e038f5",
"version": "9.0.0",
"port-version": 1
},
{
"git-tree": "a026562abe75e40d4b60d97108ef057b2e28629a",
"version": "9.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e29f8e57a49cb782817b890b77b3f0ec06afe3c0",
"version": "3.6.5",
"port-version": 17
},
{
"git-tree": "9b4ddf02fe84124b58b1ea60dcc9a4f553f32704",
"version": "3.6.5",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d47198a68cd0a92fd6e74d50262dd657d027e217",
"version": "0.6",
"port-version": 3
},
{
"git-tree": "1515f75cbc480addcd0ca12c49c0435a0c9e158c",
"version": "0.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e8a6f763efb9bd7657a6be700493a95ab32d1cb6",
"version": "0.8",
"port-version": 7
},
{
"git-tree": "f19561fe41ab71864fbf9640e491cc6a567c06b8",
"version-string": "0.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b8e6b720b8515e7b966c76785e54d31f97d32261",
"version-date": "2022-07-30",
"port-version": 1
},
{
"git-tree": "bb57b16dfc29cefbae6f35fd3e09376e0291b2bd",
"version-date": "2022-07-30",