CMakeLists.txt 583 字节
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 5
target_include_directories(
    os
    PUBLIC "${CMAKE_SOURCE_DIR}/include/os"
6 7
    PUBLIC "${CMAKE_SOURCE_DIR}/include"
    PUBLIC "${CMAKE_SOURCE_DIR}/include/util"
wafwerar's avatar
wafwerar 已提交
8
    PUBLIC "${CMAKE_SOURCE_DIR}/contrib/pthread"
9
    PUBLIC "${CMAKE_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
)