CMakeLists.txt 796 字节
Newer Older
1
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
2 3
PROJECT(TDengine)

S
TD-1057  
Shengliang Guan 已提交
4
INCLUDE_DIRECTORIES(inc)
S
TD-1310  
Shengliang Guan 已提交
5 6 7 8
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/query/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/MQTT-C/include)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/MQTT-C/examples/templates)
S
TD-1057  
Shengliang Guan 已提交
9 10 11
AUX_SOURCE_DIRECTORY(src SRC)

IF (TD_LINUX)
12
  ADD_LIBRARY(mqtt ${SRC})
S
TD-1310  
Shengliang Guan 已提交
13
  TARGET_LINK_LIBRARIES(mqtt cJson mqttc)
14

H
Hui Li 已提交
15
  IF (TD_SOMODE_STATIC)
S
TD-1310  
Shengliang Guan 已提交
16
    TARGET_LINK_LIBRARIES(mqtt taos_static)
H
Hui Li 已提交
17
  ELSE ()
S
TD-1310  
Shengliang Guan 已提交
18
    TARGET_LINK_LIBRARIES(mqtt taos)
19 20
  ENDIF ()
ENDIF ()
21 22 23 24 25 26 27 28 29 30 31 32

IF (TD_DARWIN)
  ADD_LIBRARY(mqtt ${SRC})
  TARGET_LINK_LIBRARIES(mqtt cJson mqttc)

  IF (TD_SOMODE_STATIC)
    TARGET_LINK_LIBRARIES(mqtt taos_static)
  ELSE ()
    TARGET_LINK_LIBRARIES(mqtt taos)
  ENDIF ()
ENDIF ()