forked from couchbase/query
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (48 loc) · 1.87 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
PROJECT (query NONE)
# This project is intended to be built as part of a Couchbase Server build,
# but for nominal support building stand-alone, the following variables
# need to be specified:
#
# CMAKE_MODULE_PATH - should contain a directory containing
# FindCouchbaseGo.cmake, eg. tlm/cmake/Modules
#
# CMAKE_INSTALL_PREFIX - should point to a directory where the bin/ output
# directory will be placed
#
# GODEPSDIR - should point to a Go workspace directory containing all
# transitive Go dependencies
#
# In addition, projects that only require the end-user cbq utility may set
# CBQ_ONLY to enable only that target.
INCLUDE (FindCouchbaseGo)
IF (BUILD_ENTERPRISE)
SET (_gotags "enterprise")
ELSE (BUILD_ENTERPRISE)
SET (_gotags "community")
ENDIF(BUILD_ENTERPRISE)
SET (GOVERSION 1.11.4)
IF (APPLE)
IF (${GOVERSION} VERSION_LESS ${GO_MAC_MINIMUM_VERSION})
SET (GOVERSION ${GO_MAC_MINIMUM_VERSION})
ENDIF ()
ENDIF()
IF (NOT CBQ_ONLY)
GoYacc (GOVERSION 1.7.6 TARGET n1ql-yacc YFILE "${PROJECT_SOURCE_DIR}/parser/n1ql/n1ql.y")
GET_FILENAME_COMPONENT (CURL_LIBRARY_DIR "${CURL_LIBRARIES}" DIRECTORY)
GoInstall (TARGET cbq-engine PACKAGE github.com/couchbase/query/server/cbq-engine
GOPATH "${PROJECT_SOURCE_DIR}/../../../.." "${GODEPSDIR}"
DEPENDS n1ql-yacc INSTALL_PATH bin
CGO_INCLUDE_DIRS "${CURL_INCLUDE_DIR}"
CGO_LIBRARY_DIRS "${CURL_LIBRARY_DIR}"
GOVERSION ${GOVERSION}
GOTAGS ${_gotags})
GoInstall (TARGET cbq.old PACKAGE github.com/couchbase/query/shell/cbq.old
GOPATH "${PROJECT_SOURCE_DIR}/../../../.." "${GODEPSDIR}"
DEPENDS n1ql-yacc cbq-engine INSTALL_PATH bin
GOVERSION ${GOVERSION})
ENDIF (NOT CBQ_ONLY)
GoInstall (TARGET cbq PACKAGE github.com/couchbase/query/shell/cbq
GOPATH "${PROJECT_SOURCE_DIR}/../../../.." "${GODEPSDIR}"
INSTALL_PATH bin
GOVERSION ${GOVERSION})