package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
919 B

package("osqp")
set_homepage("https://osqp.org/")
set_description("The Operator Splitting QP Solver")
set_license("Apache-2.0")
add_urls("https://github.com/oxfordcontrol/osqp.git")
add_versions("v0.6.2", "f9fc23d3436e4b17dd2cb95f70cfa1f37d122c24")
add_deps("cmake")
on_install("windows", "macosx", "linux", "mingw", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:config("pic") ~= false then
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
end
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("osqp_solve", {includes = "osqp/osqp.h"}))
end)