From fa6b454ddf44971b9122beec41ac0408e7d9dc22 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 27 Jul 2017 02:36:27 +0900 Subject: [alembic] add hdf5 dependency and fix link issue. #1545 --- ports/alembic/CONTROL | 2 +- ports/alembic/fix-hdf5link.patch | 17 +++++++++++++++++ ports/alembic/portfile.cmake | 6 ++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ports/alembic/fix-hdf5link.patch diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index cdd9a01e7..0e2b62452 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -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/ diff --git a/ports/alembic/fix-hdf5link.patch b/ports/alembic/fix-hdf5link.patch new file mode 100644 index 000000000..b9729f1ca --- /dev/null +++ b/ports/alembic/fix-hdf5link.patch @@ -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 diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index c98a84e57..56c3a4d30 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -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() -- cgit v1.2.3