telepathy-qt: cmake: Fix PkgConfig handling

Dario Freddi drf at kemper.freedesktop.org
Wed Jul 4 04:32:06 PDT 2012


Module: telepathy-qt
Branch: master
Commit: 8e630f526bf9c2d13780509d436ff34489f9bf64
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=8e630f526bf9c2d13780509d436ff34489f9bf64

Author: Dario Freddi <dario.freddi at collabora.com>
Date:   Wed Jul  4 12:53:12 2012 +0200

cmake: Fix PkgConfig handling

---

 cmake/modules/FindDBus.cmake          |    6 +++---
 cmake/modules/FindDBusGLib.cmake      |    6 +++---
 cmake/modules/FindTelepathyGlib.cmake |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/cmake/modules/FindDBus.cmake b/cmake/modules/FindDBus.cmake
index afcebfc..872b7bb 100644
--- a/cmake/modules/FindDBus.cmake
+++ b/cmake/modules/FindDBus.cmake
@@ -15,10 +15,10 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
-find_package(PkgConfig)
-if (PKG_CONFIG_FOUND)
+if (NOT WIN32)
+    find_package(PkgConfig)
     pkg_check_modules(PC_DBUS dbus-1)
-endif (PKG_CONFIG_FOUND)
+endif (NOT WIN32)
 
 find_path(DBUS_INCLUDE_DIR dbus/dbus.h
     PATHS ${PC_DBUS_INCLUDE_DIRS}
diff --git a/cmake/modules/FindDBusGLib.cmake b/cmake/modules/FindDBusGLib.cmake
index 140ac04..e0abf1b 100644
--- a/cmake/modules/FindDBusGLib.cmake
+++ b/cmake/modules/FindDBusGLib.cmake
@@ -15,8 +15,8 @@ if(DBUS_GLIB_INCLUDE_DIR AND DBUS_GLIB_LIBRARIES)
   set(DBUS_GLIB_FIND_QUIETLY TRUE)
 endif(DBUS_GLIB_INCLUDE_DIR AND DBUS_GLIB_LIBRARIES)
 
-find_package(PkgConfig)
-if(PKG_CONFIG_FOUND)
+if(NOT WIN32)
+    find_package(PkgConfig)
     if (DBusGLib_FIND_VERSION_EXACT)
         pkg_check_modules(PC_DBUS_GLIB QUIET dbus-glib-1=${DBusGLib_FIND_VERSION})
     else (DBusGLib_FIND_VERSION_EXACT)
@@ -26,7 +26,7 @@ if(PKG_CONFIG_FOUND)
             pkg_check_modules(PC_DBUS_GLIB REQUIRED dbus-glib-1)
         endif (DBusGLib_FIND_VERSION)
     endif (DBusGLib_FIND_VERSION_EXACT)
-endif(PKG_CONFIG_FOUND)
+endif(NOT WIN32)
 
 find_path(DBUS_GLIB_INCLUDE_DIR
           NAMES dbus-1.0/dbus/dbus-glib.h
diff --git a/cmake/modules/FindTelepathyGlib.cmake b/cmake/modules/FindTelepathyGlib.cmake
index 8728dab..c12b9ed 100644
--- a/cmake/modules/FindTelepathyGlib.cmake
+++ b/cmake/modules/FindTelepathyGlib.cmake
@@ -29,9 +29,9 @@ if (NOT WIN32)
     set(TELEPATHY_GLIB_DEFINITIONS ${PC_TELEPATHY_GLIB_CFLAGS_OTHER})
 endif (NOT WIN32)
 
-if (TELEPATHY_GLIB_MIN_VERSION AND PKG_CONFIG_FOUND AND NOT PC_TELEPATHY_GLIB_FOUND)
+if (TELEPATHY_GLIB_MIN_VERSION 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)
+else (TELEPATHY_GLIB_MIN_VERSION AND NOT PC_TELEPATHY_GLIB_FOUND)
     find_path(TELEPATHY_GLIB_INCLUDE_DIR telepathy-glib/client.h
        PATHS
        ${PC_TELEPATHY_GLIB_INCLUDEDIR}
@@ -51,4 +51,4 @@ else (TELEPATHY_GLIB_MIN_VERSION AND PKG_CONFIG_FOUND AND NOT PC_TELEPATHY_GLIB_
 
     mark_as_advanced(TELEPATHY_GLIB_INCLUDE_DIR TELEPATHY_GLIB_LIBRARIES)
 
-endif (TELEPATHY_GLIB_MIN_VERSION AND PKG_CONFIG_FOUND AND NOT PC_TELEPATHY_GLIB_FOUND)
+endif (TELEPATHY_GLIB_MIN_VERSION AND NOT PC_TELEPATHY_GLIB_FOUND)



More information about the telepathy-commits mailing list