summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2011-01-12 15:06:50 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2011-01-16 17:23:33 +0200
commit88ac619307294bb21d9cee03da57ef7d607f38fe (patch)
treef366f85a586f4e7bc0f2e71da5ddc45d10c74c79
parent1f3ca51b32f4aeaaecb100e38a65c4a443f517b3 (diff)
Also look into the dirs reported by pkg-config --variable=* to find gstreamer and glib.
This should fix the issue where the PKG_*_LIBRARY_DIRS variable is empty, because pkg-config --libs-only-L return an empty string.
-rw-r--r--cmake/modules/FindGLIB2.cmake4
-rw-r--r--cmake/modules/FindGObject.cmake6
-rw-r--r--cmake/modules/FindGStreamer.cmake4
-rw-r--r--cmake/modules/MacroFindGStreamerLibrary.cmake2
4 files changed, 11 insertions, 5 deletions
diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake
index c77540d..b48b5f3 100644
--- a/cmake/modules/FindGLIB2.cmake
+++ b/cmake/modules/FindGLIB2.cmake
@@ -23,12 +23,12 @@ endif(NOT WIN32)
find_path(GLIB2_MAIN_INCLUDE_DIR glib.h
PATH_SUFFIXES glib-2.0
- HINTS ${PKG_GLIB_INCLUDE_DIRS} )
+ HINTS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_INCLUDEDIR})
# search the glibconfig.h include dir under the same root where the library is found
find_library(GLIB2_LIBRARIES
NAMES glib-2.0
- HINTS ${PKG_GLIB_LIBRARY_DIRS} )
+ HINTS ${PKG_GLIB_LIBRARY_DIRS} ${PKG_GLIB_LIBDIR})
find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
PATH_SUFFIXES glib-2.0/include ../lib/glib-2.0/include
diff --git a/cmake/modules/FindGObject.cmake b/cmake/modules/FindGObject.cmake
index edfe614..1a1e657 100644
--- a/cmake/modules/FindGObject.cmake
+++ b/cmake/modules/FindGObject.cmake
@@ -29,7 +29,7 @@ IF (NOT WIN32)
ENDIF (NOT WIN32)
FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h
- HINTS ${PKG_GOBJECT2_INCLUDE_DIRS}
+ HINTS ${PKG_GOBJECT2_INCLUDE_DIRS} ${PKG_GOBJECT2_INCLUDEDIR}
PATHS /usr/include/glib-2.0/
PATH_SUFFIXES glib-2.0
)
@@ -37,18 +37,22 @@ FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h
FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0
HINTS
${PKG_GOBJECT2_LIBRARY_DIRS}
+ ${PKG_GOBJECT2_LIBDIR}
)
FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0
HINTS
${PKG_GOBJECT2_LIBRARY_DIRS}
+ ${PKG_GOBJECT2_LIBDIR}
)
FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0
HINTS
${PKG_GOBJECT2_LIBRARY_DIRS}
+ ${PKG_GOBJECT2_LIBDIR}
)
FIND_LIBRARY(_GLibs NAMES glib-2.0
HINTS
${PKG_GOBJECT2_LIBRARY_DIRS}
+ ${PKG_GOBJECT2_LIBDIR}
)
IF (WIN32)
diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake
index 6a0e0e7..4c990d0 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}
- HINTS ${PKG_GSTREAMER_LIBRARY_DIRS})
+ HINTS ${PKG_GSTREAMER_LIBRARY_DIRS} ${PKG_GSTREAMER_LIBDIR})
find_path(GSTREAMER_INCLUDE_DIR
gst/gst.h
- HINTS ${PKG_GSTREAMER_INCLUDE_DIRS}
+ HINTS ${PKG_GSTREAMER_INCLUDE_DIRS} ${PKG_GSTREAMER_INCLUDEDIR}
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 e8decbf..761a80c 100644
--- a/cmake/modules/MacroFindGStreamerLibrary.cmake
+++ b/cmake/modules/MacroFindGStreamerLibrary.cmake
@@ -23,11 +23,13 @@ macro(find_gstreamer_library _name _header _abi_version)
find_library(GSTREAMER_${_upper_name}_LIBRARY
NAMES gst${_lower_name}-${_abi_version}
HINTS ${PKG_GSTREAMER_${_upper_name}_LIBRARY_DIRS}
+ ${PKG_GSTREAMER_${_upper_name}_LIBDIR}
)
find_path(GSTREAMER_${_upper_name}_INCLUDE_DIR
gst/${_lower_name}/${_header}
HINTS ${PKG_GSTREAMER_${_upper_name}_INCLUDE_DIRS}
+ ${PKG_GSTREAMER_${_upper_name}_INCLUDEDIR}
PATH_SUFFIXES gstreamer-${_abi_version}
)