add fallback

pull/5226/head
star9029 2 months ago
parent 5e37df042a
commit b3676efa0e
  1. 4
      packages/o/osqp/patches/0.6.3/cmake.patch
  2. 8
      packages/o/osqp/xmake.lua

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index afd7bb94..a8ccb883 100644 index afd7bb94..de8a9607 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -267,15 +267,18 @@ endif (R_LANG) @@ -267,15 +267,18 @@ endif (R_LANG)
@ -9,7 +9,7 @@ index afd7bb94..a8ccb883 100644
- -
+include(GNUInstallDirs) +include(GNUInstallDirs)
+include(FindPkgConfig) +include(FindPkgConfig)
+pkg_search_module(qdldl REQUIRED IMPORTED_TARGET qdldl) +pkg_search_module(qdldl IMPORTED_TARGET qdldl)
# Add linear system solvers cumulative library # Add linear system solvers cumulative library
add_subdirectory(lin_sys) add_subdirectory(lin_sys)

@ -8,12 +8,10 @@ package("osqp")
add_versions("v0.6.3", "285b2a60f68d113a1090767ec8a9c81a65b3af2d258f8c78a31cc3f98ba58456") add_versions("v0.6.3", "285b2a60f68d113a1090767ec8a9c81a65b3af2d258f8c78a31cc3f98ba58456")
add_patches("0.6.3", "patches/0.6.3/cmake.patch", "ffe3809019eebae7559e8c4016431e9d3e9bc35776d9affe65b83904dd753999") add_patches("0.6.3", "patches/0.6.3/cmake.patch", "1cd5a36c8ca2dd393f39d2e79f9d54fbf63d086ea3d57d250a0ea5cc1a2f9eca")
add_deps("cmake") add_deps("cmake")
if is_plat("windows") then if is_host("linux", "macosx", "bsd") then
add_deps("pkgconf")
elseif is_host("linux", "macosx", "bsd") then
add_deps("pkg-config") add_deps("pkg-config")
end end
add_deps("qdldl") add_deps("qdldl")
@ -25,7 +23,7 @@ package("osqp")
if package:config("shared") and package:is_plat("windows") then if package:config("shared") and package:is_plat("windows") then
table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON") table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON")
end end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs, {packagedeps = "qdldl"})
end) end)
on_test(function (package) on_test(function (package)

Loading…
Cancel
Save