Browse Source

cmake: Fix FFmpeg search path on debian

Although FFmpeg is installed, OBS currently fails to build on debian
(tested on Debian Jessie 8.6).  It looks for libavcodec.a in
/usr/local/lib and not /usr/lib.

Closes jp9000/obs-studio#661
Younes SERRAJ 9 years ago
parent
commit
f029ec821e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      cmake/Modules/FindFFmpeg.cmake

+ 4 - 0
cmake/Modules/FindFFmpeg.cmake

@@ -49,6 +49,8 @@ function(find_ffmpeg_library component header)
 			${DepsPath${_lib_suffix}}
 			${DepsPath}
 			${PC_FFMPEG_${component}_INCLUDE_DIRS}
+		PATHS
+			/usr/include /usr/local/include /opt/local/include /sw/include
 		PATH_SUFFIXES ffmpeg libav include)
 
 	find_library(FFMPEG_${component}_LIBRARY
@@ -64,6 +66,8 @@ function(find_ffmpeg_library component header)
 			${DepsPath${_lib_suffix}}
 			${DepsPath}
 			${PC_FFMPEG_${component}_LIBRARY_DIRS}
+		PATHS
+			/usr/lib /usr/local/lib /opt/local/lib /sw/lib
 		PATH_SUFFIXES
 			lib${_lib_suffix} lib
 			libs${_lib_suffix} libs