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)
H
huolibo 已提交
23
    INCLUDE_DIRECTORIES(jni/windows)
H
huolibo 已提交
24 25
    INCLUDE_DIRECTORIES(jni/windows/win32)
    INCLUDE_DIRECTORIES(jni/windows/win32/bridge)
H
huolibo 已提交
26 27
else()
    INCLUDE_DIRECTORIES(jni/linux)
28
endif()
29

wafwerar's avatar
wafwerar 已提交
30 31 32 33 34 35 36
set_target_properties(
    taos
    PROPERTIES
    CLEAN_DIRECT_OUTPUT
    1
)

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

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 已提交
56 57 58
if(${BUILD_TEST})
    ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})