mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 15:36:42 +00:00
Do not use cached FFMPEG_LIBRARIES. Make error messages clearer.
This commit is contained in:
parent
1107156334
commit
166ee6b483
1 changed files with 9 additions and 3 deletions
|
@ -140,6 +140,7 @@ set(OPENMW_LIBS_HEADER)
|
||||||
|
|
||||||
# Sound setup
|
# Sound setup
|
||||||
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE AVRESAMPLE)
|
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE AVRESAMPLE)
|
||||||
|
unset(FFMPEG_LIBRARIES CACHE)
|
||||||
find_package(FFmpeg)
|
find_package(FFmpeg)
|
||||||
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!")
|
||||||
|
@ -150,10 +151,15 @@ if( SWRESAMPLE_FOUND )
|
||||||
add_definitions(-DHAVE_LIBSWRESAMPLE)
|
add_definitions(-DHAVE_LIBSWRESAMPLE)
|
||||||
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
if( AVRESAMPLE_FOUND)
|
# restrict the use of libavresample to debian based system only
|
||||||
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
|
if(EXISTS "/etc/debian_version")
|
||||||
|
if( AVRESAMPLE_FOUND )
|
||||||
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Libav libavresample required, but not found!")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "FFmpeg component required, but not found!")
|
message(FATAL_ERROR "FFmpeg libswresample required, but not found!")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue