CMakeLists.txt 804 字节
Newer Older
1
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
PROJECT(TDengine)

INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/libcurl/include)

IF (TD_LINUX)         
  AUX_SOURCE_DIRECTORY(. SRC)
  ADD_EXECUTABLE(taosdemox ${SRC})
  
  #find_program(HAVE_CURL NAMES curl)   
  IF ((NOT TD_ARM_64) AND (NOT TD_ARM_32))    
    ADD_DEFINITIONS(-DTD_LOWA_CURL)
    LINK_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/libcurl/lib)
    ADD_LIBRARY(curl STATIC IMPORTED)
    SET_PROPERTY(TARGET curl PROPERTY IMPORTED_LOCATION ${TD_COMMUNITY_DIR}/deps/libcurl/lib/libcurl.a)
    TARGET_LINK_LIBRARIES(taosdemox curl) 
  ENDIF ()
  
  IF (TD_SOMODE_STATIC)
    TARGET_LINK_LIBRARIES(taosdemox taos_static cJson)
  ELSE ()
    TARGET_LINK_LIBRARIES(taosdemox taos cJson)
  ENDIF ()
ENDIF ()