2017-11-27 02:28:16 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
message(FATAL_ERROR "${PORT} does not currently support UWP")
|
|
|
|
endif()
|
|
|
|
|
2017-01-11 19:18:49 +08:00
|
|
|
include(vcpkg_common_functions)
|
2018-01-03 20:28:42 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.1/hdf5-1.10.1)
|
2017-01-11 19:18:49 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2018-01-03 20:28:42 +08:00
|
|
|
URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/CMake-hdf5-1.10.1.zip"
|
|
|
|
FILENAME "CMake-hdf5-1.10.1.zip"
|
|
|
|
SHA512 0045a6301c6e3479be70f025d8690297ff33b9e6e99ec217a33e9b916d9410fb3f7110b7361fbeaec163c35b8e6bd948ac8d5fdace80930c98c6a0b27c6fd5c4
|
2017-01-11 19:18:49 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
2017-02-28 17:09:04 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/use-szip-config.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/disable-static-libs.patch
|
2017-02-28 17:48:24 +08:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/link-libraries-private.patch
|
2017-02-28 17:09:04 +08:00
|
|
|
)
|
|
|
|
|
2017-11-09 07:33:01 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_STATIC_LIBS)
|
2017-02-28 17:09:04 +08:00
|
|
|
|
2018-01-09 14:22:02 +08:00
|
|
|
if ("parallel" IN_LIST FEATURES)
|
|
|
|
set(ENABLE_PARALLEL ON)
|
|
|
|
else()
|
|
|
|
set(ENABLE_PARALLEL OFF)
|
|
|
|
endif()
|
|
|
|
|
2017-01-11 19:18:49 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-02-09 15:15:27 +08:00
|
|
|
PREFER_NINJA
|
2017-01-11 19:18:49 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
2017-02-28 17:09:04 +08:00
|
|
|
-DDISABLE_STATIC_LIBS=${DISABLE_STATIC_LIBS}
|
2017-01-11 19:18:49 +08:00
|
|
|
-DHDF5_BUILD_EXAMPLES=OFF
|
|
|
|
-DHDF5_BUILD_TOOLS=OFF
|
|
|
|
-DHDF5_BUILD_CPP_LIB=OFF
|
2018-01-09 14:22:02 +08:00
|
|
|
-DHDF5_ENABLE_PARALLEL=${ENABLE_PARALLEL}
|
2017-01-11 19:18:49 +08:00
|
|
|
-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)
|
|
|
|
|
2017-11-09 07:33:01 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/hdf5)
|
2017-01-11 19:18:49 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|