CMakeLists.txt 568 字节
Newer Older
H
refact  
Hongze Cheng 已提交
1
aux_source_directory(src OS_SRC)
S
monitor  
Shengliang Guan 已提交
2
add_library(os STATIC ${OS_SRC})
H
refact  
Hongze Cheng 已提交
3 4
target_include_directories(
    os
wafwerar's avatar
wafwerar 已提交
5 6 7 8 9
    PUBLIC "${TD_SOURCE_DIR}/include/os"
    PUBLIC "${TD_SOURCE_DIR}/include"
    PUBLIC "${TD_SOURCE_DIR}/include/util"
    PUBLIC "${TD_SOURCE_DIR}/contrib/pthread"
    PUBLIC "${TD_SOURCE_DIR}/contrib/gnuregex"
S
Shengliang Guan 已提交
10
)
wafwerar's avatar
wafwerar 已提交
11 12 13 14 15
# iconv
find_path(IconvApiIncludes iconv.h PATHS)
if(NOT IconvApiIncludes)
    add_definitions(-DDISALLOW_NCHAR_WITHOUT_ICONV) 
endif ()
wafwerar's avatar
wafwerar 已提交
16 17 18
if(USE_TD_MEMORY)
    add_definitions(-DUSE_TD_MEMORY) 
endif ()
S
Shengliang Guan 已提交
19
target_link_libraries(
S
monitor  
Shengliang Guan 已提交
20
    os pthread dl rt m
21
)