diff --git a/README.md b/README.md index a15d5b11..7ea835e2 100644 --- a/README.md +++ b/README.md @@ -223,20 +223,20 @@ For current user: npm config set cmake_ ``` -CMake.js will set a variable named uppercase `""` to `` (by using `-D=""` option). User's settings will **overwrite** globals. +CMake.js will set a variable named `""` to `` (by using `-D=""` option). User's settings will **overwrite** globals. #### Example: Enter at command prompt: ``` -npm config set cmake_bubu="kittyfck" +npm config set cmake_BuBu="kittyfck" ``` Then write to your CMakeLists.txt the following: ```cmake -message (STATUS ${BUBU}) +message (STATUS ${BuBu}) ``` This will print during configure: diff --git a/lib/es5/cMake.js b/lib/es5/cMake.js index ba2f4af9..ec638562 100644 --- a/lib/es5/cMake.js +++ b/lib/es5/cMake.js @@ -260,10 +260,9 @@ CMake.prototype.getConfigureCommand = async($traceurRuntime.initGeneratorFunctio for ($__10 = void 0, $__9 = (_.keys(npmConfigData))[Symbol.iterator](); !($__12 = ($__10 = $__9.next()).done); $__12 = true) { key = $__10.value; { - ukey = key.toUpperCase(); - if (_.startsWith(ukey, "CMAKE_")) { + if (_.startsWith(key, "cmake_")) { s = {}; - sk = ukey.substr(6); + sk = key.substr(6); if (sk) { s[sk] = npmConfigData[key]; if (s[sk]) { diff --git a/lib/es6/cMake.js b/lib/es6/cMake.js index 3d5ce7e0..9bc92f89 100644 --- a/lib/es6/cMake.js +++ b/lib/es6/cMake.js @@ -192,10 +192,9 @@ CMake.prototype.getConfigureCommand = async(function* () { // Load NPM config for (let key of _.keys(npmConfigData)) { - let ukey = key.toUpperCase(); - if (_.startsWith(ukey, "CMAKE_")) { + if (_.startsWith(key, "cmake_")) { let s = {}; - let sk = ukey.substr(6); + let sk = key.substr(6); if (sk) { s[sk] = npmConfigData[key]; if (s[sk]) {