CMakeLists.txt 1.3 KB
Newer Older
H
refact  
Hongze Cheng 已提交
1
aux_source_directory(src CLIENT_SRC)
2

3 4 5 6
if(TD_WINDOWS)
    add_library(taos SHARED ${CLIENT_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/src/taos.rc.in)
else()
    add_library(taos SHARED ${CLIENT_SRC})
7 8 9 10
endif()

INCLUDE_DIRECTORIES(jni)

H
refact  
Hongze Cheng 已提交
11 12
target_include_directories(
    taos
wafwerar's avatar
wafwerar 已提交
13
    PUBLIC "${TD_SOURCE_DIR}/include/client"
H
Haojun Liao 已提交
14
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
H
refact  
Hongze Cheng 已提交
15 16 17 18
)
target_link_libraries(
    taos
    INTERFACE api
19
    PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom
S
Shengliang Guan 已提交
20
)
21

22
if(TD_WINDOWS)
23 24 25
    set_target_properties(taos
        PROPERTIES
        LINK_FLAGS
26 27
        /DEF:${CMAKE_CURRENT_SOURCE_DIR}/src/taos.def
    )
H
huolibo 已提交
28
    INCLUDE_DIRECTORIES(jni/windows)
H
huolibo 已提交
29 30
    INCLUDE_DIRECTORIES(jni/windows/win32)
    INCLUDE_DIRECTORIES(jni/windows/win32/bridge)
H
huolibo 已提交
31 32
else()
    INCLUDE_DIRECTORIES(jni/linux)
33
endif()
34

wafwerar's avatar
wafwerar 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
set_target_properties(
    taos
    PROPERTIES
    VERSION ${TD_VER_NUMBER}
    SOVERSION ${TD_VER_NUMBER}
)

add_library(taos_static STATIC ${CLIENT_SRC})
target_include_directories(
    taos_static
    PUBLIC "${TD_SOURCE_DIR}/include/client"
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)
target_link_libraries(
    taos_static
    INTERFACE api
    PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom
)

H
refact  
Hongze Cheng 已提交
54 55 56
if(${BUILD_TEST})
    ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})