[alembic] Update to 1.8.3 (#21041)

* Update alembic to 1.8.3, use imath dependency

* Update git-tree hash

* Various fixes and cleanups

* Update git-tree hash

* Various fixes

* Update git-tree hash

* Experimentally enable all platforms

* Update git-tree hash

* Various improvements

* Update git-tree hash

* Fix x64 Linux build

* Update git-tree hash

* Revert "Fix x64 Linux build"

This reverts commit 154d51fcca.

* Fix x64 Linux build using patch

* Update git-tree hash

* Make HDF5 support optional and disabled by default

* Update git-tree hash

* Fix abcconvert tool

* Use alternative method to fix DLL location, also fixes PDB inclusion

* Update git-tree hash

* Fix supported platforms

* Update git-tree hash

Co-authored-by: chausner <chausner@users.noreply.github.com>
This commit is contained in:
chausner 2021-11-04 23:32:49 +01:00 committed by GitHub
parent 063d5fd9de
commit 13156b1cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 108 additions and 115 deletions

View File

@ -0,0 +1,19 @@
Workaround for https://github.com/alembic/alembic/issues/309
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,14 +125,6 @@ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
ENDIF()
-# Set some debug vs opt flags
-if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND NOT MSVC)
- add_definitions(-Wall -Werror -Wextra -Wno-unused-parameter -Wno-deprecated)
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0) OR
- CMAKE_CXX_COMPILER_ID MATCHES "CLANG")
- add_definitions( -Wno-error=implicit-fallthrough)
- endif()
-endif()
IF (NOT ${WINDOWS})
SET(EXTERNAL_MATH_LIBS "-lm")

View File

@ -1,50 +0,0 @@
diff --git a/cmake/AlembicIlmBase.cmake b/cmake/AlembicIlmBase.cmake
index cd00d70..0e50512 100644
--- a/cmake/AlembicIlmBase.cmake
+++ b/cmake/AlembicIlmBase.cmake
@@ -33,11 +33,17 @@
##
##-*****************************************************************************
-FIND_PACKAGE(IlmBase)
+FIND_PACKAGE(OpenEXR)
-IF (ILMBASE_FOUND)
+IF (OPENEXR_FOUND)
SET(ALEMBIC_ILMBASE_FOUND 1 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise")
+ set(ALEMBIC_ILMBASE_INCLUDE_DIRECTORY ${OpenEXR_INCLUDE_DIRS}/OpenEXR)
+ set(ALEMBIC_ILMBASE_HALF_LIB ${OPENEXR_HALF_LIBRARY})
+ set(ALEMBIC_ILMBASE_IEX_LIB ${OPENEXR_IEX_LIBRARY})
+ set(ALEMBIC_ILMBASE_IEXMATH_LIB ${OPENEXR_IEXMATH_LIBRARY} ${OPENEXR_IMATH_LIBRARY})
+ set(ALEMBIC_ILMBASE_ILMTHREAD_LIB ${OPENEXR_ILMTHREAD_LIBRARY})
+ set(ALEMBIC_ILMBASE_IMATH_LIB ${OPENEXR_IMATH_LIBRARY})
SET(ALEMBIC_ILMBASE_LIBS
${ALEMBIC_ILMBASE_IMATH_LIB}
${ALEMBIC_ILMBASE_ILMTHREAD_LIB}
@@ -45,9 +59,9 @@ IF (ILMBASE_FOUND)
${ALEMBIC_ILMBASE_HALF_LIB}
)
- if (${ALEMBIC_ILMBASE_IEXMATH_LIB})
+ if (ALEMBIC_ILMBASE_IEXMATH_LIB)
SET(ALEMBIC_ILMBASE_LIBS ${ALEMBIC_ILMBASE_LIBS} ${ALEMBIC_ILMBASE_IEXMATH_LIB})
- endif (${ALEMBIC_ILMBASE_IEXMATH_LIB})
+ endif (ALEMBIC_ILMBASE_IEXMATH_LIB)
ELSE()
SET(ALEMBIC_ILMBASE_FOUND 0 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise")
diff --git a/cmake/AlembicOpenEXR.cmake b/cmake/AlembicOpenEXR.cmake
index 0833b32..a9180cd 100644
--- a/cmake/AlembicOpenEXR.cmake
+++ b/cmake/AlembicOpenEXR.cmake
@@ -38,8 +38,8 @@
FIND_PACKAGE( OpenEXR )
IF( OPENEXR_FOUND )
- SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS} )
+ SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS}/OpenEXR )
SET( ALEMBIC_OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} )
# SET( ALEMBIC_OPENEXR_DEFINITIONS ${OPENEXR_DEFINITIONS} )
SET( ALEMBIC_OPENEXR_FOUND 1 CACHE STRING "Set to 1 if OpenEXR is found, 0 otherwise" )

View File

@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,7 @@ option(DOCS_PATH
# Set static/dynamic build options
SET(LIB_TYPE STATIC)
-SET(RUNTIME_INSTALL_DIR lib)
+SET(RUNTIME_INSTALL_DIR bin)
SET(LIBRARY_INSTALL_DIR lib)
SET(ARCHIVE_INSTALL_DIR lib)
IF (ALEMBIC_SHARED_LIBS)
diff --git a/lib/Alembic/CMakeLists.txt b/lib/Alembic/CMakeLists.txt
--- a/lib/Alembic/CMakeLists.txt
+++ b/lib/Alembic/CMakeLists.txt
@@ -78,12 +78,11 @@ option(DOCS_PATH
${ZLIB_LIBRARY}
)
-SET( ALEMBIC_LIB_INSTALL_DIR lib CACHE PATH "Where to install the Alembic libs")
INSTALL(TARGETS Alembic
EXPORT AlembicTargets
- LIBRARY DESTINATION ${ALEMBIC_LIB_INSTALL_DIR}
- ARCHIVE DESTINATION ${ALEMBIC_LIB_INSTALL_DIR}
- RUNTIME DESTINATION ${ALEMBIC_LIB_INSTALL_DIR})
+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
+ ARCHIVE DESTINATION ${ARCHIVE_INSTALL_DIR}
+ RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR})
#-******************************************************************************
# PACKAGE EXPORTS

View File

@ -1,80 +1,54 @@
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "OSX" "Linux")
vcpkg_fail_port_install(ON_TARGET "UWP")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_fail_port_install(ON_ARCH "x86") # see https://github.com/alembic/alembic/issues/372
endif()
vcpkg_buildpath_length_warning(37)
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO alembic/alembic
REF 7e5cf9b896f4299117457f36a7bf47d962cd0ebf # 1.7.16
SHA512 aeb449890874fa3a89a72245f3e63a3370332d6becdf20bc77bd9c216bbe1e4578018bbe559c06df69db199799d071399f925a91c8fa816e0eec2d2420f091e9
REF 1.8.3
SHA512 0049c72d93e66e12d704d27e7ba36cd9c718667f2ce4f7baa1bee1613ed88ba53abea98f457e14f7f2144cb353810a4108d26c7dd1a1543ec2af576272f19036
HEAD_REF master
PATCHES
fix-find-openexr-ilmbase.patch
fix-runtime-destination.patch
disable-warnings-as-error.patch
)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindIlmBase.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindOpenEXR.cmake)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ALEMBIC_SHARED_LIBS)
if(NOT VCPKG_TARGET_IS_WINDOWS)
# In debug mode with g++, alembic defines -Werror
# so we need to disable some warnings to avoid build errors
list(APPEND GXX_DEBUG_FLAGS
-DCMAKE_CXX_FLAGS_DEBUG=-Wno-deprecated
-DCMAKE_CXX_FLAGS_DEBUG=-Wno-error=implicit-fallthrough
)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
hdf5 USE_HDF5
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DUSE_HDF5=ON
OPTIONS_DEBUG
${GXX_DEBUG_FLAGS}
-DALEMBIC_SHARED_LIBS=${ALEMBIC_SHARED_LIBS}
-DUSE_TESTS=OFF
${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Alembic)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Alembic)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_TARGET_IS_WINDOWS)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(REMOVE ${EXE})
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll)
file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake RELEASE_CONFIG)
string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll"
"\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake "${RELEASE_CONFIG}")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${DEBUG_EXE})
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll)
file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake DEBUG_CONFIG)
string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll"
"\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake "${DEBUG_CONFIG}")
endif()
else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
set(TOOLS abcdiff abcecho abcechobounds abcls abcstitcher abctree)
if(USE_HDF5)
list(APPEND TOOLS abcconvert)
endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
vcpkg_copy_tools(
TOOL_NAMES ${TOOLS}
AUTO_CLEAN
)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,12 +1,26 @@
{
"name": "alembic",
"version": "1.7.16",
"port-version": 1,
"version": "1.8.3",
"description": "Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.",
"homepage": "https://alembic.io/",
"supports": "windows & !arm & !uwp & !static",
"supports": "!(windows & x86) & !uwp",
"dependencies": [
"hdf5",
"ilmbase"
]
"imath",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"hdf5": {
"description": "Build with HDF5 support",
"dependencies": [
"hdf5"
]
}
}
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8cb082c36da272a988b08fe0c4c638ff62cb1ad2",
"version": "1.8.3",
"port-version": 0
},
{
"git-tree": "058a9ce893dbaf6ad6d2743b47a9c633eff3798a",
"version": "1.7.16",

View File

@ -49,8 +49,8 @@
"port-version": 5
},
"alembic": {
"baseline": "1.7.16",
"port-version": 1
"baseline": "1.8.3",
"port-version": 0
},
"aliyun-oss-c-sdk": {
"baseline": "3.10.0",