From e843a2858d1c24dbb351ce78fb7c4e1039d0e3ef Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 11 Aug 2011 14:53:10 +0200 Subject: [PATCH] Ignore telepathy-glib installs in system when using another prefix If using another build prefix PKG_CONFIG_PATH is set. This means that pkg-config finds telepathy-glib.pc in the alternate prefix. However if telepathy-glib is also installed, the cmake code then goes and uses find_library/find_path, which by default use system directories. Remove usage of system directories, in the case where the pkg-config file is found. https://bugs.freedesktop.org/show_bug.cgi?id=40008 --- cmake/modules/FindTelepathyGlib.cmake | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/cmake/modules/FindTelepathyGlib.cmake b/cmake/modules/FindTelepathyGlib.cmake index 8728dab..05eb087 100644 --- a/cmake/modules/FindTelepathyGlib.cmake +++ b/cmake/modules/FindTelepathyGlib.cmake @@ -32,17 +32,23 @@ endif (NOT WIN32) if (TELEPATHY_GLIB_MIN_VERSION AND PKG_CONFIG_FOUND AND NOT PC_TELEPATHY_GLIB_FOUND) message(STATUS "Telepathy-glib not found or its version is < ${TELEPATHY_GLIB_MIN_VERSION}") else (TELEPATHY_GLIB_MIN_VERSION AND PKG_CONFIG_FOUND AND NOT PC_TELEPATHY_GLIB_FOUND) + if (PKG_CONFIG_FOUND) + set(OPTIONS NO_DEFAULT_PATH) + endif (PKG_CONFIG_FOUND) + find_path(TELEPATHY_GLIB_INCLUDE_DIR telepathy-glib/client.h PATHS ${PC_TELEPATHY_GLIB_INCLUDEDIR} ${PC_TELEPATHY_GLIB_INCLUDE_DIRS} PATH_SUFFIXES telepathy-1.0 + ${OPTIONS} ) find_library(TELEPATHY_GLIB_LIBRARIES NAMES telepathy-glib PATHS ${PC_TELEPATHY_GLIB_LIBDIR} ${PC_TELEPATHY_GLIB_LIBRARY_DIRS} + ${OPTIONS} ) include(FindPackageHandleStandardArgs) -- 1.7.6