CMakeLists.txt 2.5 KB
Newer Older
1
aux_source_directory(src FUNCTION_SRC)
2
list(REMOVE_ITEM FUNCTION_SRC src/udfd.c)
S
monitor  
Shengliang Guan 已提交
3
add_library(function STATIC ${FUNCTION_SRC})
4 5
target_include_directories(
    function
S
shenglian zhou 已提交
6
    PUBLIC
wafwerar's avatar
wafwerar 已提交
7
        "${TD_SOURCE_DIR}/include/libs/function"
8 9 10
        "${TD_SOURCE_DIR}/include/util"
        "${TD_SOURCE_DIR}/include/common"
        "${TD_SOURCE_DIR}/include/client"
wafwerar's avatar
wafwerar 已提交
11
        "${TD_SOURCE_DIR}/contrib/libuv/include"
12 13 14 15
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)

target_link_libraries(
16
    function
17
    PRIVATE os util common nodes scalar catalog qcom transport
S
shenglian zhou 已提交
18
    PUBLIC uv_a
19
)
20

S
shenglian zhou 已提交
21 22 23
add_executable(runUdf test/runUdf.c)
target_include_directories(
        runUdf
S
shenglian zhou 已提交
24
        PUBLIC
wafwerar's avatar
wafwerar 已提交
25 26
            "${TD_SOURCE_DIR}/include/libs/function"
            "${TD_SOURCE_DIR}/contrib/libuv/include"
27 28 29
            "${TD_SOURCE_DIR}/include/util"
            "${TD_SOURCE_DIR}/include/common"
            "${TD_SOURCE_DIR}/include/client"
wafwerar's avatar
wafwerar 已提交
30
            "${TD_SOURCE_DIR}/include/os"
S
shenglian zhou 已提交
31 32 33 34
        PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)
target_link_libraries(
        runUdf
S
shenglian zhou 已提交
35
        PUBLIC uv_a
S
shenglian zhou 已提交
36 37 38
        PRIVATE os util common nodes function
)

wafwerar's avatar
wafwerar 已提交
39
add_library(udf1 STATIC MODULE test/udf1.c)
S
shenglian zhou 已提交
40 41
target_include_directories(
        udf1
S
shenglian zhou 已提交
42
        PUBLIC
wafwerar's avatar
wafwerar 已提交
43
            "${TD_SOURCE_DIR}/include/libs/function"
S
shenglian zhou 已提交
44
            "${TD_SOURCE_DIR}/include/util"
45 46
            "${TD_SOURCE_DIR}/include/common"
            "${TD_SOURCE_DIR}/include/client"
wafwerar's avatar
wafwerar 已提交
47
            "${TD_SOURCE_DIR}/include/os"
S
shenglian zhou 已提交
48 49
        PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)
wafwerar's avatar
wafwerar 已提交
50
target_link_libraries(
S
shenglian zhou 已提交
51
    udf1 PUBLIC os)
S
shenglian zhou 已提交
52

wafwerar's avatar
wafwerar 已提交
53
add_library(udf2 STATIC MODULE test/udf2.c)
S
slzhou 已提交
54
target_include_directories(
55
        udf2
S
slzhou 已提交
56 57 58 59 60 61 62 63 64 65 66 67
        PUBLIC
            "${TD_SOURCE_DIR}/include/libs/function"
            "${TD_SOURCE_DIR}/include/util"
            "${TD_SOURCE_DIR}/include/common"
            "${TD_SOURCE_DIR}/include/client"
            "${TD_SOURCE_DIR}/include/os"
        PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)
target_link_libraries(
    udf2 PUBLIC os
)

S
shenglian zhou 已提交
68
#SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/bin)
69 70 71
add_executable(udfd src/udfd.c)
target_include_directories(
        udfd
S
shenglian zhou 已提交
72
        PUBLIC
wafwerar's avatar
wafwerar 已提交
73 74
            "${TD_SOURCE_DIR}/include/libs/function"
            "${TD_SOURCE_DIR}/contrib/libuv/include"
75 76
            "${TD_SOURCE_DIR}/include/util"
            "${TD_SOURCE_DIR}/include/common"
77
            "${TD_SOURCE_DIR}/include/libs/transport"
78
            "${TD_SOURCE_DIR}/include/client"
79 80 81 82 83
        PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)

target_link_libraries(
        udfd
S
shenglian zhou 已提交
84
        PUBLIC uv_a
85
        PRIVATE os util common nodes function
S
shenglian zhou 已提交
86 87
)