CMakeLists.txt 1.0 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 8 9 10
  SET(SHELL_BUILD_NAME "ts")
  SET(SHELL_FINAL_NAME "taos")
  SET(SHELL_CMD_NAME "taos_cmd")
  SET(SHELL_TARGET_NAME "taos_target")
H
hzcheng 已提交
11

S
slguan 已提交
12 13 14 15 16 17 18 19 20
  INCLUDE_DIRECTORIES(inc ${TD_ROOT_DIR}/src/inc ${TD_ROOT_DIR}/src/client/inc ${TD_OS_DIR}/inc)
  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 已提交
21

S
slguan 已提交
22 23 24 25 26 27 28 29 30 31 32 33
  ADD_DEFINITIONS(-DUSE_LIBICONV)
  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)
  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")
  
ENDIF ()
H
hzcheng 已提交
34