Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Dec 15, 2022
1 parent d2e1c42 commit a50552c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/cMake.js
Expand Up @@ -172,6 +172,15 @@ CMake.prototype.getConfigureCommand = async function () {
const libsString = this.getCmakeJsLibString()
D.push({ "CMAKE_JS_LIB": libsString });

if (environment.isWin) {
const nodeLibDefPath = this.getNodeLibDefPath()
if (nodeLibDefPath) {
const nodeLibPath = path.join(this.workDir, 'node.lib')
D.push({ CMAKE_JS_NODELIB_DEF: nodeLibDefPath })
D.push({ CMAKE_JS_NODELIB_TARGET: nodeLibPath })
}
}

if (this.toolset.generator) {
command.push("-G", this.toolset.generator);
}
Expand Down Expand Up @@ -220,10 +229,7 @@ CMake.prototype.getCmakeJsLibString = function () {
if (environment.isWin) {
const nodeLibDefPath = this.getNodeLibDefPath()
if (nodeLibDefPath) {
const nodeLibPath = path.join(this.workDir, 'node.lib')
D.push({ CMAKE_JS_NODELIB_DEF: nodeLibDefPath })
D.push({ CMAKE_JS_NODELIB_TARGET: nodeLibPath })
libs.push(nodeLibPath)
libs.push(path.join(this.workDir, 'node.lib'))
} else {
libs.push(...this.dist.winLibs)
}
Expand Down

0 comments on commit a50552c

Please sign in to comment.