diff options
| author | Albert Ziegenhagel <albert.ziegenhagel@outlook.com> | 2017-01-11 12:18:49 +0100 |
|---|---|---|
| committer | Albert Ziegenhagel <albert.ziegenhagel@outlook.com> | 2017-01-11 12:18:49 +0100 |
| commit | fda4bb11ce8403ab05f30bc6965c76f9621cff7a (patch) | |
| tree | 3a651ac70ea82fc0075b4135609e8cd8d2689bd8 | |
| parent | b966acc5c2572fff68b763024d9b96a2087aad29 (diff) | |
| download | vcpkg-fda4bb11ce8403ab05f30bc6965c76f9621cff7a.tar.gz vcpkg-fda4bb11ce8403ab05f30bc6965c76f9621cff7a.zip | |
Add port for hdf5
| -rw-r--r-- | ports/hdf5/CONTROL | 4 | ||||
| -rw-r--r-- | ports/hdf5/portfile.cmake | 44 |
2 files changed, 48 insertions, 0 deletions
diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL new file mode 100644 index 000000000..46049af87 --- /dev/null +++ b/ports/hdf5/CONTROL @@ -0,0 +1,4 @@ +Source: hdf5 +Version: 1.8.18 +Description: HDF5 is a data model, library, and file format for storing and managing data +Build-Depends: zlib, szip, msmpi
\ No newline at end of file diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake new file mode 100644 index 000000000..a09f758b6 --- /dev/null +++ b/ports/hdf5/portfile.cmake @@ -0,0 +1,44 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hdf5-1.8.18) +vcpkg_download_distfile(ARCHIVE + URLS "https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar.bz2" + FILENAME "hdf5-1.8.18.tar.bz2" + SHA512 01f6d14bdd3be2ced9c63cc9e1820cd7ea11db649ff9f3a3055c18c4b0fffe777fd23baad536e3bce31c4d76fe17db64a3972762e1bb4d232927c1ca140e72b2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=1 + -DBUILD_TESTING=OFF + -DHDF5_BUILD_EXAMPLES=OFF + -DHDF5_BUILD_TOOLS=OFF + -DHDF5_BUILD_CPP_LIB=OFF + -DHDF5_ENABLE_PARALLEL=ON + -DHDF5_ENABLE_Z_LIB_SUPPORT=ON + -DHDF5_ENABLE_SZIP_SUPPORT=ON + -DHDF5_ENABLE_SZIP_ENCODING=ON + -DHDF5_INSTALL_DATA_DIR=share/hdf5/data + -DHDF5_INSTALL_CMAKE_DIR=share/hdf5 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright) + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/hdf5/hdf5-targets-debug.cmake HDF5_TARGETS_DEBUG_MODULE) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" HDF5_TARGETS_DEBUG_MODULE "${HDF5_TARGETS_DEBUG_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-targets-debug.cmake "${HDF5_TARGETS_DEBUG_MODULE}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) |
