aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-07-27 17:14:32 -0700
committerGitHub <noreply@github.com>2017-07-27 17:14:32 -0700
commit30f333087b1de4f20315994bb8dda4ca1efc7044 (patch)
treea012736f0c9ce111b0335b2d015fd7bcefe229a9
parentb4bb3ecf9e3f682cb39af1615bb870bde4ae2368 (diff)
parentfa6b454ddf44971b9122beec41ac0408e7d9dc22 (diff)
downloadvcpkg-30f333087b1de4f20315994bb8dda4ca1efc7044.tar.gz
vcpkg-30f333087b1de4f20315994bb8dda4ca1efc7044.zip
Merge pull request #1546 from ousttrue/alembic-hdf5
[alembic] add hdf5 dependency and fix link issue. #1545
-rw-r--r--ports/alembic/CONTROL2
-rw-r--r--ports/alembic/fix-hdf5link.patch17
-rw-r--r--ports/alembic/portfile.cmake6
3 files changed, 24 insertions, 1 deletions
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()