Commit 762d9f99 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: FindFFmpeg simplication.

parent 51aed47f
...@@ -18,18 +18,16 @@ if (NOT FFmpeg_SEARCHED) ...@@ -18,18 +18,16 @@ if (NOT FFmpeg_SEARCHED)
set(FFmpeg_LIBRARIES "") set(FFmpeg_LIBRARIES "")
foreach (library ffmpeg avcodec avformat avutil postproc swscale) foreach (library ffmpeg avcodec avformat avutil postproc swscale)
find_library( ${library}_LIBRARY ${library} ) find_library( ${library}_LIBRARY ${library} )
set( ${library}_LIBRARY_FOUND NOT ${${library}_LIBRARY} ) if (${library}_LIBRARY)
if (${library}_LIBRARY_FOUND)
set(FFmpeg_LIBRARIES "${library};${FFmpeg_LIBRARIES}") set(FFmpeg_LIBRARIES "${library};${FFmpeg_LIBRARIES}")
set(FFmpeg_FOUND TRUE CACHE INTERNAL "") set(FFmpeg_FOUND TRUE CACHE INTERNAL "")
endif (${library}_LIBRARY_FOUND) endif (${library}_LIBRARY)
endforeach (library) endforeach (library)
foreach (library a52 faac lame z png mp3lame twolame) foreach (library a52 faac lame z png mp3lame twolame)
find_library( ${library}_LIBRARY ${library} ) find_library( ${library}_LIBRARY ${library} )
set( ${library}_LIBRARY_FOUND NOT ${${library}_LIBRARY} ) if (${library}_LIBRARY)
if (${library}_LIBRARY_FOUND)
set(FFmpeg_LIBRARIES "${library};${FFmpeg_LIBRARIES}") set(FFmpeg_LIBRARIES "${library};${FFmpeg_LIBRARIES}")
endif (${library}_LIBRARY_FOUND) endif (${library}_LIBRARY)
endforeach (library) endforeach (library)
set(FFmpeg_LIBRARIES "${FFmpeg_LIBRARIES}" CACHE INTERNAL STRING) set(FFmpeg_LIBRARIES "${FFmpeg_LIBRARIES}" CACHE INTERNAL STRING)
endif (NOT FFmpeg_FOUND) endif (NOT FFmpeg_FOUND)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment