1#
2# CMakeLists.txt for query-ui
3#
4# We need to copy the pluggable-ui-query.json to install/etc/couchbase,
5# and copy everything else to install/lib/query-ui
6# 
7CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
8
9PROJECT (query-ui)
10
11# installed system now uses relative path, so no prefix
12SET (_instdir "${PROJECT_BINARY_DIR}")
13SET (BIN_PREFIX "")
14
15# rewrite the config file for installation
16configure_file (pluggable-ui-query.json.in pluggable-ui-query.json)
17
18# copy rewritten config file and code to install directory
19install(FILES "${_instdir}/pluggable-ui-query.json"
20		DESTINATION etc/couchbase)
21
22install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/query-ui
23		DESTINATION lib)
24		
25# rewrite the config file for running locally (using cluster-run)
26SET (BIN_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/")
27configure_file (pluggable-ui-query.json.in ${_instdir}/../cluster_run_ui_plugins/pluggable-ui-query.cluster_run.json)
28
29
30