CMakeLists.txt 2.0 KB
Newer Older
1 2 3
PROJECT(TDengine)

IF (TD_LINUX)
wafwerar's avatar
wafwerar 已提交
4
  INCLUDE_DIRECTORIES(. ${TD_SOURCE_DIR}/src/inc ${TD_SOURCE_DIR}/src/client/inc  ${TD_SOURCE_DIR}/inc)
5
  AUX_SOURCE_DIRECTORY(. SRC)
6 7 8 9 10 11 12 13
  #  ADD_EXECUTABLE(demo apitest.c)
  #TARGET_LINK_LIBRARIES(demo taos_static trpc tutil pthread )
  #ADD_EXECUTABLE(sml schemaless.c)
  #TARGET_LINK_LIBRARIES(sml taos_static trpc tutil pthread )
  #ADD_EXECUTABLE(subscribe subscribe.c)
  #TARGET_LINK_LIBRARIES(subscribe taos_static trpc tutil pthread )
  #ADD_EXECUTABLE(epoll epoll.c)
  #TARGET_LINK_LIBRARIES(epoll taos_static trpc tutil pthread lua)
14 15

  add_executable(tmq "")
L
Liu Jicong 已提交
16
  add_executable(stream_demo "")
17 18 19 20 21 22 23
  add_executable(demoapi "")

  target_sources(tmq
      PRIVATE
      "tmq.c"
      )

L
Liu Jicong 已提交
24
  target_sources(stream_demo
25
      PRIVATE
L
Liu Jicong 已提交
26
      "stream_demo.c"
27 28 29 30 31 32 33 34 35 36 37
      )

  target_sources(demoapi
      PRIVATE
      "demoapi.c"
      )

  target_link_libraries(tmq
      taos_static
      )

L
Liu Jicong 已提交
38
  target_link_libraries(stream_demo
39 40 41 42 43 44 45 46 47 48 49 50
      taos_static
      )

  target_link_libraries(demoapi
      taos_static
      )

  target_include_directories(tmq
      PUBLIC "${TD_SOURCE_DIR}/include/os"
      PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
      )

L
Liu Jicong 已提交
51
  target_include_directories(stream_demo
52 53 54 55 56 57 58 59 60 61
      PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
      )

  target_include_directories(demoapi
      PUBLIC "${TD_SOURCE_DIR}/include/client"
      PUBLIC "${TD_SOURCE_DIR}/include/os"
      PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
      )

  SET_TARGET_PROPERTIES(tmq PROPERTIES OUTPUT_NAME tmq)
L
Liu Jicong 已提交
62
  SET_TARGET_PROPERTIES(stream_demo PROPERTIES OUTPUT_NAME stream_demo)
63
  SET_TARGET_PROPERTIES(demoapi PROPERTIES OUTPUT_NAME demoapi)
64 65
ENDIF ()
IF (TD_DARWIN)
wafwerar's avatar
wafwerar 已提交
66
  INCLUDE_DIRECTORIES(. ${TD_SOURCE_DIR}/src/inc ${TD_SOURCE_DIR}/src/client/inc  ${TD_SOURCE_DIR}/inc)
67
  AUX_SOURCE_DIRECTORY(. SRC)
68 69 70 71
  #ADD_EXECUTABLE(demo demo.c)
  #TARGET_LINK_LIBRARIES(demo taos_static trpc tutil pthread lua)
  #ADD_EXECUTABLE(epoll epoll.c)
  #TARGET_LINK_LIBRARIES(epoll taos_static trpc tutil pthread lua)
72
ENDIF ()