Skip to content

Commit

Permalink
MB-48738: depend on pluggable ui js.stamp only if project src dir exists
Browse files Browse the repository at this point in the history
before passing pluggable UI stamps, we should
check if pluggable UI project has been actually
initialized

Change-Id: I3dfe2d617bba58bf67fbf84649145b25186fe2d4
Reviewed-on: https://review.couchbase.org/c/ns_server/+/165860
Tested-by: Pavel Blagodov <stochmail@gmail.com>
Reviewed-by: Pavel Blagodov <stochmail@gmail.com>
  • Loading branch information
pavel-blagodov committed Nov 23, 2021
1 parent 6b7d745 commit bd9b7c8
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions CMakeLists.txt
Expand Up @@ -59,16 +59,20 @@ SET (NS_UI_BIN "${NS_UI_PUB_DIR}/ui")

FILE (MAKE_DIRECTORY "${NS_UI_PUB_DIR}")

SET (_out_js_stamp_depends
"${NS_UI_BUILD_DIR}/fts.js.stamp"
"${NS_UI_BUILD_DIR}/query.js.stamp"
"${NS_UI_STAMP}.js.stamp")
SET (_out_js_stamp_depends "${NS_UI_STAMP}.js.stamp")
FUNCTION (_maybe_add_pluggable_ui_stamp p_ui_dir p_ui_stamp)
IF (EXISTS "${CMAKE_SOURCE_DIR}/${p_ui_dir}")
LIST (APPEND _out_js_stamp_depends "${NS_UI_BUILD_DIR}/${p_ui_stamp}")
ENDIF()
ENDFUNCTION (_maybe_add_pluggable_ui_stamp)

_maybe_add_pluggable_ui_stamp("cbft" "fts.js.stamp")
_maybe_add_pluggable_ui_stamp("query-ui" "query.js.stamp")

IF (BUILD_ENTERPRISE)
LIST (APPEND _out_js_stamp_depends
"${NS_UI_BUILD_DIR}/event.js.stamp"
"${NS_UI_BUILD_DIR}/cbas.js.stamp"
"${NS_UI_BUILD_DIR}/backup.js.stamp")
_maybe_add_pluggable_ui_stamp("goproj/src/github.com/couchbase/eventing" "event.js.stamp")
_maybe_add_pluggable_ui_stamp("cbbs" "backup.js.stamp")
_maybe_add_pluggable_ui_stamp("cbas-ui" "cbas.js.stamp")
ENDIF()

ADD_CUSTOM_COMMAND (OUTPUT "${NS_UI_BUILD_DIR}/out.js.stamp"
Expand Down

0 comments on commit bd9b7c8

Please sign in to comment.