aboutsummaryrefslogtreecommitdiff
path: root/ports/hdf5
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-04-03 05:52:27 -0700
committerRobert Schumacher <roschuma@microsoft.com>2019-04-03 05:52:27 -0700
commit7df18a58047eeea92f3e8d98a8785ba9f8a7eb0c (patch)
treeda8fd4fd67e3bb5f3b814d288f70a8ce48a23325 /ports/hdf5
parentd788ada4e97ce5b36fc397a94da453814342ec43 (diff)
downloadvcpkg-7df18a58047eeea92f3e8d98a8785ba9f8a7eb0c.tar.gz
vcpkg-7df18a58047eeea92f3e8d98a8785ba9f8a7eb0c.zip
[hdf5][vtk] Add vcpkg-cmake-wrapper for HDF5 to fix vtk
Diffstat (limited to 'ports/hdf5')
-rw-r--r--ports/hdf5/CONTROL2
-rw-r--r--ports/hdf5/portfile.cmake11
-rw-r--r--ports/hdf5/vcpkg-cmake-wrapper.cmake11
3 files changed, 17 insertions, 7 deletions
diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL
index 36c874111..229d659e7 100644
--- a/ports/hdf5/CONTROL
+++ b/ports/hdf5/CONTROL
@@ -1,5 +1,5 @@
Source: hdf5
-Version: 1.10.5-3
+Version: 1.10.5-4
Description: HDF5 is a data model, library, and file format for storing and managing data
Build-Depends: zlib, szip
diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake
index 1b4225d2e..eef241163 100644
--- a/ports/hdf5/portfile.cmake
+++ b/ports/hdf5/portfile.cmake
@@ -3,13 +3,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
endif()
include(vcpkg_common_functions)
-#set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.5/hdf5-1.10.5)
vcpkg_download_distfile(ARCHIVE
URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/CMake-hdf5-1.10.5.tar.gz"
FILENAME "CMake-hdf5-1.10.5.tar.gz"
SHA512 a25ea28d7a511f9184d97b5b8cd4c6d52dcdcad2bffd670e24a1c9a6f98b03108014a853553fa2b00d4be7523128b5fd6a4454545e3b17ff8c66fea16a09e962
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
@@ -32,7 +30,7 @@ else()
set(ENABLE_CPP OFF)
endif()
-#Note: HDF5 Builds by default static as well as shared libraries set BUILD_SHARED_LIBS to OFF to only get static libraries
+#Note: HDF5 Builds by default static as well as shared libraries. Set BUILD_SHARED_LIBS to OFF to only get static libraries
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
vcpkg_configure_cmake(
@@ -56,14 +54,15 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright)
-
vcpkg_fixup_cmake_targets(CONFIG_PATH share/hdf5)
#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright)
+configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/hdf5/vcpkg-cmake-wrapper.cmake @ONLY)
diff --git a/ports/hdf5/vcpkg-cmake-wrapper.cmake b/ports/hdf5/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..8cf3db3e5
--- /dev/null
+++ b/ports/hdf5/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,11 @@
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3)
+ if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND "HDF5" IN_LIST ARGS)
+ # The caller hasn't said "CONFIG", so they want the built-in FindHDF5.cmake behavior. Set configurations macros to ensure the built-in script finds us.
+ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
+ set(HDF5_USE_STATIC_LIBRARIES ON)
+ else()
+ set(HDF5_USE_STATIC_LIBRARIES OFF)
+ endif()
+ endif()
+endif()
+_find_package(${ARGS})