diff options
Diffstat (limited to '')
-rw-r--r-- | src/pybind/mgr/dashboard/CMakeLists.txt | 23 |
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() |