CMakeLists.txt 747 字节
Newer Older
H
Hongze Cheng 已提交
1
aux_source_directory(src TRANSPORT_SRC)
S
monitor  
Shengliang Guan 已提交
2
add_library(transport STATIC ${TRANSPORT_SRC})
H
Hongze Cheng 已提交
3 4 5 6
target_include_directories(
    transport
    PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/transport"
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
S
Shengliang Guan 已提交
7 8 9 10 11 12 13 14
)

target_link_libraries(
    transport
    PUBLIC lz4_static
    PUBLIC os
    PUBLIC util
    PUBLIC common
H
Haojun Liao 已提交
15
    PUBLIC zlibstatic
dengyihao's avatar
dengyihao 已提交
16
)
dengyihao's avatar
dengyihao 已提交
17
if (${BUILD_WITH_UV_TRANS}) 
dengyihao's avatar
dengyihao 已提交
18
if (${BUILD_WITH_UV})
dengyihao's avatar
dengyihao 已提交
19 20 21 22
  target_include_directories(
    transport    
    PUBLIC "${CMAKE_SOURCE_DIR}/contrib/libuv/include"
  )
dengyihao's avatar
dengyihao 已提交
23
  
dengyihao's avatar
dengyihao 已提交
24 25 26 27 28
  target_link_libraries(
    transport    
    PUBLIC uv_a
  )
  add_definitions(-DUSE_UV) 
dengyihao's avatar
dengyihao 已提交
29
endif(${BUILD_WITH_UV})
dengyihao's avatar
dengyihao 已提交
30
endif(${BUILD_WITH_UV_TRANS})  
dengyihao's avatar
dengyihao 已提交
31

dengyihao's avatar
dengyihao 已提交
32 33 34 35 36 37 38
if (${BUILD_TEST})
  add_subdirectory(test)
endif(${BUILD_TEST})




dengyihao's avatar
dengyihao 已提交
39