pull/234/head
Hoildkv 4 years ago committed by GitHub
parent 16651d9a04
commit b5d28f381a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      packages/n/nlopt/xmake.lua
  2. 10
      packages/o/openblas/xmake.lua

@ -0,0 +1,20 @@
package("nlopt")
set_homepage("https://github.com/stevengj/nlopt/")
set_description("NLopt is a library for nonlinear local and global optimization, for functions with and without gradient information.")
set_license("LGPL-2.1")
add_urls("https://github.com/stevengj/nlopt/archive/$(version).tar.gz",
"https://github.com/stevengj/nlopt.git")
add_versions("v2.7.0", "b881cc2a5face5139f1c5a30caf26b7d3cb43d69d5e423c9d78392f99844499f")
on_install("linux", "windows", "macosx", function (package)
local configs = {"-DNLOPT_PYTHON=OFF", "-DNLOPT_OCTAVE=OFF", "-DNLOPT_MATLAB=OFF", "-DNLOPT_GUILE=OFF", "-DNLOPT_TESTS=OFF"}
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"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("nlopt_create", {includes = "nlopt.h"}))
end)

@ -22,12 +22,10 @@ package("openblas")
end
on_install("windows|x64", function (package)
if package:is_arch("x64", "x86_64") then
os.cp("bin", package:installdir())
os.cp("include", package:installdir())
os.cp("lib", package:installdir())
package:addenv("PATH", "bin")
end
os.cp("bin", package:installdir())
os.cp("include", package:installdir())
os.cp("lib", package:installdir())
package:addenv("PATH", "bin")
end)
on_install("linux", "mingw@windows,msys", function (package)

Loading…
Cancel
Save