diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2011-01-12 12:48:32 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2011-01-16 17:23:33 +0200 |
commit | 1f3ca51b32f4aeaaecb100e38a65c4a443f517b3 (patch) | |
tree | 43870b10fcb3636e29e1e3e668073cf09ba444f4 | |
parent | 310cfb3dfe3be3f9ae43a22f2883a96c1b338d3f (diff) |
Use HINTS instead of PATHS in cmake find_* commands to specify the paths coming from pkg-config.
This should effectively force cmake to prefer the results of pkg-config
rather than the results found on the default system directory.
-rw-r--r-- | cmake/modules/FindGLIB2.cmake | 6 | ||||
-rw-r--r-- | cmake/modules/FindGObject.cmake | 13 | ||||
-rw-r--r-- | cmake/modules/FindGStreamer.cmake | 4 | ||||
-rw-r--r-- | cmake/modules/MacroFindGStreamerLibrary.cmake | 4 |
4 files changed, 13 insertions, 14 deletions
diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake index ebd1c55..c77540d 100644 --- a/cmake/modules/FindGLIB2.cmake +++ b/cmake/modules/FindGLIB2.cmake @@ -23,16 +23,16 @@ endif(NOT WIN32) find_path(GLIB2_MAIN_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0 - PATHS ${PKG_GLIB_INCLUDE_DIRS} ) + HINTS ${PKG_GLIB_INCLUDE_DIRS} ) # search the glibconfig.h include dir under the same root where the library is found find_library(GLIB2_LIBRARIES NAMES glib-2.0 - PATHS ${PKG_GLIB_LIBRARY_DIRS} ) + HINTS ${PKG_GLIB_LIBRARY_DIRS} ) find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h PATH_SUFFIXES glib-2.0/include ../lib/glib-2.0/include - PATHS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH}) + HINTS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH}) set(GLIB2_INCLUDE_DIR ${GLIB2_MAIN_INCLUDE_DIR}) diff --git a/cmake/modules/FindGObject.cmake b/cmake/modules/FindGObject.cmake index 0bd0536..edfe614 100644 --- a/cmake/modules/FindGObject.cmake +++ b/cmake/modules/FindGObject.cmake @@ -29,26 +29,25 @@ IF (NOT WIN32) ENDIF (NOT WIN32) FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h - PATHS - ${PKG_GOBJECT2_INCLUDE_DIRS} - /usr/include/glib-2.0/ + HINTS ${PKG_GOBJECT2_INCLUDE_DIRS} + PATHS /usr/include/glib-2.0/ PATH_SUFFIXES glib-2.0 ) FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 - PATHS + HINTS ${PKG_GOBJECT2_LIBRARY_DIRS} ) FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 - PATHS + HINTS ${PKG_GOBJECT2_LIBRARY_DIRS} ) FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 - PATHS + HINTS ${PKG_GOBJECT2_LIBRARY_DIRS} ) FIND_LIBRARY(_GLibs NAMES glib-2.0 - PATHS + HINTS ${PKG_GOBJECT2_LIBRARY_DIRS} ) diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake index 98ce9eb..6a0e0e7 100644 --- a/cmake/modules/FindGStreamer.cmake +++ b/cmake/modules/FindGStreamer.cmake @@ -36,11 +36,11 @@ endif() find_library(GSTREAMER_LIBRARY NAMES gstreamer-${GSTREAMER_ABI_VERSION} - PATHS ${PKG_GSTREAMER_LIBRARY_DIRS}) + HINTS ${PKG_GSTREAMER_LIBRARY_DIRS}) find_path(GSTREAMER_INCLUDE_DIR gst/gst.h - PATHS ${PKG_GSTREAMER_INCLUDE_DIRS} + HINTS ${PKG_GSTREAMER_INCLUDE_DIRS} PATH_SUFFIXES gstreamer-${GSTREAMER_ABI_VERSION}) mark_as_advanced(GSTREAMER_LIBRARY GSTREAMER_INCLUDE_DIR) diff --git a/cmake/modules/MacroFindGStreamerLibrary.cmake b/cmake/modules/MacroFindGStreamerLibrary.cmake index 31ede28..e8decbf 100644 --- a/cmake/modules/MacroFindGStreamerLibrary.cmake +++ b/cmake/modules/MacroFindGStreamerLibrary.cmake @@ -22,12 +22,12 @@ macro(find_gstreamer_library _name _header _abi_version) find_library(GSTREAMER_${_upper_name}_LIBRARY NAMES gst${_lower_name}-${_abi_version} - PATHS ${PKG_GSTREAMER_${_upper_name}_LIBRARY_DIRS} + HINTS ${PKG_GSTREAMER_${_upper_name}_LIBRARY_DIRS} ) find_path(GSTREAMER_${_upper_name}_INCLUDE_DIR gst/${_lower_name}/${_header} - PATHS ${PKG_GSTREAMER_${_upper_name}_INCLUDE_DIRS} + HINTS ${PKG_GSTREAMER_${_upper_name}_INCLUDE_DIRS} PATH_SUFFIXES gstreamer-${_abi_version} ) |