From 9bad5d4a4b5f6bdbfb4a92279842a3f055f5434d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 17 May 2021 12:58:11 +0800 Subject: [PATCH] cmake: use RELATIVE in file(GLOB_RECURSE..) 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 --- src/pybind/mgr/dashboard/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt index 402c8afcca2..8771b3a76f6 100644 --- a/src/pybind/mgr/dashboard/CMakeLists.txt +++ b/src/pybind/mgr/dashboard/CMakeLists.txt @@ -88,13 +88,14 @@ add_npm_command( # 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" -- 2.39.5