CMakeLists.txt 1.2 KB
Newer Older
H
hzcheng 已提交
1 2
PROJECT(TDengine)

3
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
4
  CMAKE_MINIMUM_REQUIRED(VERSION 3.0...3.20)
5
ELSE ()
6
  CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
7 8
ENDIF ()

H
hzcheng 已提交
9
ADD_SUBDIRECTORY(zlib-1.2.11)
S
slguan 已提交
10 11 12
ADD_SUBDIRECTORY(pthread)
ADD_SUBDIRECTORY(regex)
ADD_SUBDIRECTORY(iconv)
S
slguan 已提交
13 14
ADD_SUBDIRECTORY(lz4)
ADD_SUBDIRECTORY(cJson)
S
TD-1057  
Shengliang Guan 已提交
15
ADD_SUBDIRECTORY(wepoll)
S
Shengliang Guan 已提交
16
ADD_SUBDIRECTORY(MsvcLibX)
17
ADD_SUBDIRECTORY(rmonotonic)
18 19 20 21

IF (TD_BUILD_LUA)
  ADD_SUBDIRECTORY(lua)
ENDIF ()
22

S
TD-1310  
Shengliang Guan 已提交
23
IF (TD_LINUX AND TD_MQTT)
S
slguan 已提交
24
  ADD_SUBDIRECTORY(MQTT-C)
25 26 27 28 29
ENDIF ()

IF (TD_DARWIN AND TD_MQTT)
  ADD_SUBDIRECTORY(MQTT-C)
ENDIF ()
30 31

IF (TD_LINUX_64 AND JEMALLOC_ENABLED)
32 33 34
  MESSAGE("")
  MESSAGE("${Green} ENABLE jemalloc ${ColourReset}")
  MESSAGE("")
35
  MESSAGE("setup deps/jemalloc, current source dir:" ${CMAKE_CURRENT_SOURCE_DIR})
36
  MESSAGE("binary dir:" ${CMAKE_BINARY_DIR})
37
  include(ExternalProject)
38 39 40 41 42 43 44
  ExternalProject_Add(jemalloc
    PREFIX        "jemalloc"
    SOURCE_DIR    ${CMAKE_CURRENT_SOURCE_DIR}/jemalloc
    BUILD_IN_SOURCE     1
    CONFIGURE_COMMAND   ./autogen.sh COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}/build/
    BUILD_COMMAND       ${MAKE}
  )
45
  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/build/include)
46
ENDIF ()
T
tickduan 已提交
47

48
IF (NOT "${TSZ_ENABLED}" MATCHES "false")
49 50
  ADD_SUBDIRECTORY(TSZ)
ENDIF()