diff options
| author | Alexander Neumann <Alexander.Neumann@hamburg.de> | 2019-03-14 22:32:31 +0100 |
|---|---|---|
| committer | Alexander Neumann <Alexander.Neumann@hamburg.de> | 2019-03-14 22:32:31 +0100 |
| commit | 9ac08b34ce7cc0fa8bf06ba05be248e9912af727 (patch) | |
| tree | 62d83b794e11fa27411fb0f7279ac3b75373e7fe | |
| parent | 7419fc975ce8447b7faf058e218ff6dd84db992d (diff) | |
| download | vcpkg-9ac08b34ce7cc0fa8bf06ba05be248e9912af727.tar.gz vcpkg-9ac08b34ce7cc0fa8bf06ba05be248e9912af727.zip | |
fix highfive in static builds.
HDF5_USE_STATIC_LIBRARIES must be set in static builds so that find_package(HDF5) finds the static hdf5 libraries
| -rw-r--r-- | ports/highfive/CONTROL | 2 | ||||
| -rw-r--r-- | ports/highfive/portfile.cmake | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ports/highfive/CONTROL b/ports/highfive/CONTROL index 22c7d616b..b82598048 100644 --- a/ports/highfive/CONTROL +++ b/ports/highfive/CONTROL @@ -1,4 +1,4 @@ Source: highfive -Version: 1.5 +Version: 1.5-1 Description: HighFive is a modern C++/C++11 friendly interface for libhdf5 Build-Depends: hdf5 diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index 72f644e0e..b0fe41e73 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/portfile.cmake @@ -8,6 +8,10 @@ vcpkg_from_github( HEAD_REF master ) +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -16,6 +20,7 @@ vcpkg_configure_cmake( -DHIGHFIVE_EXAMPLES=OFF -DUSE_BOOST=OFF -DHIGH_FIVE_DOCUMENTATION=OFF + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} ) vcpkg_install_cmake() @@ -23,6 +28,9 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/HighFive/CMake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +if(NOT WIN32) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/HighFive) +endif() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) |
