[Xfce4-commits] <xfc:master> be able to compile in gtk+ 2.24.x, to become ready for debian wheezy
Bo Lorensen
noreply at xfce.org
Sun Oct 28 22:56:01 CET 2012
Updating branch refs/heads/master
to 6279a7844f27fcbc28c5ddaffa0b511638dc8ec1 (commit)
from 6b6fa16607d5b29924a5037f427b6bee280fc763 (commit)
commit 6279a7844f27fcbc28c5ddaffa0b511638dc8ec1
Author: Bo Lorensen <bl at lue.dk>
Date: Sun Oct 28 22:54:30 2012 +0100
be able to compile in gtk+ 2.24.x, to become ready for debian wheezy
CMakeLists.txt | 20 ++++++++++++--------
core/xfc/CMakeLists.txt | 6 ++----
core/xfc/glib/completion.hh | 4 ++++
core/xfc/glib/mutex.hh | 6 ++++++
core/xfc/glib/thread.hh | 5 +++++
core/xfc/glib/utils.hh | 2 ++
debian/changelog | 7 +++++++
demos/xfc-demo/CMakeLists.txt | 3 +--
examples/CMakeLists.txt | 3 +--
examples/core/iochannel/iochannel.cc | 1 +
sourceview/xfc/CMakeLists.txt | 2 +-
ui/xfc/CMakeLists.txt | 7 ++++---
xfc-config.h.in | 2 ++
13 files changed, 48 insertions(+), 20 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa20003..590831a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,15 +3,17 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(XFC)
INCLUDE(FindPkgConfig)
+INCLUDE(CheckIncludeFiles)
+INCLUDE(FindGTK2)
-PKG_SEARCH_MODULE(GLIB REQUIRED glib-2.0)
+#PKG_SEARCH_MODULE(GLIB REQUIRED glib-2.0)
PKG_SEARCH_MODULE(SIGC REQUIRED sigc++-2.0)
-PKG_SEARCH_MODULE(GOBJ REQUIRED gobject-2.0)
-PKG_SEARCH_MODULE(GMOD REQUIRED gmodule-2.0)
-PKG_SEARCH_MODULE(GTHR REQUIRED gthread-2.0)
-PKG_SEARCH_MODULE(GTK REQUIRED gtk+-2.0)
+#PKG_SEARCH_MODULE(GOBJ REQUIRED gobject-2.0)
+#PKG_SEARCH_MODULE(GMOD REQUIRED gmodule-2.0)
+#PKG_SEARCH_MODULE(GTHR REQUIRED gthread-2.0)
+#PKG_SEARCH_MODULE(GTK REQUIRED gtk+-2.0)
PKG_SEARCH_MODULE(GTK_PRN gtk+-unix-print-2.0)
-PKG_SEARCH_MODULE(GDK REQUIRED gdk-2.0 )
+#PKG_SEARCH_MODULE(GDK REQUIRED gdk-2.0 )
PKG_SEARCH_MODULE(SIGC REQUIRED sigc++-2.0)
PKG_SEARCH_MODULE(PANGO REQUIRED pango)
PKG_SEARCH_MODULE(CAIRO REQUIRED cairo)
@@ -22,6 +24,8 @@ PKG_SEARCH_MODULE(XFCE_UI libxfce4ui-1)
PKG_SEARCH_MODULE(XFCE_CONF libxfconf-0)
PKG_SEARCH_MODULE(GLADE libglade-2.0)
+CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H )
+
IF(PANGO_FOUND)
SET(XFC_PANGO 1)
ENDIF(PANGO_FOUND)
@@ -29,10 +33,10 @@ ENDIF(PANGO_FOUND)
IF(CAIRO_FOUND)
SET(XFC_CAIRO 1)
ENDIF(CAIRO_FOUND)
-
+
SET(XFC_MAJOR_VERSION 4)
SET(XFC_MINOR_VERSION 6)
-SET(XFC_MICRO_VERSION 0)
+SET(XFC_MICRO_VERSION 1)
SET(XFC_VERSION "${XFC_MAJOR_VERSION}.${XFC_MINOR_VERSION}.${XFC_MICRO_VERSION}")
diff --git a/core/xfc/CMakeLists.txt b/core/xfc/CMakeLists.txt
index d82aa50..f35b0bc 100644
--- a/core/xfc/CMakeLists.txt
+++ b/core/xfc/CMakeLists.txt
@@ -1,14 +1,12 @@
ADD_SUBDIRECTORY( glib )
-INCLUDE_DIRECTORIES( ${GLIB_INCLUDE_DIRS} ${GOJB_INCLUDE_DIRS} ${GMOD_INCLUDE_DIRS} ${GTHR_INCLUDE_DIRS}
- ${SIGC_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR})
-
+INCLUDE_DIRECTORIES( ${GTK2_INCLUDE_DIRS} )
INCLUDE_DIRECTORIES( ${SIGC_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${XFC_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR} )
ADD_LIBRARY( xfc_core SHARED convert.cc i18n.cc object.cc stackobject.cc trackable.cc
utfstring.cc version.cc ${glib_src})
-TARGET_LINK_LIBRARIES( xfc_core ${GLIB_LIBRARIES} ${GOBJ_LIBRARIES} ${GMOD_LIBRARIES} ${GTHR_LIBRARIES} ${SIGC_LIBRARIES})
+TARGET_LINK_LIBRARIES( xfc_core ${GTK2_GLIB_LIBRARIES} ${SIGC_LIBRARIES})
SET_TARGET_PROPERTIES( xfc_core PROPERTIES VERSION ${XFC_VERSION} SOVERSION ${XFC_MAJOR_VERSION} )
#SET_TARGET_PROPERTIES( xfc_core PROPERTIES LINK_INTERFACE_LIBRARIES "")
diff --git a/core/xfc/glib/completion.hh b/core/xfc/glib/completion.hh
index f759abd..6efb90f 100644
--- a/core/xfc/glib/completion.hh
+++ b/core/xfc/glib/completion.hh
@@ -30,7 +30,11 @@
#endif
#ifndef __G_COMPLETION_H__
+#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24
#include <glib/gcompletion.h>
+#else
+#include <glib/deprecated/gcompletion.h>
+#endif
#endif
#ifndef _CPP_VECTOR
diff --git a/core/xfc/glib/mutex.hh b/core/xfc/glib/mutex.hh
index 28b7ba0..390c1c0 100644
--- a/core/xfc/glib/mutex.hh
+++ b/core/xfc/glib/mutex.hh
@@ -24,6 +24,12 @@
#ifndef XFC_G_MUTEX_HH
#define XFC_G_MUTEX_HH
+#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24
+#include <glib/gthread.h>
+#else
+#include <glib/deprecated/gthread.h>
+#endif
+
#ifndef XFC_OBJECT_HH
#include <xfc/object.hh>
#endif
diff --git a/core/xfc/glib/thread.hh b/core/xfc/glib/thread.hh
index 64cccee..3de0806 100644
--- a/core/xfc/glib/thread.hh
+++ b/core/xfc/glib/thread.hh
@@ -29,6 +29,11 @@
#ifndef XFC_G_THREAD_HH
#define XFC_G_THREAD_HH
+#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24
+#include <glib/gthread.h>
+#else
+#include <glib/deprecated/gthread.h>
+#endif
#ifndef XFC_G_MUTEX_HH
#include <xfc/glib/mutex.hh>
#endif
diff --git a/core/xfc/glib/utils.hh b/core/xfc/glib/utils.hh
index aae5f2d..c008704 100644
--- a/core/xfc/glib/utils.hh
+++ b/core/xfc/glib/utils.hh
@@ -22,6 +22,8 @@
#ifndef XFC_G_UTILS_HH
#define XFC_G_UTILS_HH
+#include <glib.h>
+
#ifndef XFC_UTF_STRING_HH
#include <xfc/utfstring.hh>
#endif
diff --git a/debian/changelog b/debian/changelog
index d11751a..de23922 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xfc (4.6.1-0) unstable; urgency=low
+
+ * Updated to work with gtk+ 2.24 (found in debian wheezy)
+ * Use FindGTK2 module in cmake
+
+ -- Bo Lorentsen <bl at lue.dk> Sun, 28 Oct 2012 22:21:11 +0100
+
xfc (4.6.0-1) unstable; urgency=low
* Convert the builing system to cmake
diff --git a/demos/xfc-demo/CMakeLists.txt b/demos/xfc-demo/CMakeLists.txt
index 8cd2e40..a1b04a5 100644
--- a/demos/xfc-demo/CMakeLists.txt
+++ b/demos/xfc-demo/CMakeLists.txt
@@ -1,6 +1,5 @@
INCLUDE_DIRECTORIES( ${XFC_UI_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR}
- ${GLIB_INCLUDE_DIRS} ${SIGC_INCLUDE_DIRS} ${GDK_INCLUDE_DIRS}
- ${GTK_INCLUDE_DIRS} ${XFC_SOURCE_DIR})
+ ${SIGC_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS} ${XFC_SOURCE_DIR})
ADD_DEFINITIONS( -DDEMOCODEDIR="${XFC_DEMOS_SOURCE_DIR}/xfc-demo" )
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index c741e80..ff3e080 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,7 +1,6 @@
## xfc examples directory
INCLUDE_DIRECTORIES( ${XFC_UI_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR}
- ${GLIB_INCLUDE_DIRS} ${SIGC_INCLUDE_DIRS} ${GDK_INCLUDE_DIRS}
- ${GTK_INCLUDE_DIRS} ${XFC_SOURCE_DIR})
+ ${SIGC_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS} ${XFC_SOURCE_DIR})
ADD_SUBDIRECTORY( core )
ADD_SUBDIRECTORY( howto )
diff --git a/examples/core/iochannel/iochannel.cc b/examples/core/iochannel/iochannel.cc
index bf97500..fcbe11f 100644
--- a/examples/core/iochannel/iochannel.cc
+++ b/examples/core/iochannel/iochannel.cc
@@ -9,6 +9,7 @@
#include <xfc/glib/error.hh>
#include <xfc/glib/iochannel.hh>
#include <glib/gutils.h>
+#include <glib/gfileutils.h>
#include <iostream>
using namespace Xfc;
diff --git a/sourceview/xfc/CMakeLists.txt b/sourceview/xfc/CMakeLists.txt
index 0ba65d6..9f8f6b2 100644
--- a/sourceview/xfc/CMakeLists.txt
+++ b/sourceview/xfc/CMakeLists.txt
@@ -3,7 +3,7 @@
ADD_SUBDIRECTORY( sourceview )
INCLUDE_DIRECTORIES( ${SOURCEVIEW_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR} ${XFC_UI_SOURCE_DIR}
- ${SIGC_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${XFC_SOURCEVIEW_SOURCE_DIR} )
+ ${SIGC_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS} ${XFC_SOURCEVIEW_SOURCE_DIR} )
ADD_LIBRARY( xfc_sourceview SHARED ${sourceview_src})
diff --git a/ui/xfc/CMakeLists.txt b/ui/xfc/CMakeLists.txt
index 37e5d0e..845453c 100644
--- a/ui/xfc/CMakeLists.txt
+++ b/ui/xfc/CMakeLists.txt
@@ -1,5 +1,6 @@
-INCLUDE_DIRECTORIES( ${GLIB_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GDK_INCLUDE_DIRS} ${GTK_PRN_INCLUDE_DIRS} ${SIGC_INCLUDE_DIRS} )
-INCLUDE_DIRECTORIES( ${PANGO_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR} ${XFC_UI_SOURCE_DIR} )
+
+INCLUDE_DIRECTORIES( ${SIGC_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS} ${GTK_PRN_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES( ${XFC_CORE_SOURCE_DIR} ${XFC_UI_SOURCE_DIR} )
ADD_SUBDIRECTORY( atk )
ADD_SUBDIRECTORY( cairo )
@@ -12,7 +13,7 @@ SET( src ${atk_src} ${cairo_src} ${gdk_src} ${gdk_pixbuf_src} ${gtk_src} ${pango
ADD_LIBRARY( xfc_ui SHARED main.cc ${src})
-TARGET_LINK_LIBRARIES( xfc_ui xfc_core ${GTK_LIBRARIES} )
+TARGET_LINK_LIBRARIES( xfc_ui xfc_core ${GTK2_LIBRARIES} )
SET_TARGET_PROPERTIES( xfc_ui PROPERTIES VERSION ${XFC_VERSION} SOVERSION ${XFC_MAJOR_VERSION} )
CONFIGURE_FILE( config.h.in config.h )
diff --git a/xfc-config.h.in b/xfc-config.h.in
index cd409fd..fe631b8 100644
--- a/xfc-config.h.in
+++ b/xfc-config.h.in
@@ -62,6 +62,8 @@
/* Define to the home page for this package. */
#cmakedefine PACKAGE_URL
+#define GTK_VERSION "${GTK2_VERSION}"
+
/* Define to the version of this package. */
#define PACKAGE_VERSION "${XFC_VERSION}"
More information about the Xfce4-commits
mailing list