less repeating this way. because the consumer of the globbed file list
is add_npm_command(), which in turn calls into add_custom_command(),
and the DEPENDS specified by add_custom_command() checks for the files
using relative paths, it's safe to have this change.
Signed-off-by: Kefu Chai <kchai@redhat.com>
# Glob some frontend files.
file(
GLOB_RECURSE frontend_src
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
frontend/src/*.ts
frontend/src/*.html)
# these files are generated during build
list(REMOVE_ITEM frontend_src
- ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/src/environments/environment.prod.ts
- ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/src/environments/environment.ts)
+ frontend/src/environments/environment.prod.ts
+ frontend/src/environments/environment.ts)
execute_process(
COMMAND bash -c "jq -r .config.locale ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/package.json"