diff --git a/api/tests/CMakeLists.txt b/api/tests/CMakeLists.txt index eeec6129..e3ecd64b 100644 --- a/api/tests/CMakeLists.txt +++ b/api/tests/CMakeLists.txt @@ -1,6 +1,14 @@ aux_source_directory(. TEST_SRC_LIST) foreach(TEST_SRC ${TEST_SRC_LIST}) 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}") set(exe_name api_tester_${TEST_EXE_NAME}) add_executable(${exe_name} ${TEST_SRC})