dlfcn-win32: add package (#4268)

pull/4273/head
star9029 6 months ago committed by GitHub
parent 5d3b999986
commit 5cca6cf9b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      packages/d/dlfcn-win32/xmake.lua

@ -0,0 +1,25 @@
package("dlfcn-win32")
set_homepage("https://github.com/dlfcn-win32/dlfcn-win32")
set_description("Official dlfcn-win32 repo")
set_license("MIT")
add_urls("https://github.com/dlfcn-win32/dlfcn-win32/archive/refs/tags/$(version).tar.gz",
"https://github.com/dlfcn-win32/dlfcn-win32.git")
add_versions("v1.4.1", "30a9f72bdf674857899eb7e553df1f0d362c5da2a576ae51f886e1171fbdb399")
add_deps("cmake")
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_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)
if package:config("shared") then
package:add("defines", "DLFCN_WIN32_SHARED")
end
end)
on_test(function (package)
assert(package:has_cfuncs("dlopen", {includes = "dlfcn.h"}))
end)
Loading…
Cancel
Save