Skip to content

Commit d085612

Browse files
sparistDawn LUCI CQ
authored andcommitted
Windows: make NAPI library name configurable
Change-Id: I1c2219cba0bbedd1628af5ac23e5176fa6d4ad0a Bug: dawn:1979 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/146685 Commit-Queue: Ben Clayton <[email protected]> Kokoro: Kokoro <[email protected]> Reviewed-by: Ben Clayton <[email protected]>
1 parent a9abb10 commit d085612

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dawn/node/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,16 @@ file(READ "${NODE_API_HEADERS_DIR}/symbols.js" NAPI_SYMBOLS_JS_CONTENT)
9393
string(REGEX MATCHALL "napi_[a-z0-9_]*" NAPI_SYMBOLS "${NAPI_SYMBOLS_JS_CONTENT}")
9494

9595
if (WIN32)
96+
set(NODE_API_BINARY_FILE "node.exe" CACHE STRING
97+
"The name of the file in which to find the Node-API symbols."
98+
)
99+
96100
# Generate the NapiSymbols.def file from the Napi symbol list
97101
set(NAPI_SYMBOLS_DEF "${DAWN_NODE_GEN_DIR}/NapiSymbols.def")
98102
list(TRANSFORM NAPI_SYMBOLS PREPEND " ")
99103
list(TRANSFORM NAPI_SYMBOLS APPEND "\n")
100104
string(REPLACE ";" "" NAPI_SYMBOLS "${NAPI_SYMBOLS}")
101-
string(PREPEND NAPI_SYMBOLS "LIBRARY node.exe\nEXPORTS\n")
105+
string(PREPEND NAPI_SYMBOLS "LIBRARY ${NODE_API_BINARY_FILE}\nEXPORTS\n")
102106
file(GENERATE OUTPUT "${NAPI_SYMBOLS_DEF}" CONTENT "${NAPI_SYMBOLS}")
103107
# Generate the NapiSymbols.lib from the NapiSymbols.def file
104108
set(NAPI_SYMBOLS_LIB "${DAWN_NODE_GEN_DIR}/NapiSymbols.lib")

0 commit comments

Comments
 (0)