summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/pybind/mgr/dashboard/CMakeLists.txt
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pybind/mgr/dashboard/CMakeLists.txt')
-rw-r--r--src/pybind/mgr/dashboard/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt
new file mode 100644
index 000000000..81bb9dd1b
--- /dev/null
+++ b/src/pybind/mgr/dashboard/CMakeLists.txt
@@ -0,0 +1,23 @@
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DESTINATION ${CEPH_INSTALL_DATADIR}/mgr
+ ${mgr_module_install_excludes}
+ PATTERN "frontend/*" EXCLUDE
+ PATTERN ".*" EXCLUDE)
+
+if(WITH_MGR_DASHBOARD_FRONTEND)
+ # build from source
+ add_subdirectory(frontend)
+ if(WITH_TESTS)
+ include(AddCephTest)
+ add_tox_test(mgr-dashboard-py3 TOX_ENVS py3)
+ add_tox_test(mgr-dashboard-lint TOX_ENVS lint)
+ add_tox_test(mgr-dashboard-check TOX_ENVS check)
+ add_tox_test(mgr-dashboard-openapi TOX_ENVS openapi-check)
+ endif()
+else()
+ # prebuilt
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/frontend/dist
+ DESTINATION ${CEPH_INSTALL_DATADIR}/mgr/dashboard/frontend)
+ install(FILES frontend/package.json
+ DESTINATION ${CEPH_INSTALL_DATADIR}/mgr/dashboard/frontend)
+endif()