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}/src/query/inc)
S
slguan 已提交
6
INCLUDE_DIRECTORIES(inc)
S
slguan 已提交
7

S
TD-1057  
Shengliang Guan 已提交
8
IF (TD_LINUX)
S
slguan 已提交
9 10
  AUX_SOURCE_DIRECTORY(./src SRC)
  LIST(REMOVE_ITEM SRC ./src/shellWindows.c)
S
slguan 已提交
11
  LIST(REMOVE_ITEM SRC ./src/shellDarwin.c)
12 13
  ADD_EXECUTABLE(shell ${SRC})

H
Hui Li 已提交
14 15 16
  IF (TD_SOMODE_STATIC)
    TARGET_LINK_LIBRARIES(shell taos_static)
  ELSE ()
L
lihui 已提交
17
    TARGET_LINK_LIBRARIES(shell taos)
H
Hui Li 已提交
18
  ENDIF ()
19

S
slguan 已提交
20
  SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos)
S
TD-1037  
Shengliang Guan 已提交
21
ELSEIF (TD_WINDOWS)
S
slguan 已提交
22 23 24
  LIST(APPEND SRC ./src/shellEngine.c)
  LIST(APPEND SRC ./src/shellMain.c)
  LIST(APPEND SRC ./src/shellWindows.c)
S
slguan 已提交
25
  ADD_EXECUTABLE(shell ${SRC})
S
slguan 已提交
26
  TARGET_LINK_LIBRARIES(shell taos_static)
H
Hui Li 已提交
27 28 29

  IF (TD_POWER)
    SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME power)
30
  ELSE ()
H
Hui Li 已提交
31 32
    SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos)
  ENDIF ()
S
TD-1057  
Shengliang Guan 已提交
33
ELSEIF (TD_DARWIN)
S
slguan 已提交
34 35
  LIST(APPEND SRC ./src/shellEngine.c)
  LIST(APPEND SRC ./src/shellMain.c)
S
slguan 已提交
36 37 38
  LIST(APPEND SRC ./src/shellDarwin.c)
  LIST(APPEND SRC ./src/shellCommand.c)
  LIST(APPEND SRC ./src/shellImport.c)
S
Shengliang Guan 已提交
39
  LIST(APPEND SRC ./src/shellCheck.c)
S
slguan 已提交
40
  ADD_EXECUTABLE(shell ${SRC})
41 42 43 44
  # linking with dylib
  TARGET_LINK_LIBRARIES(shell taos)
  # linking taos statically
  # TARGET_LINK_LIBRARIES(shell taos_static)
S
slguan 已提交
45
  SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos)
S
slguan 已提交
46
ENDIF ()
H
hzcheng 已提交
47