-
-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- a/CMakeLists.txt 2024-12-18 21:07:24.460618593 +0800 | ||
+++ b/CMakeLists.txt 2024-12-18 21:07:05.907811865 +0800 | ||
@@ -3,3 +3,4 @@ | ||
project(libnode_api LANGUAGES C) | ||
|
||
add_library(node_api STATIC node_api.c) | ||
+install(TARGETS node_api RUNTIME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package("node-api-stub") | ||
|
||
set_homepage("https://github.com/napi-bindings/node-api-stub") | ||
set_description("Node-API stub") | ||
set_license("MIT") | ||
|
||
add_urls("https://github.com/napi-bindings/node-api-stub.git") | ||
add_urls("https://github.com/napi-bindings/node-api-stub/archive/refs/tags/$(version).tar.gz") | ||
add_versions("8.0.0", "7fdf725a3122f4d86443e707227a30c663c7163c6d1b9f883cb2305f18e01740") | ||
add_patches("8.0.0", path.join(os.scriptdir(), "patches", "cmake.patch"), "ed3edac79b7efa682553e6dc85b5479f111445fc4df2e1b9674c5d7583cfb945") | ||
|
||
add_deps("cmake") | ||
add_links("node_api") | ||
|
||
on_install("windows", "macosx", "linux", function (package) | ||
import("package.tools.cmake").install(package) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:check_csnippets({test = [[ | ||
void test() { | ||
napi_env env; | ||
napi_value result; | ||
napi_get_undefined(env, &result); | ||
} | ||
]]}, {configs = {languages = "c99"}})) | ||
end) |