Commit dae7516c by xiongziliang

完善对FFmpeg的支持

parent c7225dff
...@@ -14,8 +14,10 @@ find_package(PkgConfig QUIET) ...@@ -14,8 +14,10 @@ find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND) if(PKG_CONFIG_FOUND)
pkg_check_modules(AVUTIL QUIET IMPORTED_TARGET libavutil) pkg_check_modules(AVUTIL QUIET IMPORTED_TARGET libavutil)
if(AVUTIL_FOUND) if(AVUTIL_FOUND)
list(APPEND LINK_LIB_LIST PkgConfig::AVUTIL) include_directories(${AVUTIL_INCLUDE_DIR})
message(STATUS "found library:${AVUTIL_LIBRARY}") link_directories(${AVUTIL_LIBRARY_DIRS})
list(APPEND LINK_LIB_LIST ${AVUTIL_LIBRARIES})
message(STATUS "found library:${AVUTIL_LIBRARIES}")
endif() endif()
else() else()
find_package(AVUTIL QUIET) find_package(AVUTIL QUIET)
...@@ -30,8 +32,10 @@ endif() ...@@ -30,8 +32,10 @@ endif()
if(PKG_CONFIG_FOUND) if(PKG_CONFIG_FOUND)
pkg_check_modules(AVCODEC QUIET IMPORTED_TARGET libavcodec) pkg_check_modules(AVCODEC QUIET IMPORTED_TARGET libavcodec)
if(AVCODEC_FOUND) if(AVCODEC_FOUND)
list(APPEND LINK_LIB_LIST PkgConfig::AVCODEC) include_directories(${AVCODEC_INCLUDE_DIR})
message(STATUS "found library:${AVCODEC_LIBRARY}") link_directories(${AVCODEC_LIBRARY_DIRS})
list(APPEND LINK_LIB_LIST ${AVCODEC_LIBRARIES})
message(STATUS "found library:${AVCODEC_LIBRARIES}")
endif() endif()
else() else()
find_package(AVCODEC QUIET) find_package(AVCODEC QUIET)
...@@ -58,7 +62,6 @@ foreach(TEST_SRC ${TEST_SRC_LIST}) ...@@ -58,7 +62,6 @@ foreach(TEST_SRC ${TEST_SRC_LIST})
if(WIN32) if(WIN32)
set_target_properties(${TEST_EXE_NAME} PROPERTIES COMPILE_FLAGS ${VS_FALGS} ) set_target_properties(${TEST_EXE_NAME} PROPERTIES COMPILE_FLAGS ${VS_FALGS} )
endif(WIN32) endif(WIN32)
target_link_libraries(${TEST_EXE_NAME} ${LINK_LIB_LIST}) target_link_libraries(${TEST_EXE_NAME} ${LINK_LIB_LIST})
endforeach() endforeach()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论