aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsvidyuk <svidyuk@yandex-team.ru>2022-06-30 08:19:34 +0300
committersvidyuk <svidyuk@yandex-team.ru>2022-06-30 08:19:34 +0300
commit0fe3403f8cf7a97adcb19d24a9cb4951857de964 (patch)
tree76c2267df04e1c9426d45584ae31c805f6a8f162
parent9f4da2fc8133291794024c9887567b3f37113158 (diff)
downloadydb-0fe3403f8cf7a97adcb19d24a9cb4951857de964.tar.gz
Integrate newest embedded ui into opensource cmake build
KIKIMR-14261 ref:41131dbc63c1e2ef98fab87563649d6315d6f567
-rw-r--r--ydb/core/viewer/CMakeLists.txt208
-rw-r--r--ydb/core/viewer/epilogue.cmake35
-rw-r--r--ydb/core/viewer/recursive_resources.cmake64
3 files changed, 137 insertions, 170 deletions
diff --git a/ydb/core/viewer/CMakeLists.txt b/ydb/core/viewer/CMakeLists.txt
index 87a665378a..962c4783cd 100644
--- a/ydb/core/viewer/CMakeLists.txt
+++ b/ydb/core/viewer/CMakeLists.txt
@@ -67,95 +67,11 @@ target_link_libraries(ydb-core-viewer.global PUBLIC
lib-deprecated-kicli
)
target_sources(ydb-core-viewer.global PRIVATE
- ${CMAKE_BINARY_DIR}/ydb/core/viewer/c73c15d216a608d0c44d8b8332fff884.cpp
+ ${CMAKE_BINARY_DIR}/ydb/core/viewer/1cdc663173c623f6a008fb99b02498f1.cpp
)
resources(ydb-core-viewer.global
- ${CMAKE_BINARY_DIR}/ydb/core/viewer/c73c15d216a608d0c44d8b8332fff884.cpp
+ ${CMAKE_BINARY_DIR}/ydb/core/viewer/1cdc663173c623f6a008fb99b02498f1.cpp
INPUTS
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/index.html
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/71.09e486f9.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/63.ac3b2608.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/61.952e7098.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/8.30a04af0.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/9.be947608.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/44.788c2b34.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/34.0ef286a6.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/66.843845f2.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/7.f7e15990.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/46.116eab26.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/60.ccbe624b.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/73.58d8a1d2.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/49.4bf8a0ea.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/11.63840653.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/5.3db46e5a.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/52.6a42d8d6.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/17.11dbc303.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/68.85196c44.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/22.a7d8757e.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/56.2cca3aa1.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/62.0e7c7dbb.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/1.bfcc94ca.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/74.32021fea.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/69.50dc4733.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/24.24e9f60d.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/14.cec5e7db.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/4.b61784d1.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/54.d4de7c9d.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/30.df7470e6.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/6.8cdb2fbf.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/25.7d7c8a2f.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/13.f97a66a9.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/10.92b9e4a1.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/57.d4bbaa27.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/67.0bc4105a.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/39.b79b007e.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/51.339e01c0.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/19.05be344f.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/53.e2452bf9.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/48.324e0934.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/33.cd3a27e7.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/65.ded5dca8.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/27.23171e17.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/59.c56e69da.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/38.077194b4.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/40.5ff8ce60.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/0.cacaa682.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/55.3116dd9a.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/42.ed63d240.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/77.3d69f187.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/58.d67d0314.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/16.1b3ba162.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/37.24961211.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/47.0a9a3ec2.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/70.640259e3.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/35.82008f81.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/76.bea8889b.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/75.17492dfd.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/64.7d08354e.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/26.5b986789.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/20.2ace32ef.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/runtime-main.f9849c26.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/32.16e2d32b.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/15.41d064ac.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/21.6e60e40a.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/12.471ea0c6.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/28.d340c225.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/31.5a5752ae.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/50.38a9fb48.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/45.917abc5b.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/29.5954f939.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/78.2d9df1b5.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/36.adfe07e9.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/41.3fd36433.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/43.24e2d345.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/72.21b0fecb.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/18.71484fde.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/23.4aafb879.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/js/main.d392c3f5.chunk.js
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/media/codicon.80a4c25b.ttf
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/css/4.501d9812.chunk.css
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/css/main.947ae4dd.chunk.css
- ${CMAKE_SOURCE_DIR}/ydb/core/viewer/monitoring/resources/favicon.png
${CMAKE_SOURCE_DIR}/ydb/core/viewer/content/index.html
${CMAKE_SOURCE_DIR}/ydb/core/viewer/content/viewer.js
${CMAKE_SOURCE_DIR}/ydb/core/viewer/content/jstree.min.js
@@ -248,90 +164,6 @@ resources(ydb-core-viewer.global
${CMAKE_SOURCE_DIR}/ydb/core/viewer/content/api/lib/swagger-oauth.js
${CMAKE_SOURCE_DIR}/ydb/core/viewer/content/api/swagger-ui.min.js
KEYS
- monitoring/index.html
- monitoring/resources/js/71.09e486f9.chunk.js
- monitoring/resources/js/63.ac3b2608.chunk.js
- monitoring/resources/js/61.952e7098.chunk.js
- monitoring/resources/js/8.30a04af0.chunk.js
- monitoring/resources/js/9.be947608.chunk.js
- monitoring/resources/js/44.788c2b34.chunk.js
- monitoring/resources/js/34.0ef286a6.chunk.js
- monitoring/resources/js/66.843845f2.chunk.js
- monitoring/resources/js/7.f7e15990.chunk.js
- monitoring/resources/js/46.116eab26.chunk.js
- monitoring/resources/js/60.ccbe624b.chunk.js
- monitoring/resources/js/73.58d8a1d2.chunk.js
- monitoring/resources/js/49.4bf8a0ea.chunk.js
- monitoring/resources/js/11.63840653.chunk.js
- monitoring/resources/js/5.3db46e5a.chunk.js
- monitoring/resources/js/52.6a42d8d6.chunk.js
- monitoring/resources/js/17.11dbc303.chunk.js
- monitoring/resources/js/68.85196c44.chunk.js
- monitoring/resources/js/22.a7d8757e.chunk.js
- monitoring/resources/js/56.2cca3aa1.chunk.js
- monitoring/resources/js/62.0e7c7dbb.chunk.js
- monitoring/resources/js/1.bfcc94ca.chunk.js
- monitoring/resources/js/74.32021fea.chunk.js
- monitoring/resources/js/69.50dc4733.chunk.js
- monitoring/resources/js/24.24e9f60d.chunk.js
- monitoring/resources/js/14.cec5e7db.chunk.js
- monitoring/resources/js/4.b61784d1.chunk.js
- monitoring/resources/js/54.d4de7c9d.chunk.js
- monitoring/resources/js/30.df7470e6.chunk.js
- monitoring/resources/js/6.8cdb2fbf.chunk.js
- monitoring/resources/js/25.7d7c8a2f.chunk.js
- monitoring/resources/js/13.f97a66a9.chunk.js
- monitoring/resources/js/10.92b9e4a1.chunk.js
- monitoring/resources/js/57.d4bbaa27.chunk.js
- monitoring/resources/js/67.0bc4105a.chunk.js
- monitoring/resources/js/39.b79b007e.chunk.js
- monitoring/resources/js/51.339e01c0.chunk.js
- monitoring/resources/js/19.05be344f.chunk.js
- monitoring/resources/js/53.e2452bf9.chunk.js
- monitoring/resources/js/48.324e0934.chunk.js
- monitoring/resources/js/33.cd3a27e7.chunk.js
- monitoring/resources/js/65.ded5dca8.chunk.js
- monitoring/resources/js/27.23171e17.chunk.js
- monitoring/resources/js/59.c56e69da.chunk.js
- monitoring/resources/js/38.077194b4.chunk.js
- monitoring/resources/js/40.5ff8ce60.chunk.js
- monitoring/resources/js/0.cacaa682.chunk.js
- monitoring/resources/js/55.3116dd9a.chunk.js
- monitoring/resources/js/42.ed63d240.chunk.js
- monitoring/resources/js/77.3d69f187.chunk.js
- monitoring/resources/js/58.d67d0314.chunk.js
- monitoring/resources/js/16.1b3ba162.chunk.js
- monitoring/resources/js/37.24961211.chunk.js
- monitoring/resources/js/47.0a9a3ec2.chunk.js
- monitoring/resources/js/70.640259e3.chunk.js
- monitoring/resources/js/35.82008f81.chunk.js
- monitoring/resources/js/76.bea8889b.chunk.js
- monitoring/resources/js/75.17492dfd.chunk.js
- monitoring/resources/js/64.7d08354e.chunk.js
- monitoring/resources/js/26.5b986789.chunk.js
- monitoring/resources/js/20.2ace32ef.chunk.js
- monitoring/resources/js/runtime-main.f9849c26.js
- monitoring/resources/js/32.16e2d32b.chunk.js
- monitoring/resources/js/15.41d064ac.chunk.js
- monitoring/resources/js/21.6e60e40a.chunk.js
- monitoring/resources/js/12.471ea0c6.chunk.js
- monitoring/resources/js/28.d340c225.chunk.js
- monitoring/resources/js/31.5a5752ae.chunk.js
- monitoring/resources/js/50.38a9fb48.chunk.js
- monitoring/resources/js/45.917abc5b.chunk.js
- monitoring/resources/js/29.5954f939.chunk.js
- monitoring/resources/js/78.2d9df1b5.chunk.js
- monitoring/resources/js/36.adfe07e9.chunk.js
- monitoring/resources/js/41.3fd36433.chunk.js
- monitoring/resources/js/43.24e2d345.chunk.js
- monitoring/resources/js/72.21b0fecb.chunk.js
- monitoring/resources/js/18.71484fde.chunk.js
- monitoring/resources/js/23.4aafb879.chunk.js
- monitoring/resources/js/main.d392c3f5.chunk.js
- monitoring/resources/media/codicon.80a4c25b.ttf
- monitoring/resources/css/4.501d9812.chunk.css
- monitoring/resources/css/main.947ae4dd.chunk.css
- monitoring/resources/favicon.png
viewer/index.html
viewer/viewer.js
viewer/jstree.min.js
@@ -424,3 +256,39 @@ resources(ydb-core-viewer.global
viewer/api/lib/swagger-oauth.js
viewer/api/swagger-ui.min.js
)
+option(YDB_EMBEDDED_UI_DEV_SNAPSHOT "Use latest dev version of embedded UI git repo" Off)
+include(${CMAKE_CURRENT_SOURCE_DIR}/recursive_resources.cmake)
+
+if (YDB_EMBEDDED_UI_DEV_SNAPSHOT)
+ find_program(NPM_PATH NAMES npm REQUIRED)
+
+ include(ExternalProject)
+ ExternalProject_Add(ydb-embedded-ui-git
+ GIT_REPOSITORY https://github.com/ydb-platform/ydb-embedded-ui.git
+ GIT_TAG main
+ USES_TERMINAL_DOWNLOAD On
+ USES_TERMINAL_UPDATE On
+ USES_TERMINAL_BUILD On
+ CONFIGURE_COMMAND ""
+ TEST_COMMAND ""
+ INSTALL_COMMAND ""
+ BUILD_IN_SOURCE On
+ BUILD_COMMAND ${NPM_PATH} ci
+ COMMAND ${NPM_PATH} run build:embedded
+ )
+ ExternalProject_Get_property(ydb-embedded-ui-git SOURCE_DIR)
+ add_gen_resources(ydb-embedded-ui-git ${CMAKE_BINARY_DIR}/ydb/core/viewer/ydb_embedded_ui_monitoring.cpp
+ IN_DIR ${SOURCE_DIR}/build
+ PREFIX monitoring
+ )
+
+else()
+ add_dir_resources(${CMAKE_BINARY_DIR}/ydb/core/viewer/ydb_embedded_ui_monitoring.cpp
+ IN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/monitoring
+ PREFIX monitoring
+ )
+endif()
+target_sources(ydb-core-viewer.global PRIVATE
+ ${CMAKE_BINARY_DIR}/ydb/core/viewer/ydb_embedded_ui_monitoring.cpp
+)
+
diff --git a/ydb/core/viewer/epilogue.cmake b/ydb/core/viewer/epilogue.cmake
new file mode 100644
index 0000000000..368975a06a
--- /dev/null
+++ b/ydb/core/viewer/epilogue.cmake
@@ -0,0 +1,35 @@
+option(YDB_EMBEDDED_UI_DEV_SNAPSHOT "Use latest dev version of embedded UI git repo" Off)
+include(${CMAKE_CURRENT_SOURCE_DIR}/recursive_resources.cmake)
+
+if (YDB_EMBEDDED_UI_DEV_SNAPSHOT)
+ find_program(NPM_PATH NAMES npm REQUIRED)
+
+ include(ExternalProject)
+ ExternalProject_Add(ydb-embedded-ui-git
+ GIT_REPOSITORY https://github.com/ydb-platform/ydb-embedded-ui.git
+ GIT_TAG main
+ USES_TERMINAL_DOWNLOAD On
+ USES_TERMINAL_UPDATE On
+ USES_TERMINAL_BUILD On
+ CONFIGURE_COMMAND ""
+ TEST_COMMAND ""
+ INSTALL_COMMAND ""
+ BUILD_IN_SOURCE On
+ BUILD_COMMAND ${NPM_PATH} ci
+ COMMAND ${NPM_PATH} run build:embedded
+ )
+ ExternalProject_Get_property(ydb-embedded-ui-git SOURCE_DIR)
+ add_gen_resources(ydb-embedded-ui-git ${CMAKE_BINARY_DIR}/ydb/core/viewer/ydb_embedded_ui_monitoring.cpp
+ IN_DIR ${SOURCE_DIR}/build
+ PREFIX monitoring
+ )
+
+else()
+ add_dir_resources(${CMAKE_BINARY_DIR}/ydb/core/viewer/ydb_embedded_ui_monitoring.cpp
+ IN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/monitoring
+ PREFIX monitoring
+ )
+endif()
+target_sources(ydb-core-viewer.global PRIVATE
+ ${CMAKE_BINARY_DIR}/ydb/core/viewer/ydb_embedded_ui_monitoring.cpp
+)
diff --git a/ydb/core/viewer/recursive_resources.cmake b/ydb/core/viewer/recursive_resources.cmake
new file mode 100644
index 0000000000..6b4c0364fb
--- /dev/null
+++ b/ydb/core/viewer/recursive_resources.cmake
@@ -0,0 +1,64 @@
+if (CMAKE_SCRIPT_MODE_FILE)
+ file(GLOB_RECURSE RES_FILES
+ LIST_DIRECTORIES Off
+ RELATIVE ${IN_DIR}
+ ${IN_DIR}/*
+ )
+ set(RESC_ARGS ${OUT})
+ foreach(res ${RES_FILES})
+ set(RESC_ARGS ${RESC_ARGS} ${IN_DIR}/${res} ${PREFIX}/${res})
+ endforeach()
+ execute_process(
+ COMMAND ${RESCOMPILER_BIN} ${RESC_ARGS}
+ RESULT_VARIABLE RESC_RC
+ )
+ if (NOT RESC_RC EQUAL 0)
+ message(FATAL_ERROR "Failed to compile resources into ${OUT}")
+ endif()
+ return()
+endif()
+
+function(add_gen_resources GenTarget Output)
+ set(opts "")
+ set(oneval_args IN_DIR PREFIX)
+ set(multival_args "")
+ cmake_parse_arguments(RECRES_ARG
+ "${opts}"
+ "${oneval_args}"
+ "${multival_args}"
+ ${ARGN}
+ )
+ add_custom_command(
+ OUTPUT ${Output}
+ COMMAND
+ ${CMAKE_COMMAND} -DRESCOMPILER_BIN=$<TARGET_FILE:rescompiler> -DIN_DIR=${RECRES_ARG_IN_DIR} -DPREFIX=${RECRES_ARG_PREFIX} -DOUT=${Output} -P ${CMAKE_SOURCE_DIR}/ydb/core/viewer/recursive_resources.cmake
+ DEPENDS ${GenTarget}
+ )
+endfunction()
+
+function(add_dir_resources Output)
+ set(opts "")
+ set(oneval_args IN_DIR PREFIX)
+ set(multival_args "")
+ cmake_parse_arguments(RECRES_ARG
+ "${opts}"
+ "${oneval_args}"
+ "${multival_args}"
+ ${ARGN}
+ )
+ file(GLOB_RECURSE RES_FILES
+ LIST_DIRECTORIES Off
+ RELATIVE ${RECRES_ARG_IN_DIR}
+ CONFIGURE_DEPENDS
+ ${RECRES_ARG_IN_DIR}/*
+ )
+ set(RESC_ARGS ${Output})
+ foreach(res ${RES_FILES})
+ set(RESC_ARGS ${RESC_ARGS} ${RECRES_ARG_IN_DIR}/${res} ${RECRES_ARG_PREFIX}/${res})
+ endforeach()
+ add_custom_command(
+ OUTPUT ${Output}
+ COMMAND
+ rescompiler ${RESC_ARGS}
+ )
+endfunction()