cmake: Fix ffmpeg regression on Windows.
Remove LDFLAGS from list of required variables for finding ffmpeg to
succeed. Both main and component LDFLAGS.
Added by f7f424ea
.
This is necessary because of platforms lacking pkg-config, like vcpkg +
Visual Studio, no LDFLAGS are found.
Fixes finding ffmpeg in the vcpkg + Visual Studio configuration.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
5de47935cf
commit
8ce60e1745
|
@ -146,10 +146,19 @@ foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
|
|||
set_component_found(${_component})
|
||||
endforeach ()
|
||||
|
||||
# message(STATUS "FFmpeg_FIND_COMPONENTS: ${FFmpeg_FIND_COMPONENTS}")
|
||||
# message(STATUS "FFMPEG_LIBRARIES: ${FFMPEG_LIBRARIES}")
|
||||
# message(STATUS "FFMPEG_LDFLAGS: ${FFMPEG_LDFLAGS}")
|
||||
# message(STATUS "FFMPEG_INCLUDE_DIRS: ${FFMPEG_INCLUDE_DIRS}")
|
||||
|
||||
# Compile the list of required vars
|
||||
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LDFLAGS FFMPEG_INCLUDE_DIRS)
|
||||
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
|
||||
foreach (_component ${FFmpeg_FIND_COMPONENTS})
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_LDFLAGS ${_component}_INCLUDE_DIRS)
|
||||
# message(STATUS "${_component}_LIBRARIES: ${${_component}_LIBRARIES}")
|
||||
# message(STATUS "${_component}_LDFLAGS: ${${_component}_LDFLAGS}")
|
||||
# message(STATUS "${_component}_INCLUDE_DIRS: ${${_component}_INCLUDE_DIRS}")
|
||||
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
|
||||
endforeach ()
|
||||
|
||||
# Give a nice error message if some of the required vars are missing.
|
||||
|
|
Loading…
Reference in New Issue