Skip to content

Commit

Permalink
[hdf5] Refix msmpi library path in pkgconfig (#25089)
Browse files Browse the repository at this point in the history
* [hdf5] Refix msmpi library path in pkgconfig

* version

* version

* Apply suggestion

* version

* [hdf5] Use post-hoc string replacement

* version

Co-authored-by: Robert Schumacher <[email protected]>
  • Loading branch information
JackBoosY and ras0219-msft authored Jun 15, 2022
1 parent ac6ef2f commit 3d8f781
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
14 changes: 9 additions & 5 deletions ports/hdf5/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()

vcpkg_fixup_pkgconfig()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc")
foreach(file IN LISTS pc_files)

file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc")
foreach(file IN LISTS pc_files)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${file}" " -lhdf5" " -llibhdf5")
endforeach()
endif()
endif()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${file}" "/msmpi.lib\"" "/msmpi\"")
endif()
endforeach()

file(READ "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" contents)
string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]]
Expand Down
1 change: 1 addition & 0 deletions ports/hdf5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "hdf5",
"version": "1.12.2",
"port-version": 1,
"description": "HDF5 is a data model, library, and file format for storing and managing data",
"homepage": "https://www.hdfgroup.org/downloads/hdf5/",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,7 @@
},
"hdf5": {
"baseline": "1.12.2",
"port-version": 0
"port-version": 1
},
"healpix": {
"baseline": "1.12.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hdf5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f6647d7591d9b5a588d92e0fb4266d2028132ff9",
"version": "1.12.2",
"port-version": 1
},
{
"git-tree": "4abe78968a986c1793207ae653eb686926f3c141",
"version": "1.12.2",
Expand Down

0 comments on commit 3d8f781

Please sign in to comment.