so the naming is more consistent with other executables found by
find_program().
Signed-off-by: Kefu Chai <kchai@redhat.com>
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()
else()
string(REGEX REPLACE
"^([^ ]=[^ ] )*npm (.*)$"
- "\\1${NPM} \\2"
+ "\\1${NPM_EXECUTABLE} \\2"
command ${command})
endif()
string(REPLACE " " ";" command "${command}")