CMakeLists.txt 1.8 KB
Newer Older
S
slguan 已提交
1 2 3 4
IF (CMAKE_VERSION VERSION_LESS 3.0)
  PROJECT(TDengine CXX)
  SET(PROJECT_VERSION_MAJOR "${LIB_MAJOR_VERSION}")
  SET(PROJECT_VERSION_MINOR "${LIB_MINOR_VERSION}")
5
  SET(PROJECT_VERSION_PATCH "${LIB_PATCH_VERSION}")
S
slguan 已提交
6 7 8 9 10
  SET(PROJECT_VERSION "${LIB_VERSION_STRING}")
ELSE ()
  CMAKE_POLICY(SET CMP0048 NEW)
  PROJECT(TDengine VERSION "${LIB_VERSION_STRING}" LANGUAGES CXX)
ENDIF ()
H
hzcheng 已提交
11

12
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
13
  CMAKE_MINIMUM_REQUIRED(VERSION 3.0...3.20)
14
ELSE ()
15
  CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
16 17
ENDIF ()

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
if(NOT WIN32)
  string(ASCII 27 Esc)
  set(ColourReset "${Esc}[m")
  set(ColourBold  "${Esc}[1m")
  set(Red         "${Esc}[31m")
  set(Green       "${Esc}[32m")
  set(Yellow      "${Esc}[33m")
  set(Blue        "${Esc}[34m")
  set(Magenta     "${Esc}[35m")
  set(Cyan        "${Esc}[36m")
  set(White       "${Esc}[37m")
  set(BoldRed     "${Esc}[1;31m")
  set(BoldGreen   "${Esc}[1;32m")
  set(BoldYellow  "${Esc}[1;33m")
  set(BoldBlue    "${Esc}[1;34m")
  set(BoldMagenta "${Esc}[1;35m")
  set(BoldCyan    "${Esc}[1;36m")
  set(BoldWhite   "${Esc}[1;37m")
endif()

S
[TD-58]  
slguan 已提交
38
SET(TD_ACCOUNT FALSE)
S
slguan 已提交
39
SET(TD_ADMIN FALSE)
S
[TD-61]  
slguan 已提交
40
SET(TD_GRANT FALSE)
wafwerar's avatar
wafwerar 已提交
41
SET(TD_USB_DONGLE FALSE)
S
TD-1207  
Shengliang Guan 已提交
42
SET(TD_MQTT FALSE)
H
TD-1027  
Hongze Cheng 已提交
43
SET(TD_TSDB_PLUGINS FALSE)
S
TD-1767  
Shengliang Guan 已提交
44
SET(TD_STORAGE FALSE)
S
Shengliang Guan 已提交
45
SET(TD_TOPIC FALSE)
S
TD-3246  
Shengliang Guan 已提交
46
SET(TD_MODULE FALSE)
S
slguan 已提交
47

S
[TD-58]  
slguan 已提交
48
SET(TD_COVER FALSE)
S
slguan 已提交
49 50
SET(TD_MEM_CHECK FALSE)

S
[TD-58]  
slguan 已提交
51
SET(TD_PAGMODE_LITE FALSE)
H
Hui Li 已提交
52
SET(TD_SOMODE_STATIC FALSE)
L
[#1054]  
lihui 已提交
53
SET(TD_GODLL FALSE)
S
[TD-58]  
slguan 已提交
54 55 56 57 58 59

SET(TD_COMMUNITY_DIR ${PROJECT_SOURCE_DIR})
MESSAGE(STATUS "Community directory: " ${TD_COMMUNITY_DIR})

INCLUDE(cmake/input.inc)
INCLUDE(cmake/platform.inc)
S
TD-1207  
Shengliang Guan 已提交
60

61
IF (TD_WINDOWS OR TD_DARWIN)
S
TD-1207  
Shengliang Guan 已提交
62 63 64
  SET(TD_SOMODE_STATIC TRUE)
ENDIF ()

S
[TD-58]  
slguan 已提交
65
INCLUDE(cmake/define.inc)
S
Shengliang Guan 已提交
66
INCLUDE(cmake/env.inc)
S
Shengliang Guan 已提交
67
INCLUDE(cmake/version.inc)
S
[TD-58]  
slguan 已提交
68 69
INCLUDE(cmake/install.inc)

S
slguan 已提交
70 71
ADD_SUBDIRECTORY(deps)
ADD_SUBDIRECTORY(src)
72
ADD_SUBDIRECTORY(tests)
H
hzcheng 已提交
73

S
slguan 已提交
74
INCLUDE(CPack)