Skip to content

Commit

Permalink
add node_api_headers package (#4634)
Browse files Browse the repository at this point in the history
* add node_api_headers package

* improve node-api-headers test

* fix attempt node-api-headers test

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
  • Loading branch information
enzalito and waruqi authored Jul 12, 2024
1 parent e676808 commit 41fe349
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/n/node-api-headers/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package("node-api-headers")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/nodejs/node-api-headers")
set_description("C-based Node-API headers")
set_license("MIT")

set_urls("https://github.com/nodejs/node-api-headers/archive/refs/tags/$(version).tar.gz",
"https://github.com/nodejs/node-api-headers.git")
add_versions("v1.1.0", "70608bc1e6dddce280285f3462f18a106f687c0720a4b90893e1ecd86e5a8bbf")

on_install(function(package)
os.cp("include/*.h", package:installdir("include"))
end)

on_test(function (package)
assert(package:has_cfuncs("napi_async_init", {includes = "node_api.h"}))
end)

0 comments on commit 41fe349

Please sign in to comment.