aboutsummaryrefslogtreecommitdiff
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
parentd788ada4e97ce5b36fc397a94da453814342ec43 (diff)
downloadvcpkg-7df18a58047eeea92f3e8d98a8785ba9f8a7eb0c.tar.gz
vcpkg-7df18a58047eeea92f3e8d98a8785ba9f8a7eb0c.zip
[hdf5][vtk] Add vcpkg-cmake-wrapper for HDF5 to fix vtk
-rw-r--r--ports/hdf5/CONTROL2
-rw-r--r--ports/hdf5/portfile.cmake11
-rw-r--r--ports/hdf5/vcpkg-cmake-wrapper.cmake11
-rw-r--r--ports/vtk/CONTROL4
-rw-r--r--ports/vtk/portfile.cmake2
5 files changed, 20 insertions, 10 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})
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL
index c57586824..0625a3ac1 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,7 +1,7 @@
Source: vtk
Version: 8.2.0-2
Description: Software system for 3D computer graphics, image processing, and visualization
-Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, atlmfc (windows), eigen3, double-conversion, pugixml, libharu, sqlite3
+Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, atlmfc (windows), eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c
Feature: openvr
Description: OpenVR functionality for VTK
@@ -9,7 +9,7 @@ Build-Depends: sdl2, openvr
Feature: qt
Description: Qt functionality for VTK
-Build-Depends: qt5, netcdf-c
+Build-Depends: qt5
Feature: mpi
Description: MPI functionality for VTK
diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake
index deed58eb9..536a81141 100644
--- a/ports/vtk/portfile.cmake
+++ b/ports/vtk/portfile.cmake
@@ -43,7 +43,7 @@ vcpkg_from_github(
REPO Kitware/VTK
REF "v${VTK_LONG_VERSION}"
SHA512 fd1d9c2872baa6eca7f8105b0057b56ec554e9d5eaf25985302e7fc032bdce72255d79e3f5f16ca50504151bda49cb3a148272ba32e0f410b4bdb70959b8f3f4
- HEAD_REF "master"
+ HEAD_REF master
PATCHES
fix-find-lz4.patch
fix_ogg_linkage.patch