CMakeLists.txt 633 字节
Newer Older
H
Hongze Cheng 已提交
1
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.c.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/version.c")
H
refact  
Hongze Cheng 已提交
2
aux_source_directory(src UTIL_SRC)
H
Hongze Cheng 已提交
3
add_library(util STATIC ${UTIL_SRC})
wafwerar's avatar
wafwerar 已提交
4 5 6
if (DEFINED GRANT_CFG_INCLUDE_DIR)
  add_definitions(-DGRANTS_CFG)
endif()
D
Dingle Zhang 已提交
7

H
refact  
Hongze Cheng 已提交
8 9
target_include_directories(
    util
wafwerar's avatar
wafwerar 已提交
10
    PUBLIC "${TD_SOURCE_DIR}/include/util"
S
Shengliang Guan 已提交
11
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
wafwerar's avatar
wafwerar 已提交
12 13
    PRIVATE "${TD_SOURCE_DIR}/include/common"
    PRIVATE "${GRANT_CFG_INCLUDE_DIR}"
H
refact  
Hongze Cheng 已提交
14 15 16
)
target_link_libraries(
    util
wafwerar's avatar
wafwerar 已提交
17
    PUBLIC os
S
Shengliang Guan 已提交
18
    PUBLIC lz4_static
D
Dingle Zhang 已提交
19
    PUBLIC api cjson geos_c
D
dapan1121 已提交
20 21
)

H
refact  
Hongze Cheng 已提交
22 23 24
if(${BUILD_TEST})
    ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})