From 8b5caeca10eaf2403bc570cddce18e7428c6ec0b Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 13 Jul 2015 14:36:20 -0700 Subject: [PATCH] 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) --- cmake/Modules/FindFFMpeg.cmake | 10 ++++++++-- cmake/Modules/FindFreetype.cmake | 16 ++++++++++++++-- cmake/Modules/FindJansson.cmake | 10 ++++++++-- cmake/Modules/FindLibcurl.cmake | 10 ++++++++-- cmake/Modules/FindLibfdk.cmake | 12 ++++++++++++ cmake/Modules/FindLibx264.cmake | 10 ++++++++-- 6 files changed, 58 insertions(+), 10 deletions(-) diff --git a/cmake/Modules/FindFFMpeg.cmake b/cmake/Modules/FindFFMpeg.cmake index 46a137014..8f1ad2a75 100644 --- a/cmake/Modules/FindFFMpeg.cmake +++ b/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 diff --git a/cmake/Modules/FindFreetype.cmake b/cmake/Modules/FindFreetype.cmake index 9f252601a..f1223f69a 100644 --- a/cmake/Modules/FindFreetype.cmake +++ b/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 diff --git a/cmake/Modules/FindJansson.cmake b/cmake/Modules/FindJansson.cmake index dacac8928..8e9b3543a 100644 --- a/cmake/Modules/FindJansson.cmake +++ b/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 diff --git a/cmake/Modules/FindLibcurl.cmake b/cmake/Modules/FindLibcurl.cmake index 72d3dc332..5d4906a5e 100644 --- a/cmake/Modules/FindLibcurl.cmake +++ b/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 diff --git a/cmake/Modules/FindLibfdk.cmake b/cmake/Modules/FindLibfdk.cmake index 9156e73d7..4930d81ef 100644 --- a/cmake/Modules/FindLibfdk.cmake +++ b/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 diff --git a/cmake/Modules/FindLibx264.cmake b/cmake/Modules/FindLibx264.cmake index a81918467..7c5ffa26e 100644 --- a/cmake/Modules/FindLibx264.cmake +++ b/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