diff --git a/cmake/Modules/FindFFMpeg.cmake b/cmake/Modules/FindFFmpeg.cmake similarity index 91% rename from cmake/Modules/FindFFMpeg.cmake rename to cmake/Modules/FindFFmpeg.cmake index 8f1ad2a75..438b58168 100644 --- a/cmake/Modules/FindFFMpeg.cmake +++ b/cmake/Modules/FindFFmpeg.cmake @@ -30,7 +30,7 @@ endif() function(find_ffmpeg_library component header) string(TOUPPER "${component}" component_u) set(FFMPEG_${component_u}_FOUND FALSE PARENT_SCOPE) - set(FFMpeg_${component}_FOUND FALSE PARENT_SCOPE) + set(FFmpeg_${component}_FOUND FALSE PARENT_SCOPE) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_FFMPEG_${component} QUIET lib${component}) @@ -79,7 +79,7 @@ function(find_ffmpeg_library component header) if(FFMPEG_${component}_INCLUDE_DIR AND FFMPEG_${component}_LIBRARY) set(FFMPEG_${component_u}_FOUND TRUE PARENT_SCOPE) - set(FFMpeg_${component}_FOUND TRUE PARENT_SCOPE) + set(FFmpeg_${component}_FOUND TRUE PARENT_SCOPE) list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_${component}_INCLUDE_DIR}) list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) @@ -104,7 +104,7 @@ function(find_ffmpeg_library component header) set(FFMPEG_${component_u}_VERSION_STRING "${_major}.${_minor}.${_micro}" PARENT_SCOPE) else() - message(STATUS "Failed parsing FFMpeg ${component} version") + message(STATUS "Failed parsing FFmpeg ${component} version") endif() endif() endfunction() @@ -112,14 +112,14 @@ endfunction() set(FFMPEG_INCLUDE_DIRS) set(FFMPEG_LIBRARIES) -if(NOT FFMpeg_FIND_COMPONENTS) - message(FATAL_ERROR "No FFMpeg components requested") +if(NOT FFmpeg_FIND_COMPONENTS) + message(FATAL_ERROR "No FFmpeg components requested") endif() -list(GET FFMpeg_FIND_COMPONENTS 0 _first_comp) +list(GET FFmpeg_FIND_COMPONENTS 0 _first_comp) string(TOUPPER "${_first_comp}" _first_comp) -foreach(component ${FFMpeg_FIND_COMPONENTS}) +foreach(component ${FFmpeg_FIND_COMPONENTS}) if(component STREQUAL "avcodec") find_ffmpeg_library("${component}" "avcodec.h") elseif(component STREQUAL "avdevice") @@ -139,12 +139,12 @@ foreach(component ${FFMpeg_FIND_COMPONENTS}) elseif(component STREQUAL "swscale") find_ffmpeg_library("${component}" "swscale.h") else() - message(FATAL_ERROR "Unknown FFMpeg component requested: ${component}") + message(FATAL_ERROR "Unknown FFmpeg component requested: ${component}") endif() endforeach() include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(FFMpeg +find_package_handle_standard_args(FFmpeg FOUND_VAR FFMPEG_FOUND REQUIRED_VARS FFMPEG_${_first_comp}_LIBRARIES FFMPEG_${_first_comp}_INCLUDE_DIRS VERSION_VAR FFMPEG_${_first_comp}_VERSION_STRING diff --git a/deps/libff/CMakeLists.txt b/deps/libff/CMakeLists.txt index 37c6c5fb3..c1413c091 100644 --- a/deps/libff/CMakeLists.txt +++ b/deps/libff/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.8.11) project (libff) -find_package(FFMpeg REQUIRED +find_package(FFmpeg REQUIRED COMPONENTS avcodec avfilter avdevice avutil swscale avformat swresample) include_directories(${FFMPEG_INCLUDE_DIRS}) diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt index e0cbb4dce..067f5673a 100644 --- a/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt @@ -2,7 +2,7 @@ project(libobs) find_package(Threads REQUIRED) -find_package(FFMpeg REQUIRED +find_package(FFmpeg REQUIRED COMPONENTS avformat avutil swscale swresample OPTIONAL_COMPONENTS avcodec) include_directories(${FFMPEG_INCLUDE_DIRS}) diff --git a/plugins/obs-ffmpeg/CMakeLists.txt b/plugins/obs-ffmpeg/CMakeLists.txt index aadd43b0d..511431d15 100644 --- a/plugins/obs-ffmpeg/CMakeLists.txt +++ b/plugins/obs-ffmpeg/CMakeLists.txt @@ -5,7 +5,7 @@ if(MSVC) w32-pthreads) endif() -find_package(FFMpeg REQUIRED +find_package(FFmpeg REQUIRED COMPONENTS avcodec avfilter avdevice avutil swscale avformat swresample) include_directories(${FFMPEG_INCLUDE_DIRS}) diff --git a/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt b/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt index 8075aae37..8c564d8d1 100644 --- a/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt +++ b/plugins/obs-ffmpeg/ffmpeg-mux/CMakeLists.txt @@ -1,6 +1,6 @@ project(ffmpeg-mux) -find_package(FFMpeg REQUIRED +find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat) include_directories(${FFMPEG_INCLUDE_DIRS}) diff --git a/plugins/win-dshow/CMakeLists.txt b/plugins/win-dshow/CMakeLists.txt index bfa95fd21..f34e978b2 100644 --- a/plugins/win-dshow/CMakeLists.txt +++ b/plugins/win-dshow/CMakeLists.txt @@ -1,6 +1,6 @@ project(win-dshow) -find_package(FFMpeg REQUIRED COMPONENTS avcodec avutil) +find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil) include_directories(${FFMPEG_INCLUDE_DIRS}) set(win-dshow_HEADERS