-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
48 lines (41 loc) · 1.49 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
CMAKE_MINIMUM_REQUIRED (VERSION 3.13)
PROJECT (gometa)
# 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
#
# GODEPSPATH - should point to a Go workspace directory containing all
# transitive Go dependencies
#
# FORESTDB_INCLUDE_DIR - should point to where libforestdb/forestdb.h exists
#
# FORESTDB_LIBRARY_DIR - should point to where libforestdb.so resides
#
INCLUDE (FindCouchbaseGo)
INCLUDE (FindCouchbaseCurl)
SET (_deps n1ql-yacc sigar)
IF (TARGET forestdb)
LIST (APPEND _deps forestdb)
ENDIF ()
IF (BUILD_ENTERPRISE)
MESSAGE(STATUS "Building EE edition of Gometa")
ELSE (BUILD_ENTERPRISE)
MESSAGE(STATUS "Building CE edition of Gometa")
SET (TAGS "community")
ENDIF (BUILD_ENTERPRISE)
GET_FILENAME_COMPONENT (CURL_LIBRARY_DIR "${CURL_LIBRARIES}" DIRECTORY)
SET (CGO_INCLUDE_DIRS "${CURL_INCLUDE_DIR};${FORESTDB_INCLUDE_DIR}")
SET (CGO_LIBRARY_DIRS "${CURL_LIBRARY_DIR};${FORESTDB_LIBRARY_DIR}")
GoModBuild (TARGET gometa PACKAGE github.com/couchbase/gometa/cmd/gometa
DEPENDS ${_deps}
CGO_INCLUDE_DIRS "${CGO_INCLUDE_DIRS}"
CGO_LIBRARY_DIRS "${CGO_LIBRARY_DIRS}"
GOVERSION SUPPORTED_NEWER
GOTAGS "${TAGS}"
INSTALL_PATH bin OUTPUT gometa)