cmake-js
Advanced tools
Comparing version 7.1.0 to 7.1.1
@@ -0,1 +1,6 @@ | ||
v7.1.1 - 15/12/22 | ||
========== | ||
- fix build errors on windows | ||
v7.1.0 - 14/12/22 | ||
@@ -2,0 +7,0 @@ ========== |
@@ -121,3 +121,2 @@ "use strict"; | ||
CMake.prototype.getConfigureCommand = async function () { | ||
const nodeLibDefPath = environment.isWin && this.options.isNodeApi ? path.join(this.options.out, 'node-lib.def') : undefined | ||
@@ -177,2 +176,11 @@ // Create command: | ||
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) { | ||
@@ -221,9 +229,8 @@ command.push("-G", this.toolset.generator); | ||
CMake.prototype.getCmakeJsLibString = function () { | ||
const libs = [] | ||
if (environment.isWin) { | ||
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 { | ||
@@ -281,2 +288,6 @@ libs.push(...this.dist.winLibs) | ||
CMake.prototype.getNodeLibDefPath = function () { | ||
return environment.isWin && this.options.isNodeApi ? path.join(this.options.out, 'node-lib.def') : undefined | ||
} | ||
CMake.prototype._generateNodeLibDef = async function (targetFile) { | ||
@@ -330,2 +341,4 @@ try { | ||
try { | ||
const nodeLibDefPath = this.getNodeLibDefPath() | ||
if (environment.isWin && nodeLibDefPath) { | ||
@@ -332,0 +345,0 @@ await this._generateNodeLibDef(nodeLibDefPath) |
@@ -24,3 +24,3 @@ { | ||
"main": "lib", | ||
"version": "7.1.0", | ||
"version": "7.1.1", | ||
"author": "Gábor Mező aka unbornchikken", | ||
@@ -27,0 +27,0 @@ "maintainers": [ |
111287
1886