CMakeLists.txt 1.4 KB
Newer Older
S
Shengliang Guan 已提交
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
H
hzcheng 已提交
2 3
PROJECT(TDengine)

S
slguan 已提交
4
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
5
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/libcurl/include)
S
slguan 已提交
6

S
TD-1057  
Shengliang Guan 已提交
7
IF (TD_LINUX)
S
slguan 已提交
8
  AUX_SOURCE_DIRECTORY(. SRC)
9
  ADD_EXECUTABLE(taosdemo ${SRC})
10

11 12 13 14 15 16 17
  #find_program(HAVE_CURL NAMES curl)
  IF ((NOT TD_ARM_64) AND (NOT TD_ARM_32))
    ADD_DEFINITIONS(-DTD_LOWA_CURL)
    LINK_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/libcurl/lib)
    ADD_LIBRARY(curl STATIC IMPORTED)
    SET_PROPERTY(TARGET curl PROPERTY IMPORTED_LOCATION ${TD_COMMUNITY_DIR}/deps/libcurl/lib/libcurl.a)
    TARGET_LINK_LIBRARIES(taosdemo curl)
H
Hui Li 已提交
18
  ENDIF ()
19 20

  IF (TD_SOMODE_STATIC)
21
    TARGET_LINK_LIBRARIES(taosdemo taos_static cJson)
22
  ELSE ()
23
    TARGET_LINK_LIBRARIES(taosdemo taos cJson)
24
  ENDIF ()
S
slguan 已提交
25
ENDIF ()
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

IF (TD_DARWIN)
  # missing a few dependencies, such as <argp.h>
  # AUX_SOURCE_DIRECTORY(. SRC)
  # ADD_EXECUTABLE(taosdemo ${SRC})
  #
  # #find_program(HAVE_CURL NAMES curl)
  # IF ((NOT TD_ARM_64) AND (NOT TD_ARM_32))
  #   ADD_DEFINITIONS(-DTD_LOWA_CURL)
  #   LINK_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/libcurl/lib)
  #   ADD_LIBRARY(curl STATIC IMPORTED)
  #   SET_PROPERTY(TARGET curl PROPERTY IMPORTED_LOCATION ${TD_COMMUNITY_DIR}/deps/libcurl/lib/libcurl.a)
  #   TARGET_LINK_LIBRARIES(taosdemo curl)
  # ENDIF ()
  #
  # IF (TD_SOMODE_STATIC)
  #   TARGET_LINK_LIBRARIES(taosdemo taos_static cJson)
  # ELSE ()
  #   TARGET_LINK_LIBRARIES(taosdemo taos cJson)
  # ENDIF ()
ENDIF ()