1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-02 00:42:33 +01:00

cmake: windows static ffmpeg build has dependency on swresample

This commit is contained in:
Anonymous Maarten 2017-11-05 14:47:03 +01:00 committed by Daniel Evans
parent fdb669a518
commit 27fb8bd462

View File

@ -50,6 +50,11 @@ if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT)
set(FFMPEG_FOUND TRUE)
endif()
find_library(FFMPEG_SWRESAMPLE
NAMES swresample
PATHS ${_FFMPEG_SWRESAMPLE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
)
set(FFMPEG_INCLUDE_DIR ${FFMPEG_AVCODEC_INCLUDE_DIR})
set(FFMPEG_LIBRARIES
@ -58,6 +63,10 @@ ${FFMPEG_LIBAVFORMAT}
${FFMPEG_LIBAVUTIL}
)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND FFMPEG_LIBRARIES "${FFMPEG_SWRESAMPLE}" secur32.lib Ws2_32.lib)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FFmpeg DEFAULT_MSG FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR)