]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: use RELATIVE in file(GLOB_RECURSE..) 41359/head
authorKefu Chai <kchai@redhat.com>
Mon, 17 May 2021 04:58:11 +0000 (12:58 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 17 May 2021 05:31:45 +0000 (13:31 +0800)
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>
src/pybind/mgr/dashboard/CMakeLists.txt

index 402c8afcca2efd00cb9e20b1f3fd322fc1c7f217..8771b3a76f678df239a21e98785592b89341e5bf 100644 (file)
@@ -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"