浏览代码

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 年之前
父节点
当前提交
8b5caeca10

+ 8 - 2
cmake/Modules/FindFFMpeg.cmake

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

+ 14 - 2
cmake/Modules/FindFreetype.cmake

@@ -24,9 +24,9 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build
 		ENV FREETYPE_DIR
 		ENV FREETYPE_DIR
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
 		ENV DepsPath
-		${FreetypePath${lib_suffix}}
+		${FreetypePath${_lib_suffix}}
 		${FreetypePath}
 		${FreetypePath}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${DepsPath}
 		${_FREETYPE_INCLUDE_DIRS}
 		${_FREETYPE_INCLUDE_DIRS}
 	PATHS
 	PATHS
@@ -42,6 +42,12 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
 		ENV FreetypePath${_lib_suffix}
 		ENV FreetypePath${_lib_suffix}
 		ENV FreetypePath
 		ENV FreetypePath
 		ENV FREETYPE_DIR
 		ENV FREETYPE_DIR
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${FreetypePath${_lib_suffix}}
+		${FreetypePath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_FREETYPE_INCLUDE_DIRS}
 		${_FREETYPE_INCLUDE_DIRS}
 	PATHS
 	PATHS
 		/usr/include /usr/local/include /opt/local/include /sw/include
 		/usr/include /usr/local/include /opt/local/include /sw/include
@@ -54,6 +60,12 @@ find_library(FREETYPE_LIB
 		ENV FreetypePath${_lib_suffix}
 		ENV FreetypePath${_lib_suffix}
 		ENV FreetypePath
 		ENV FreetypePath
 		ENV FREETYPE_DIR
 		ENV FREETYPE_DIR
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${FreetypePath${_lib_suffix}}
+		${FreetypePath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_FREETYPE_LIBRARY_DIRS}
 		${_FREETYPE_LIBRARY_DIRS}
 	PATHS
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib
 		/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 JanssonPath
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
 		ENV DepsPath
-		${JanssonPath${lib_suffix}}
+		${JanssonPath${_lib_suffix}}
 		${JanssonPath}
 		${JanssonPath}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${DepsPath}
 		${_JANSSON_INCLUDE_DIRS}
 		${_JANSSON_INCLUDE_DIRS}
 	PATHS
 	PATHS
@@ -36,6 +36,12 @@ find_library(Jansson_LIB
 	HINTS
 	HINTS
 		ENV JanssonPath${_lib_suffix}
 		ENV JanssonPath${_lib_suffix}
 		ENV JanssonPath
 		ENV JanssonPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${JanssonPath${_lib_suffix}}
+		${JanssonPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_JANSSON_LIBRARY_DIRS}
 		${_JANSSON_LIBRARY_DIRS}
 	PATHS
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib
 		/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 curlPath
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
 		ENV DepsPath
-		${curlPath${lib_suffix}}
+		${curlPath${_lib_suffix}}
 		${curlPath}
 		${curlPath}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${DepsPath}
 		${_CURL_INCLUDE_DIRS}
 		${_CURL_INCLUDE_DIRS}
 	PATHS
 	PATHS
@@ -41,6 +41,12 @@ find_library(CURL_LIB
 	HINTS
 	HINTS
 		ENV curlPath${_lib_suffix}
 		ENV curlPath${_lib_suffix}
 		ENV curlPath
 		ENV curlPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${curlPath${_lib_suffix}}
+		${curlPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_CURL_LIBRARY_DIRS}
 		${_CURL_LIBRARY_DIRS}
 	PATHS
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib
 		/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
 	HINTS
 		ENV LibfdkPath${_lib_suffix}
 		ENV LibfdkPath${_lib_suffix}
 		ENV LibfdkPath
 		ENV LibfdkPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${LibfdkPath${_lib_suffix}}
+		${LibfdkPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_LIBFDK_INCLUDE_DIRS}
 		${_LIBFDK_INCLUDE_DIRS}
 	PATHS
 	PATHS
 		/usr/include /usr/local/include /opt/local/include /sw/include)
 		/usr/include /usr/local/include /opt/local/include /sw/include)
@@ -33,6 +39,12 @@ find_library(Libfdk_LIB
 	HINTS
 	HINTS
 		ENV LibfdkPath${_lib_suffix}
 		ENV LibfdkPath${_lib_suffix}
 		ENV LibfdkPath
 		ENV LibfdkPath
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${LibfdkPath${_lib_suffix}}
+		${LibfdkPath}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_LIBFDK_LIBRARY_DIRS}
 		${_LIBFDK_LIBRARY_DIRS}
 	PATHS
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib
 		/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 x264Path
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath${_lib_suffix}
 		ENV DepsPath
 		ENV DepsPath
-		${x264Path${lib_suffix}}
+		${x264Path${_lib_suffix}}
 		${x264Path}
 		${x264Path}
-		${DepsPath${lib_suffix}}
+		${DepsPath${_lib_suffix}}
 		${DepsPath}
 		${DepsPath}
 		${_X264_INCLUDE_DIRS}
 		${_X264_INCLUDE_DIRS}
 	PATHS
 	PATHS
@@ -39,6 +39,12 @@ find_library(X264_LIB
 	HINTS
 	HINTS
 		ENV x264Path${_lib_suffix}
 		ENV x264Path${_lib_suffix}
 		ENV x264Path
 		ENV x264Path
+		ENV DepsPath${_lib_suffix}
+		ENV DepsPath
+		${x264Path${_lib_suffix}}
+		${x264Path}
+		${DepsPath${_lib_suffix}}
+		${DepsPath}
 		${_X264_LIBRARY_DIRS}
 		${_X264_LIBRARY_DIRS}
 	PATHS
 	PATHS
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib
 		/usr/lib /usr/local/lib /opt/local/lib /sw/lib