减少依赖影响范围 (#4039)

See #4034
This commit is contained in:
Xiaofeng Wang
2024-11-25 11:22:29 +08:00
committed by GitHub
parent 326b475beb
commit 06ff8461c7
2 changed files with 7 additions and 9 deletions

View File

@@ -23,6 +23,8 @@
aux_source_directory(. TEST_SRC_LIST)
find_package(PCAP QUIET)
foreach(TEST_SRC ${TEST_SRC_LIST})
get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE)
@@ -59,3 +61,8 @@ foreach(TEST_SRC ${TEST_SRC_LIST})
target_link_libraries(${TEST_EXE_NAME} ${MK_LINK_LIBRARIES})
endif()
endforeach()
if(TARGET test_rtp_pcap)
target_include_directories(test_rtp_pcap SYSTEM PRIVATE ${PCAP_INCLUDE_DIRS})
target_link_libraries(test_rtp_pcap ${PCAP_LIBRARIES})
endif()