|
|
|
@ -98,25 +98,30 @@ endif()
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
|
|
# Sound setup
|
|
|
|
|
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE AVRESAMPLE)
|
|
|
|
|
unset(FFMPEG_LIBRARIES CACHE)
|
|
|
|
|
find_package(FFmpeg)
|
|
|
|
|
|
|
|
|
|
find_package(FFmpeg REQUIRED)
|
|
|
|
|
|
|
|
|
|
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARY})
|
|
|
|
|
|
|
|
|
|
message(STATUS ${FFMPEG_LIBRARIES})
|
|
|
|
|
if ( NOT AVCODEC_FOUND OR NOT AVFORMAT_FOUND OR NOT AVUTIL_FOUND OR NOT SWSCALE_FOUND )
|
|
|
|
|
message(FATAL_ERROR "FFmpeg component required, but not found!")
|
|
|
|
|
endif()
|
|
|
|
|
set(SOUND_INPUT_INCLUDES ${FFMPEG_INCLUDE_DIRS})
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARIES})
|
|
|
|
|
if( SWRESAMPLE_FOUND )
|
|
|
|
|
add_definitions(-DHAVE_LIBSWRESAMPLE)
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
|
|
|
|
|
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
|
|
|
|
|
else()
|
|
|
|
|
if( AVRESAMPLE_FOUND )
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
|
|
|
|
|
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
|
|
|
|
|
else()
|
|
|
|
|
message(FATAL_ERROR "Install either libswresample (FFmpeg) or libavresample (Libav).")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES})
|
|
|
|
|
|
|
|
|
|
# TinyXML
|
|
|
|
|
option(USE_SYSTEM_TINYXML "Use system TinyXML library instead of internal." OFF)
|
|
|
|
|
if(USE_SYSTEM_TINYXML)
|
|
|
|
|