1b92edf93SEben Haber#
2b92edf93SEben Haber# CMakeLists.txt for query-ui
3b92edf93SEben Haber#
4b92edf93SEben Haber# We need to copy the pluggable-ui-query.json to install/etc/couchbase,
5b92edf93SEben Haber# and copy everything else to install/lib/query-ui
6b92edf93SEben Haber# 
7c0173bc7SEben HaberCMAKE_MINIMUM_REQUIRED (VERSION 2.8.10)
8b92edf93SEben Haber
9b92edf93SEben HaberPROJECT (query-ui)
10b92edf93SEben Haber
11b228e33dSEben Haber# installed system now uses relative path, so no prefix
12b92edf93SEben HaberSET (_instdir "${PROJECT_BINARY_DIR}")
13b228e33dSEben HaberSET (BIN_PREFIX "")
14b92edf93SEben Haber
15b92edf93SEben Haber# rewrite the config file for installation
16b92edf93SEben Haberconfigure_file (pluggable-ui-query.json.in pluggable-ui-query.json)
17b92edf93SEben Haber
18b92edf93SEben Haber# copy rewritten config file and code to install directory
19b92edf93SEben Haberinstall(FILES "${_instdir}/pluggable-ui-query.json"
20b92edf93SEben Haber		DESTINATION etc/couchbase)
21b92edf93SEben Haber
22b92edf93SEben Haberinstall(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/query-ui
2369b14c60SEben Haber		DESTINATION lib
2469b14c60SEben Haber		REGEX libs-standalone EXCLUDE
2569b14c60SEben Haber		PATTERN "*standalone.*" EXCLUDE)
2669b14c60SEben Haber
27b92edf93SEben Haber# rewrite the config file for running locally (using cluster-run)
28b228e33dSEben HaberSET (BIN_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/")
2989928f58SEben Haberconfigure_file (pluggable-ui-query.json.in ${_instdir}/../cluster_run_ui_plugins/pluggable-ui-query.cluster_run.json)
30