-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #752 from daleglass-overte/upgrade-openexr
Upgrade openexr
- Loading branch information
Showing
11 changed files
with
142 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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 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,25 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO AcademySoftwareFoundation/Imath | ||
REF v3.1.9 | ||
SHA512 ad96b2ac306fc13c01e8ea3256f885499c3f545be327feaba0f5e093b70b544bcca6f8b353fa7e35107aae515c19caced44331a95d0414f367ead4691ec73564 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DIMATH_INSTALL_SYM_LINK=OFF | ||
-DBUILD_TESTING=OFF | ||
-DIMATH_INSTALL_PKG_CONFIG=ON | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_copy_pdbs() | ||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Imath) | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
||
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
This file contains 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,18 @@ | ||
{ | ||
"name": "imath", | ||
"version": "3.1.9", | ||
"port-version": 1, | ||
"description": "Imath is a C++ and Python library of 2D and 3D vector, matrix, and math operations for computer graphics.", | ||
"homepage": "https://github.com/AcademySoftwareFoundation/Imath", | ||
"license": "BSD-3-Clause", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,13 @@ | ||
diff --git a/src/lib/OpenEXRCore/internal_dwa_simd.h b/src/lib/OpenEXRCore/internal_dwa_simd.h | ||
index 7b53501ac..ca69c9848 100644 | ||
--- a/src/lib/OpenEXRCore/internal_dwa_simd.h | ||
+++ b/src/lib/OpenEXRCore/internal_dwa_simd.h | ||
@@ -18,7 +18,7 @@ | ||
// aligned. Unaligned pointers may risk seg-faulting. | ||
// | ||
|
||
-#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE) | ||
+#if defined __SSE2__ || (_MSC_VER >= 1300 && (_M_IX86 || _M_X64) && !_M_CEE_PURE) | ||
# define IMF_HAVE_SSE2 1 | ||
# include <emmintrin.h> | ||
# include <mmintrin.h> |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,71 +1,46 @@ | ||
set(OPENEXR_VERSION 2.3.0) | ||
set(OPENEXR_HASH 268ae64b40d21d662f405fba97c307dad1456b7d996a447aadafd41b640ca736d4851d9544b4741a94e7b7c335fe6e9d3b16180e710671abfc0c8b2740b147b2) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO openexr/openexr | ||
REF v${OPENEXR_VERSION} | ||
SHA512 ${OPENEXR_HASH} | ||
HEAD_REF master | ||
PATCHES "fix_install_ilmimf.patch" | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO AcademySoftwareFoundation/openexr | ||
REF "v${VERSION}" | ||
SHA512 ec60e79341695452e05f50bbcc0d55e0ce00fbb64cdec01a83911189c8643eb28a8046b14ee4230e5f438f018f2f1d0714f691983474d7979befd199f3f34758 | ||
HEAD_REF master | ||
PATCHES | ||
fix-arm64-windows-build.patch # https://github.com/AcademySoftwareFoundation/openexr/pull/1447 | ||
) | ||
|
||
set(OPENEXR_STATIC ON) | ||
set(OPENEXR_SHARED OFF) | ||
|
||
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DOPENEXR_BUILD_PYTHON_LIBS=OFF | ||
-DOPENEXR_BUILD_VIEWERS=OFF | ||
-DOPENEXR_RUN_FUZZ_TESTS=OFF | ||
-DOPENEXR_BUILD_SHARED=${OPENEXR_SHARED} | ||
-DOPENEXR_BUILD_STATIC=${OPENEXR_STATIC} | ||
OPTIONS_DEBUG | ||
-DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}/debug | ||
OPTIONS_RELEASE | ||
-DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}) | ||
|
||
vcpkg_install_cmake() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
|
||
# NOTE: Only use ".exe" extension on Windows executables. | ||
# Is there a cleaner way to do this? | ||
if(WIN32) | ||
set(EXECUTABLE_SUFFIX ".exe") | ||
else() | ||
set(EXECUTABLE_SUFFIX "") | ||
endif() | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrenvmap${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrheader${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmakepreview${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmaketiled${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultipart${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultiview${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrstdattr${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrenvmap${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrheader${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrmakepreview${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrmaketiled${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrmultipart${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrmultiview${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/exrstdattr${EXECUTABLE_SUFFIX}) | ||
|
||
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 | ||
-DBUILD_DOCS=OFF | ||
OPTIONS_DEBUG | ||
-DOPENEXR_BUILD_TOOLS=OFF | ||
-DOPENEXR_INSTALL_TOOLS=OFF | ||
) | ||
vcpkg_cmake_install() | ||
vcpkg_copy_pdbs() | ||
|
||
if (OPENEXR_STATIC) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
endif() | ||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenEXR) | ||
vcpkg_fixup_pkgconfig() | ||
|
||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
set(OPENEXR_PORT_DIR "openexr") | ||
else() | ||
set(OPENEXR_PORT_DIR "OpenEXR") | ||
if(OPENEXR_INSTALL_TOOLS) | ||
vcpkg_copy_tools( | ||
TOOL_NAMES exrenvmap exrheader exrinfo exrmakepreview exrmaketiled exrmultipart exrmultiview exrstdattr exr2aces | ||
AUTO_CLEAN | ||
) | ||
endif() | ||
|
||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}) | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}/copyright) | ||
file(REMOVE_RECURSE | ||
"${CURRENT_PACKAGES_DIR}/debug/include" | ||
"${CURRENT_PACKAGES_DIR}/debug/share" | ||
) | ||
|
||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOpenEXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}) | ||
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) |
This file contains 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,4 @@ | ||
openexr provides CMake targets: | ||
|
||
find_package(OpenEXR CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE OpenEXR::OpenEXR) |
This file contains 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,25 @@ | ||
{ | ||
"name": "openexr", | ||
"version": "3.1.8", | ||
"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 | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
}, | ||
"zlib" | ||
], | ||
"features": { | ||
"tools": { | ||
"description": "Build tools" | ||
} | ||
} | ||
} |
Oops, something went wrong.