10b143fb7SEben Haber#
20b143fb7SEben Haber# CMakeLists.txt for cbas-ui
30b143fb7SEben Haber#
40b143fb7SEben Haber# We need to copy the pluggable-ui-cbas.json to install/etc/couchbase,
50b143fb7SEben Haber# and copy everything else to install/lib/cbas-ui
60b143fb7SEben Haber# 
70b143fb7SEben HaberCMAKE_MINIMUM_REQUIRED (VERSION 2.8.10)
80b143fb7SEben Haber
90b143fb7SEben HaberPROJECT (cbas-ui)
100b143fb7SEben Haber
110b143fb7SEben Haber# installed system now uses relative path, so no prefix
120b143fb7SEben HaberSET (_instdir "${PROJECT_BINARY_DIR}")
130b143fb7SEben HaberSET (BIN_PREFIX "")
140b143fb7SEben Haber
150b143fb7SEben Haber# rewrite the config file for installation
160b143fb7SEben Haberconfigure_file (pluggable-ui-cbas.json.in pluggable-ui-cbas.json)
170b143fb7SEben Haber
180b143fb7SEben Haber# copy rewritten config file and code to install directory
190b143fb7SEben Haberinstall(FILES "${_instdir}/pluggable-ui-cbas.json"
200b143fb7SEben Haber		DESTINATION etc/couchbase)
210b143fb7SEben Haber
220b143fb7SEben Haberinstall(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cbas-ui
230b143fb7SEben Haber		DESTINATION lib
240b143fb7SEben Haber		REGEX libs-standalone EXCLUDE
250b143fb7SEben Haber		PATTERN "*standalone.*" EXCLUDE)
260b143fb7SEben Haber
270b143fb7SEben Haber# rewrite the config file for running locally (using cluster-run)
280b143fb7SEben HaberSET (BIN_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/")
290b143fb7SEben Haberconfigure_file (pluggable-ui-cbas.json.in ${_instdir}/../cluster_run_ui_plugins/pluggable-ui-cbas.cluster_run.json)
30