Change in the FFmpeg cmake file
This commit is contained in:
1 parent
95c72d10e3
commit
13e000e103
1 file changed
+19
-32
+19
-32
@@ -13,40 +13,27 @@ SET( FFMPEG_PATH_SUFFIXES libavformat libavcodec libavutil libavdevice libffmpeg
|
||||
SET( FFMPEG_SWS_HEADERS swscale.h )
|
||||
SET( FFMPEG_SWS_PATH_SUFFIXES libswscale )
|
||||
|
||||
if( WIN32 )
|
||||
SET( FFMPEG_LIBRARIES avformat-52.lib avcodec-51.lib avutil-49.lib avdevice-52.lib )
|
||||
SET( FFMPEG_SWS_LIBRARIES swscale-0.lib )
|
||||
SET( FFMPEG_LIBRARY_DIR $ENV{FFMPEGDIR}\\lib )
|
||||
SET( FFMPEG_INCLUDE_PATHS $ENV{FFMPEGDIR}\\include )
|
||||
|
||||
# check to see if we can find swscale
|
||||
SET( TMP_ TMP-NOTFOUND )
|
||||
FIND_PATH( TMP_ ${FFMPEG_SWS_LIBRARIES}
|
||||
PATHS ${FFMPEG_LIBRARY_DIR} )
|
||||
IF ( TMP_ )
|
||||
SET( SWSCALE_FOUND TRUE )
|
||||
ENDIF( TMP_ )
|
||||
else( WIN32 )
|
||||
SET( FFMPEG_LIBRARIES avformat avcodec avutil avdevice )
|
||||
SET( FFMPEG_SWS_LIBRARIES swscale )
|
||||
INCLUDE(FindPkgConfig)
|
||||
if ( PKG_CONFIG_FOUND )
|
||||
pkg_check_modules( AVFORMAT libavformat )
|
||||
pkg_check_modules( AVCODEC libavcodec )
|
||||
pkg_check_modules( AVUTIL libavutil )
|
||||
pkg_check_modules( AVDEVICE libavdevice )
|
||||
pkg_check_modules( SWSCALE libswscale )
|
||||
endif ( PKG_CONFIG_FOUND )
|
||||
SET( FFMPEG_LIBRARIES avformat avcodec avutil avdevice )
|
||||
SET( FFMPEG_SWS_LIBRARIES swscale )
|
||||
INCLUDE(FindPkgConfig)
|
||||
if ( PKG_CONFIG_FOUND )
|
||||
pkg_check_modules( AVFORMAT libavformat )
|
||||
pkg_check_modules( AVCODEC libavcodec )
|
||||
pkg_check_modules( AVUTIL libavutil )
|
||||
pkg_check_modules( AVDEVICE libavdevice )
|
||||
pkg_check_modules( SWSCALE libswscale )
|
||||
endif ( PKG_CONFIG_FOUND )
|
||||
|
||||
SET( FFMPEG_LIBRARY_DIR ${AVFORMAT_LIBRARY_DIRS}
|
||||
${AVCODEC_LIBRARY_DIRS}
|
||||
${AVUTIL_LIBRARY_DIRS}
|
||||
${AVDEVICE_LIBRARY_DIRS} )
|
||||
SET( FFMPEG_INCLUDE_PATHS ${AVFORMAT_INCLUDE_DIRS}
|
||||
${AVCODEC_INCLUDE_DIRS}
|
||||
${AVUTIL_INCLUDE_DIRS}
|
||||
${AVDEVICE_INCLUDE_DIRS} )
|
||||
|
||||
SET( FFMPEG_LIBRARY_DIR ${AVFORMAT_LIBRARY_DIRS}
|
||||
${AVCODEC_LIBRARY_DIRS}
|
||||
${AVUTIL_LIBRARY_DIRS}
|
||||
${AVDEVICE_LIBRARY_DIRS} )
|
||||
SET( FFMPEG_INCLUDE_PATHS ${AVFORMAT_INCLUDE_DIRS}
|
||||
${AVCODEC_INCLUDE_DIRS}
|
||||
${AVUTIL_INCLUDE_DIRS}
|
||||
${AVDEVICE_INCLUDE_DIRS} )
|
||||
endif( WIN32 )
|
||||
|
||||
# add in swscale if found
|
||||
IF ( SWSCALE_FOUND )
|
||||
|
||||
Reference in new issue
Block a user