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

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

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

  IF (TD_SOMODE_STATIC)
11
    TARGET_LINK_LIBRARIES(taosdemo taos_static cJson)
12
  ELSE ()
13
    TARGET_LINK_LIBRARIES(taosdemo taos cJson)
14
  ENDIF ()
15 16 17
ELSEIF (TD_WINDOWS)
  AUX_SOURCE_DIRECTORY(. SRC)
  ADD_EXECUTABLE(taosdemo ${SRC})
18 19
  SET_SOURCE_FILES_PROPERTIES(./taosdemo.c PROPERTIES COMPILE_FLAGS -w)
  IF (TD_SOMODE_STATIC)
20
    TARGET_LINK_LIBRARIES(taosdemo taos_static cJson)
21
  ELSE ()
22
    TARGET_LINK_LIBRARIES(taosdemo taos cJson})
23
  ENDIF ()
24
ELSEIF (TD_DARWIN)
25
  # missing a few dependencies, such as <argp.h>
26 27 28 29 30 31 32 33
  AUX_SOURCE_DIRECTORY(. SRC)
  ADD_EXECUTABLE(taosdemo ${SRC})
  
  IF (TD_SOMODE_STATIC)
    TARGET_LINK_LIBRARIES(taosdemo taos_static cJson)
  ELSE ()
    TARGET_LINK_LIBRARIES(taosdemo taos cJson)
  ENDIF ()
34 35
ENDIF ()