Rex Dieter 474af04
From 39b998125a4d0903e2d169e66cfce2dde287808f Mon Sep 17 00:00:00 2001
Rex Dieter 474af04
From: Lukasz Maszczynski <lukasz@maszczynski.net>
Rex Dieter 474af04
Date: Fri, 26 Jul 2013 22:51:30 +0200
Rex Dieter 474af04
Subject: [PATCH 01/88] Fixed linking with Gwenhywfar >= 4.6.0
Rex Dieter 474af04
Rex Dieter 474af04
used a list of libraries to link with as reported by pkg-config instead
Rex Dieter 474af04
of hardcoded gwengui-qt4 (in gwenhywfar 4.6.0, gwengui-qt4 is no longer
Rex Dieter 474af04
standalone - it depends on gwengui-cpp)
Rex Dieter 474af04
Rex Dieter 474af04
REVIEW: 111672
Rex Dieter 474af04
---
Rex Dieter 474af04
 cmake/modules/FindGwenhywfar.cmake | 45 ++++++++++++++++++++------------------
Rex Dieter 474af04
 1 file changed, 24 insertions(+), 21 deletions(-)
Rex Dieter 474af04
Rex Dieter 474af04
diff --git a/cmake/modules/FindGwenhywfar.cmake b/cmake/modules/FindGwenhywfar.cmake
Rex Dieter 474af04
index 41961e6..526c041 100644
Rex Dieter 474af04
--- a/cmake/modules/FindGwenhywfar.cmake
Rex Dieter 474af04
+++ b/cmake/modules/FindGwenhywfar.cmake
Rex Dieter 474af04
@@ -5,6 +5,8 @@
Rex Dieter 474af04
 #  GWENHYWFAR_LIBRARIES - The libraries needed to use Gwenhywfar
Rex Dieter 474af04
 #  GWENHYWFAR_VERSION = The version of Gwenhywfar as defined in version.h
Rex Dieter 474af04
 
Rex Dieter 474af04
+find_package(PkgConfig)
Rex Dieter 474af04
+
Rex Dieter 474af04
 set(GWENHYWFAR_FOUND FALSE)
Rex Dieter 474af04
 
Rex Dieter 474af04
 if(NOT GWENHYWFAR_MIN_VERSION)
Rex Dieter 474af04
@@ -16,26 +18,27 @@ if(GWENHYWFAR_INCLUDE_DIRS AND GWENHYWFAR_LIBRARIES)
Rex Dieter 474af04
   set(GWENHYWFAR_FIND_QUIETLY TRUE)
Rex Dieter 474af04
 endif(GWENHYWFAR_INCLUDE_DIRS AND GWENHYWFAR_LIBRARIES)
Rex Dieter 474af04
 
Rex Dieter 474af04
-PKG_CHECK_MODULES(GWENHYWFAR gwenhywfar>=${GWENHYWFAR_MIN_VERSION})
Rex Dieter 474af04
-
Rex Dieter 474af04
-if(${GWENHYWFAR_FOUND})
Rex Dieter 474af04
-  PKG_CHECK_MODULES(QT4GUI gwengui-qt4)
Rex Dieter 474af04
-  if (NOT ${QT4GUI_FOUND})
Rex Dieter 474af04
-    set(GWENHYWFAR_FOUND FALSE)
Rex Dieter 474af04
-    unset(GWENHYWFAR_INCLUDE_DIRS)
Rex Dieter 474af04
-    unset(GWENHYWFAR_LIBRARIES)
Rex Dieter 474af04
-    unset(GWENHYWFAR_VERSION)
Rex Dieter 474af04
-    message(STATUS "Gwenhywfar does not have the Q4Banking frontend enabled")
Rex Dieter 474af04
-  endif (NOT ${QT4GUI_FOUND})
Rex Dieter 474af04
-
Rex Dieter 474af04
-  if(${GWENHYWFAR_FOUND})
Rex Dieter 474af04
-    find_library(GWENHYWFAR_GUI_LIBRARY NAMES gwengui-qt4 libgwengui-qt4
Rex Dieter 474af04
-      HINTS ${GWENHYWFAR_LIBRARY_DIRS})
Rex Dieter 474af04
-    if(GWENHYWFAR_GUI_LIBRARY STREQUAL "GWENHYWFAR_GUI_LIBRARY-NOTFOUND")
Rex Dieter 474af04
-      set(GWENHYWFAR_GUI_LIBRARY "")
Rex Dieter 474af04
-    endif(GWENHYWFAR_GUI_LIBRARY STREQUAL "GWENHYWFAR_GUI_LIBRARY-NOTFOUND")
Rex Dieter 474af04
-    set(GWENHYWFAR_LIBRARIES ${GWENHYWFAR_GUI_LIBRARY} ${GWENHYWFAR_LIBRARIES})
Rex Dieter 474af04
-  endif(${GWENHYWFAR_FOUND})
Rex Dieter 474af04
-endif(${GWENHYWFAR_FOUND})
Rex Dieter 474af04
+PKG_CHECK_MODULES(GWENHYWFAR_CORE gwenhywfar>=${GWENHYWFAR_MIN_VERSION})
Rex Dieter 474af04
+PKG_CHECK_MODULES(GWENHYWFAR_QT4GUI gwengui-qt4>=${GWENHYWFAR_MIN_VERSION})
Rex Dieter 474af04
+
Rex Dieter 474af04
+if (${GWENHYWFAR_CORE_FOUND} AND ${GWENHYWFAR_QT4GUI_FOUND})
Rex Dieter 474af04
+  set(GWENHYWFAR_FOUND TRUE)
Rex Dieter 474af04
+  set(GWENHYWFAR_INCLUDE_DIRS ${GWENHYWFAR_CORE_INCLUDE_DIRS})
Rex Dieter 474af04
+  set(GWENHYWFAR_LIBRARIES ${GWENHYWFAR_QT4GUI_LIBRARIES} ${GWENHYWFAR_CORE_LIBRARIES})
Rex Dieter 474af04
+  set(GWENHYWFAR_VERSION ${GWENHYWFAR_CORE_VERSION})
Rex Dieter 474af04
+else (${GWENHYWFAR_CORE_FOUND} AND ${GWENHYWFAR_QT4GUI_FOUND})
Rex Dieter 474af04
+  set(GWENHYWFAR_FOUND FALSE)
Rex Dieter 474af04
+  unset(GWENHYWFAR_INCLUDE_DIRS)
Rex Dieter 474af04
+  unset(GWENHYWFAR_LIBRARIES)
Rex Dieter 474af04
+  unset(GWENHYWFAR_VERSION)
Rex Dieter 474af04
+endif (${GWENHYWFAR_CORE_FOUND} AND ${GWENHYWFAR_QT4GUI_FOUND})
Rex Dieter 474af04
+
Rex Dieter 474af04
+if (NOT ${GWENHYWFAR_QT4GUI_FOUND})
Rex Dieter 474af04
+  message(WARNING "Gwenhywfar does not have the Qt4Banking frontend enabled")
Rex Dieter 474af04
+endif (NOT ${GWENHYWFAR_QT4GUI_FOUND})
Rex Dieter 474af04
+
Rex Dieter 474af04
+if (NOT ${GWENHYWFAR_CORE_VERSION} VERSION_EQUAL ${GWENHYWFAR_QT4GUI_VERSION})
Rex Dieter 474af04
+  message(WARNING "Gwenhywfar libraries versions mismatch")
Rex Dieter 474af04
+endif (NOT ${GWENHYWFAR_CORE_VERSION} VERSION_EQUAL ${GWENHYWFAR_QT4GUI_VERSION})
Rex Dieter 474af04
 
Rex Dieter 474af04
 mark_as_advanced(GWENHYWFAR_INCLUDE_DIRS GWENHYWFAR_LIBRARIES)
Rex Dieter 474af04
-- 
Rex Dieter 474af04
1.8.4.2
Rex Dieter 474af04