mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 15:49:01 +08:00
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
diff --git a/CMakeModules/FindFFMPEG.cmake b/CMakeModules/FindFFMPEG.cmake
|
|
index 4f77e5a..151762f 100644
|
|
--- a/CMakeModules/FindFFMPEG.cmake
|
|
+++ b/CMakeModules/FindFFMPEG.cmake
|
|
@@ -21,6 +21,14 @@ FIND_PATH(
|
|
SWSCALE_INCLUDE_DIR libswscale/swscale.h
|
|
/usr/include /usr/local/include /opt/local/include
|
|
)
|
|
+FIND_PATH(
|
|
+ AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h
|
|
+ /usr/include /usr/local/include /opt/local/include
|
|
+)
|
|
+FIND_PATH(
|
|
+ SWRESAMPLE_INCLUDE_DIR libswresample/swresample.h
|
|
+ /usr/include /usr/local/include /opt/local/include
|
|
+)
|
|
|
|
# Find Library files
|
|
FIND_LIBRARY(
|
|
@@ -43,15 +51,28 @@ FIND_LIBRARY(
|
|
NAMES swscale
|
|
PATH /usr/lib /usr/local/lib /opt/local/lib
|
|
)
|
|
+FIND_LIBRARY(
|
|
+ AVDEVICE_LIBRARY
|
|
+ NAMES avdevice
|
|
+ PATH /usr/lib /usr/local/lib /opt/local/lib
|
|
+)
|
|
+FIND_LIBRARY(
|
|
+ SWRESAMPLE_LIBRARY
|
|
+ NAMES swresample
|
|
+ PATH /usr/lib /usr/local/lib /opt/local/lib
|
|
+)
|
|
|
|
IF( EXISTS "${AVUTIL_INCLUDE_DIR}/libavutil/pixdesc.h" )
|
|
SET( AVUTIL_HAVE_PIXDESC TRUE)
|
|
endif()
|
|
|
|
IF(AVCODEC_INCLUDE_DIR AND AVFORMAT_INCLUDE_DIR AND AVUTIL_INCLUDE_DIR AND SWSCALE_INCLUDE_DIR AND AVCODEC_LIBRARY AND AVFORMAT_LIBRARY AND AVUTIL_LIBRARY AND SWSCALE_LIBRARY AND AVUTIL_HAVE_PIXDESC)
|
|
+ IF (WIN32)
|
|
+ SET(AVFORMAT_LIBRARY ${AVFORMAT_LIBRARY} Ws2_32 Secur32 Bcrypt strmiids mfplat mfuuid)
|
|
+ ENDIF()
|
|
SET(FFMPEG_FOUND TRUE)
|
|
- SET(FFMPEG_LIBRARIES ${AVCODEC_LIBRARY} ${AVFORMAT_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY})
|
|
- SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
|
|
+ SET(FFMPEG_LIBRARIES ${AVFORMAT_LIBRARY} ${AVDEVICE_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY} ${SWRESAMPLE_LIBRARY})
|
|
+ SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWRESAMPLE_INCLUDE_DIR})
|
|
|
|
include(CheckCXXSourceCompiles)
|
|
|