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