[alembic] fix hdf5 linkage (#7551)

This commit is contained in:
Alexander Neumann 2019-08-06 19:30:06 +02:00 committed by Curtis J Bezault
parent 435043115a
commit 5c0c5adc64
4 changed files with 1 additions and 51 deletions

View File

@ -1,5 +1,5 @@
Source: alembic
Version: 1.7.11-3
Version: 1.7.11-4
Build-Depends: ilmbase, hdf5
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/

View File

@ -1,30 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce0a8e0..229fc77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -226,7 +226,24 @@ INCLUDE_DIRECTORIES(${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY})
IF (USE_HDF5)
FIND_PACKAGE(ZLIB REQUIRED)
SET(ALEMBIC_WITH_HDF5 "1")
- INCLUDE("./cmake/AlembicHDF5.cmake")
+ #INCLUDE("./cmake/AlembicHDF5.cmake")
+ FIND_LIBRARY(HDF5_LIBRARIES_RELEASE
+ NAMES hdf5
+ PATHS ${HDF5_ROOT}/lib
+ )
+ MESSAGE(STATUS ${HDF5_LIBRARIES_RELEASE})
+ FIND_LIBRARY(HDF5_LIBRARIES_DEBUG
+ NAMES hdf5_D
+ PATHS ${HDF5_ROOT}/debug/lib
+ )
+ MESSAGE(STATUS ${HDF5_LIBRARIES_DEBUG})
+ SET(HDF5_LIBRARIES
+ optimized ${HDF5_LIBRARIES_RELEASE}
+ debug ${HDF5_LIBRARIES_DEBUG}
+ )
+ SET(HDF5_INCLUDE_DIRS
+ ${HDF5_ROOT}/include
+ )
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DH5_USE_18_API")
ENDIF()

View File

@ -1,17 +0,0 @@
diff --git a/lib/Alembic/CMakeLists.txt b/lib/Alembic/CMakeLists.txt
index 5028c91..1f81d50 100644
--- a/lib/Alembic/CMakeLists.txt
+++ b/lib/Alembic/CMakeLists.txt
@@ -49,6 +49,12 @@ ADD_SUBDIRECTORY(AbcMaterial)
ADD_SUBDIRECTORY(Ogawa)
ADD_LIBRARY(Alembic ${LIB_TYPE} ${CXX_FILES})
+IF (USE_HDF5)
+ TARGET_LINK_LIBRARIES(Alembic
+ ${HDF5_LIBRARIES}
+ )
+ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
+ENDIF()
TARGET_INCLUDE_DIRECTORIES(Alembic
PUBLIC

View File

@ -16,8 +16,6 @@ vcpkg_from_github(
SHA512 94b9c218a2fe6e2e24205aff4a2f6bab784851c2aa15592fb60ea91f0e8038b0c0656a118f3a5cba0d3de8917dd90b74d0e2d1c4ac034b9ee3f5d0741d9f6b70
HEAD_REF master
PATCHES
fix-hdf5link.patch
bypass-findhdf5.patch
fix-C1083.patch
)
@ -26,7 +24,6 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DUSE_HDF5=ON
-DHDF5_ROOT=${CURRENT_INSTALLED_DIR}
)
vcpkg_install_cmake()