CMakeLists.txt 725 字节
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
dengyihao's avatar
dengyihao 已提交
15
)
dengyihao's avatar
dengyihao 已提交
16
if (${BUILD_WITH_UV_TRANS}) 
dengyihao's avatar
dengyihao 已提交
17
if (${BUILD_WITH_UV})
dengyihao's avatar
dengyihao 已提交
18 19 20 21
  target_include_directories(
    transport    
    PUBLIC "${CMAKE_SOURCE_DIR}/contrib/libuv/include"
  )
dengyihao's avatar
dengyihao 已提交
22
  
dengyihao's avatar
dengyihao 已提交
23 24 25 26 27
  target_link_libraries(
    transport    
    PUBLIC uv_a
  )
  add_definitions(-DUSE_UV) 
dengyihao's avatar
dengyihao 已提交
28
endif(${BUILD_WITH_UV})
dengyihao's avatar
dengyihao 已提交
29
endif(${BUILD_WITH_UV_TRANS})  
dengyihao's avatar
dengyihao 已提交
30

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




dengyihao's avatar
dengyihao 已提交
38