CMakeLists.txt 712 字节
Newer Older
S
Shengliang Guan 已提交
1 2 3
aux_source_directory(src SHELL_SRC)

add_executable(shell ${SHELL_SRC})
4 5 6 7 8 9 10 11 12

IF (TD_LINUX AND TD_WEBSOCKET)
    ADD_DEFINITIONS(-DWEBSOCKET -I${CMAKE_BINARY_DIR}/build/include -ltaosws)
    SET(LINK_WEBSOCKET "-L${CMAKE_BINARY_DIR}/build/lib -ltaosws")
    ADD_DEPENDENCIES(shell taosws-rs)
ELSE ()
    SET(LINK_WEBSOCKET "")
ENDIF ()

wafwerar's avatar
wafwerar 已提交
13
if(TD_WINDOWS)
14
    target_link_libraries(shell PUBLIC taos_static ${LINK_WEBSOCKET})
wafwerar's avatar
wafwerar 已提交
15
else()
16
    target_link_libraries(shell PUBLIC taos ${LINK_WEBSOCKET})
wafwerar's avatar
wafwerar 已提交
17
endif ()
S
Shengliang Guan 已提交
18 19
target_link_libraries(
    shell
20
    PRIVATE os common transport util
S
Shengliang Guan 已提交
21
)
S
Shengliang Guan 已提交
22 23 24 25
target_include_directories(
    shell
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)
S
Shengliang Guan 已提交
26 27

SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos)