Ver Fonte

Auto-update highfive to v2.9.0 (#3331)

* Update highfive to v2.9.0

* Update xmake.lua

* patch cmake

---------

Co-authored-by: Jérôme Leclercq <[email protected]>
Co-authored-by: star9029 <[email protected]>
ruki há 1 ano atrás
pai
commit
a2fe203830
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      packages/h/highfive/xmake.lua

+ 9 - 0
packages/h/highfive/xmake.lua

@@ -6,6 +6,7 @@ package("highfive")
     add_urls("https://github.com/BlueBrain/HighFive/archive/refs/tags/$(version).tar.gz",
     add_urls("https://github.com/BlueBrain/HighFive/archive/refs/tags/$(version).tar.gz",
              "https://github.com/BlueBrain/HighFive.git")
              "https://github.com/BlueBrain/HighFive.git")
 
 
+    add_versions("v2.9.0", "6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e")
     add_versions("v2.6.1", "b5002c1221cf1821e02fb2ab891b0160bac88b43f56655bd844a472106ca3397")
     add_versions("v2.6.1", "b5002c1221cf1821e02fb2ab891b0160bac88b43f56655bd844a472106ca3397")
     add_versions("v2.3.1", "41728a1204bdfcdcef8cbc3ddffe5d744c5331434ce3dcef35614b831234fcd7")
     add_versions("v2.3.1", "41728a1204bdfcdcef8cbc3ddffe5d744c5331434ce3dcef35614b831234fcd7")
 
 
@@ -16,10 +17,18 @@ package("highfive")
     add_deps("hdf5")
     add_deps("hdf5")
 
 
     on_install("windows", "macosx", "linux", function (package)
     on_install("windows", "macosx", "linux", function (package)
+        if package:version():eq("2.9.0") then
+            io.replace("CMake/HighFiveTargetDeps.cmake", "find_package(HDF5 REQUIRED)", "find_package(HDF5 REQUIRED HINTS ${HDF5_ROOT})", {plain = true})
+        end
+
         local configs = {"-DHIGHFIVE_UNIT_TESTS=OFF",
         local configs = {"-DHIGHFIVE_UNIT_TESTS=OFF",
                          "-DHIGHFIVE_EXAMPLES=OFF",
                          "-DHIGHFIVE_EXAMPLES=OFF",
                          "-DHIGHFIVE_BUILD_DOCS=OFF",
                          "-DHIGHFIVE_BUILD_DOCS=OFF",
                          "-DHIGHFIVE_USE_BOOST=OFF"}
                          "-DHIGHFIVE_USE_BOOST=OFF"}
+        local hdf5 = package:dep("hdf5")
+        if hdf5 and not hdf5:is_system() then
+            table.insert(configs, "-DHDF5_ROOT=" .. hdf5:installdir())
+        end
         import("package.tools.cmake").install(package, configs)
         import("package.tools.cmake").install(package, configs)
     end)
     end)