From 2ae9d7c2ef0322346eea71876c79dda0019c988f Mon Sep 17 00:00:00 2001 From: doodoocoder <316422663@qq.com> Date: Thu, 10 Sep 2020 13:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E7=94=A8pkg-config=E6=89=BEavcodec?= =?UTF-8?q?=E4=B8=8Eavutil=E6=97=B6=EF=BC=8C=E5=BA=94=E8=AF=A5=E5=B0=B1AVC?= =?UTF-8?q?ODEC=5FINCLUDE=5FDIRS,AVUTIL=5FINCLUDE=5FDIRS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当用pkg-config找avcodec与avutil时,应该就AVCODEC_INCLUDE_DIRS,AVUTIL_INCLUDE_DIRS而不是AVCODEC_INCLUDE_DIR,AVUTIL_INCLUDE_DIR --- tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5e9b53ac..64ec28a1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(AVUTIL QUIET IMPORTED_TARGET libavutil) if(AVUTIL_FOUND) - include_directories(${AVUTIL_INCLUDE_DIR}) + include_directories(${AVUTIL_INCLUDE_DIRS}) link_directories(${AVUTIL_LIBRARY_DIRS}) list(APPEND LINK_LIB_LIST ${AVUTIL_LIBRARIES}) message(STATUS "found library:${AVUTIL_LIBRARIES}") @@ -32,7 +32,7 @@ endif() if(PKG_CONFIG_FOUND) pkg_check_modules(AVCODEC QUIET IMPORTED_TARGET libavcodec) if(AVCODEC_FOUND) - include_directories(${AVCODEC_INCLUDE_DIR}) + include_directories(${AVCODEC_INCLUDE_DIRS}) link_directories(${AVCODEC_LIBRARY_DIRS}) list(APPEND LINK_LIB_LIST ${AVCODEC_LIBRARIES}) message(STATUS "found library:${AVCODEC_LIBRARIES}")