FFmpeg未找到时,忽略player_opencv用例

This commit is contained in:
ziyue 2022-05-25 16:06:30 +08:00
parent cb0e5c6c57
commit 5f3a46d611

View File

@ -1,6 +1,14 @@
aux_source_directory(. TEST_SRC_LIST) aux_source_directory(. TEST_SRC_LIST)
foreach(TEST_SRC ${TEST_SRC_LIST}) foreach(TEST_SRC ${TEST_SRC_LIST})
STRING(REGEX REPLACE "^\\./|\\.c[a-zA-Z0-9_]*$" "" TEST_EXE_NAME ${TEST_SRC}) STRING(REGEX REPLACE "^\\./|\\.c[a-zA-Z0-9_]*$" "" TEST_EXE_NAME ${TEST_SRC})
if (NOT ENABLE_FFMPEG)
# FFmpeg
if ("${TEST_EXE_NAME}" MATCHES "player_opencv")
continue()
endif ()
endif ()
message(STATUS "add c api tester:${TEST_EXE_NAME}") message(STATUS "add c api tester:${TEST_EXE_NAME}")
set(exe_name api_tester_${TEST_EXE_NAME}) set(exe_name api_tester_${TEST_EXE_NAME})
add_executable(${exe_name} ${TEST_SRC}) add_executable(${exe_name} ${TEST_SRC})