cmake: s/NPM/NPM_EXECUTABLE/

so the naming is more consistent with other executables found by
find_program().

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-07-21 10:46:51 +08:00
parent 6d17e684ec
commit e3245d12a0
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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}")