CMakeLists.txt 1.2 KB
Newer Older
H
Hongze Cheng 已提交
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
H
hzcheng 已提交
2 3 4

PROJECT(TDengine)

S
slguan 已提交
5
IF (TD_LINUX)
H
hzcheng 已提交
6

S
slguan 已提交
7
  INCLUDE_DIRECTORIES(inc ${TD_ROOT_DIR}/src/inc ${TD_ROOT_DIR}/src/client/inc ${TD_OS_DIR}/inc)
S
slguan 已提交
8

S
slguan 已提交
9 10 11 12 13 14 15 16
  AUX_SOURCE_DIRECTORY(./src SRC)
  LIST(REMOVE_ITEM SRC ./src/shellWindows.c)
  
  ADD_EXECUTABLE(shell ${SRC})  
  TARGET_LINK_LIBRARIES(shell taos_static)
  SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME "taos")
  
ELSEIF (TD_WINDOWS)
H
hzcheng 已提交
17

S
slguan 已提交
18 19 20
  INCLUDE_DIRECTORIES(${TD_ROOT_DIR}/deps/pthread)
  INCLUDE_DIRECTORIES(${TD_ROOT_DIR}/deps/regex)
  INCLUDE_DIRECTORIES(inc ${TD_ROOT_DIR}/src/inc ${TD_ROOT_DIR}/src/client/inc ${TD_OS_DIR}/inc)
S
slguan 已提交
21

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 26

  ADD_EXECUTABLE(shell ${SRC})
S
slguan 已提交
27 28
  TARGET_LINK_LIBRARIES(shell taos_static)
  SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME "taos")
S
slguan 已提交
29 30 31 32 33 34 35 36 37 38 39 40 41

ELSEIF (TD_DARWIN)

  INCLUDE_DIRECTORIES(inc ${TD_ROOT_DIR}/src/inc ${TD_ROOT_DIR}/src/client/inc ${TD_OS_DIR}/inc)

  LIST(APPEND SRC ./src/shellEngine.c)
  LIST(APPEND SRC ./src/shellMain.c)
  LIST(APPEND SRC ./src/shellWindows.c)

  ADD_EXECUTABLE(shell ${SRC})
  TARGET_LINK_LIBRARIES(shell taos_static)
  SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME "taos")

S
slguan 已提交
42
ENDIF ()
H
hzcheng 已提交
43