- pkg_check_modules(${library}_LIBRARY lib${library})
- set(FFmpeg_CFLAGS "${FFmpeg_CFLAGS} ${${library}_LIBRARY_CFLAGS}")
- set(FFmpeg_LIBRARIES "${library};${FFmpeg_LIBRARIES}")
- set(FFmpeg_FOUND TRUE CACHE INTERNAL "")
+ pkg_check_modules(${library}_LIBRARY lib${library})
+ set(FFmpeg_LIBRARIES "${library};${FFmpeg_LIBRARIES}")
+
+ if (${library}_LIBRARY_CFLAGS)
+ set(FFmpeg_CFLAGS ${FFmpeg_CFLAGS} ${${library}_LIBRARY_CFLAGS})
+ endif (${library}_LIBRARY_CFLAGS)
+ set(FFmpeg_FOUND TRUE CACHE INTERNAL "")