From: Kefu Chai Date: Wed, 21 Jul 2021 02:46:51 +0000 (+0800) Subject: cmake: s/NPM/NPM_EXECUTABLE/ X-Git-Tag: v17.1.0~1313^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e3245d12a05533cdb87e6eec8ee3e600a010784b;p=ceph.git cmake: s/NPM/NPM_EXECUTABLE/ so the naming is more consistent with other executables found by find_program(). Signed-off-by: Kefu Chai --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fb269c0e3e8f..65f787777644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -630,8 +630,8 @@ include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS}) option(WITH_MGR_DASHBOARD_FRONTEND "Build the mgr/dashboard frontend using `npm`" ON) option(WITH_SYSTEM_NPM "Assume that dashboard build tools already installed through packages" OFF) if(WITH_SYSTEM_NPM) - find_program(NPM npm) - if(NOT NPM) + find_program(NPM_EXECUTABLE npm) + if(NOT NPM_EXECUTABLE) message(FATAL_ERROR "Can't find npm.") endif() endif() diff --git a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt index 9928c0e71983..bce59d07dd89 100644 --- a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt +++ b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt @@ -13,7 +13,7 @@ function(add_npm_command) else() string(REGEX REPLACE "^([^ ]=[^ ] )*npm (.*)$" - "\\1${NPM} \\2" + "\\1${NPM_EXECUTABLE} \\2" command ${command}) endif() string(REPLACE " " ";" command "${command}")