cmake: 检查 target 来确认功能是否已启用

This commit is contained in:
Xiaofeng Wang 2022-07-25 13:52:20 +08:00
parent 9d3ead61de
commit d850846612

View File

@ -27,7 +27,7 @@ aux_source_directory(. TEST_SRC_LIST)
foreach(TEST_SRC ${TEST_SRC_LIST})
get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE)
if(NOT ENABLE_WEBRTC)
if(NOT TARGET ZLMediaKit::WebRTC)
# WebRTC
if("${TEST_EXE_NAME}" MATCHES "test_rtcp_nack")
continue()