From: Kefu Chai Date: Mon, 17 May 2021 04:58:11 +0000 (+0800) Subject: cmake: use RELATIVE in file(GLOB_RECURSE..) X-Git-Tag: v17.1.0~1916^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41359%2Fhead;p=ceph.git 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 --- 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"