CMakeLists.txt 1.4 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

wafwerar's avatar
wafwerar 已提交
22 23 24 25 26 27 28
if(TD_DARWIN_ARM64)
    target_link_libraries(
        taos
        PRIVATE  "-arch x86_64"
    )
endif()

29
if(TD_WINDOWS)
H
huolibo 已提交
30
    INCLUDE_DIRECTORIES(jni/windows)
H
huolibo 已提交
31 32
    INCLUDE_DIRECTORIES(jni/windows/win32)
    INCLUDE_DIRECTORIES(jni/windows/win32/bridge)
H
huolibo 已提交
33 34
else()
    INCLUDE_DIRECTORIES(jni/linux)
35
endif()
36

wafwerar's avatar
wafwerar 已提交
37 38 39 40 41 42 43
set_target_properties(
    taos
    PROPERTIES
    CLEAN_DIRECT_OUTPUT
    1
)

wafwerar's avatar
wafwerar 已提交
44 45 46 47
set_target_properties(
    taos
    PROPERTIES
    VERSION ${TD_VER_NUMBER}
wafwerar's avatar
wafwerar 已提交
48
    SOVERSION 1
wafwerar's avatar
wafwerar 已提交
49 50 51 52 53 54 55 56 57 58 59 60 61 62
)

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 已提交
63 64 65
if(${BUILD_TEST})
    ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})