Skip to content

Commit

Permalink
fix: Only add build type to CMAKE_LIBRARY_OUTPUT_DIRECTORY if needed (
Browse files Browse the repository at this point in the history
#299)

Co-authored-by: Julian Waller <git@julusian.co.uk>
  • Loading branch information
trxcllnt and Julusian committed Feb 12, 2023
1 parent e40d2f3 commit e2452ee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/cMake.js
Expand Up @@ -131,11 +131,14 @@ CMake.prototype.getConfigureCommand = async function () {
// Build configuration:
D.push({"CMAKE_BUILD_TYPE": this.config});
if (environment.isWin) {
D.push({"CMAKE_RUNTIME_OUTPUT_DIRECTORY": this.workDir});
}
else {
D.push({"CMAKE_LIBRARY_OUTPUT_DIRECTORY": this.buildDir});
}
D.push({"CMAKE_RUNTIME_OUTPUT_DIRECTORY": this.workDir});
}
else if (this.workDir.endsWith(this.config)) {
D.push({"CMAKE_LIBRARY_OUTPUT_DIRECTORY": this.workDir});
}
else {
D.push({"CMAKE_LIBRARY_OUTPUT_DIRECTORY": this.buildDir});
}

// In some configurations MD builds will crash upon attempting to free memory.
// This tries to encourage MT builds which are larger but less likely to have this crash.
Expand Down

0 comments on commit e2452ee

Please sign in to comment.