[alembic] add hdf5 dependency and fix link issue. #1545

This commit is contained in:
ousttrue 2017-07-27 02:36:27 +09:00
parent a016cd3f12
commit fa6b454ddf
3 changed files with 24 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Source: alembic
Version: 1.7.1-1
Build-Depends:ilmbase
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. http://alembic.io/

View File

@ -0,0 +1,17 @@
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

@ -13,8 +13,14 @@ vcpkg_from_github(
HEAD_REF master
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DUSE_HDF5=ON
)
vcpkg_install_cmake()