Browse Source

cmake: Fix dependency cmake search paths

Fixes issues using DepsPath(32|64), was using ${lib_suffix} instead of
${_lib_suffix} so 32/64-sepcific directories wouldn't work properly.
Also the DepsPath environment/cmake variable wasn't specified for the
library search.

Also added the same dependency search paths for libfdk (if someone wants
to use it on windows for whatever reason)
jp9000 10 years ago
parent
commit
8b5caeca10

+ 8 - 2
cmake/Modules/FindFFMpeg.cmake

@@ -44,9 +44,9 @@ function(find_ffmpeg_library component header)
 			ENV FFmpegPath
 			ENV DepsPath${_lib_suffix}
 			ENV DepsPath
-			${FFmpegPath${lib_suffix}}
+			${FFmpegPath${_lib_suffix}}
 			${FFmpegPath}
-			${DepsPath${lib_suffix}}
+			${DepsPath${_lib_suffix}}
 			${DepsPath}
 			${PC_FFMPEG_${component}_INCLUDE_DIRS}
 		PATH_SUFFIXES ffmpeg libav)
@@ -57,6 +57,12 @@ function(find_ffmpeg_library component header)
 		HINTS
 			ENV FFmpegPath${_lib_suffix}
 			ENV FFmpegPath
+			ENV DepsPath${_lib_suffix}
+			ENV DepsPath
+			${FFmpegPath${_lib_suffix}}
+			${FFmpegPath}
+			${DepsPath${_lib_suffix}}
+			${DepsPath}
 			${PC_FFMPEG_${component}_LIBRARY_DIRS}
 		PATH_SUFFIXES
 			lib${_lib_suffix} lib

+ 14 - 2
cmake/Modules/FindFreetype.cmake

@@ -24,9 +24,9 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build
 		ENV FREETYPE_DIR
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
-		${FreetypePath${lib_suffix}}
+		${FreetypePath${_lib_suffix}}
 		${FreetypePath}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${_FREETYPE_INCLUDE_DIRS}
 	PATHS
@@ -42,6 +42,12 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
 		ENV FreetypePath${_lib_suffix}
 		ENV FreetypePath
 		ENV FREETYPE_DIR
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${FreetypePath${_lib_suffix}}
+		${FreetypePath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_FREETYPE_INCLUDE_DIRS}
 	PATHS
 		/usr/include /usr/local/include /opt/local/include /sw/include
@@ -54,6 +60,12 @@ find_library(FREETYPE_LIB
 		ENV FreetypePath${_lib_suffix}
 		ENV FreetypePath
 		ENV FREETYPE_DIR
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${FreetypePath${_lib_suffix}}
+		${FreetypePath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_FREETYPE_LIBRARY_DIRS}
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib

+ 8 - 2
cmake/Modules/FindJansson.cmake

@@ -23,9 +23,9 @@ find_path(Jansson_INCLUDE_DIR
 		ENV JanssonPath
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
-		${JanssonPath${lib_suffix}}
+		${JanssonPath${_lib_suffix}}
 		${JanssonPath}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${_JANSSON_INCLUDE_DIRS}
 	PATHS
@@ -36,6 +36,12 @@ find_library(Jansson_LIB
 	HINTS
 		ENV JanssonPath${_lib_suffix}
 		ENV JanssonPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${JanssonPath${_lib_suffix}}
+		${JanssonPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_JANSSON_LIBRARY_DIRS}
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib

+ 8 - 2
cmake/Modules/FindLibcurl.cmake

@@ -26,9 +26,9 @@ find_path(CURL_INCLUDE_DIR
 		ENV curlPath
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
-		${curlPath${lib_suffix}}
+		${curlPath${_lib_suffix}}
 		${curlPath}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${_CURL_INCLUDE_DIRS}
 	PATHS
@@ -41,6 +41,12 @@ find_library(CURL_LIB
 	HINTS
 		ENV curlPath${_lib_suffix}
 		ENV curlPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${curlPath${_lib_suffix}}
+		${curlPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_CURL_LIBRARY_DIRS}
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib

+ 12 - 0
cmake/Modules/FindLibfdk.cmake

@@ -24,6 +24,12 @@ find_path(Libfdk_INCLUDE_DIR
 	HINTS
 		ENV LibfdkPath${_lib_suffix}
 		ENV LibfdkPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${LibfdkPath${_lib_suffix}}
+		${LibfdkPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_LIBFDK_INCLUDE_DIRS}
 	PATHS
 		/usr/include /usr/local/include /opt/local/include /sw/include)
@@ -33,6 +39,12 @@ find_library(Libfdk_LIB
 	HINTS
 		ENV LibfdkPath${_lib_suffix}
 		ENV LibfdkPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${LibfdkPath${_lib_suffix}}
+		${LibfdkPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_LIBFDK_LIBRARY_DIRS}
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib

+ 8 - 2
cmake/Modules/FindLibx264.cmake

@@ -26,9 +26,9 @@ find_path(X264_INCLUDE_DIR
 		ENV x264Path
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
-		${x264Path${lib_suffix}}
+		${x264Path${_lib_suffix}}
 		${x264Path}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${_X264_INCLUDE_DIRS}
 	PATHS
@@ -39,6 +39,12 @@ find_library(X264_LIB
 	HINTS
 		ENV x264Path${_lib_suffix}
 		ENV x264Path
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${x264Path${_lib_suffix}}
+		${x264Path}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_X264_LIBRARY_DIRS}
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib