From a56d3235e3bf9219c61e06a18ed433b25e47403e Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 28 Jun 2013 12:29:39 -0400 Subject: [PATCH] Prevent GTK printing build error on Linux * Do not fail to build when wxWidgets is built with either --with-gnomeprint or --with-gtkprint are not configured. Only display warning. * Move warning code from include/common.h to common/common.cpp so it only shows the warning once instead of every source file that includes common.h --- common/common.cpp | 14 ++++++++++++++ include/common.h | 10 ---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index aae5441be9..383eb80350 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -40,6 +40,20 @@ #include + +// Fail build if wxWidgets printing was not configured. +#if !wxUSE_PRINTING_ARCHITECTURE && !SWIG +# error "You must use '--enable-printarch' in your wx library configuration." +#endif + +// Show warning if wxWidgets Gnome or GTK printing was not configured. +#if defined( __WXGTK__ ) +# if !wxUSE_LIBGNOMEPRINT && !wxUSE_GTKPRINT && !SWIG +# warning "You must use '--with-gnomeprint' or '--with-gtkprint' in your wx library configuration for full print capabilities." +# endif +#endif + + /** * Global variables definitions. * diff --git a/include/common.h b/include/common.h index c116e85cfc..fe8f3d08cc 100644 --- a/include/common.h +++ b/include/common.h @@ -42,16 +42,6 @@ #include #include -#if !wxUSE_PRINTING_ARCHITECTURE && !SWIG -# error "You must use '--enable-printarch' in your wx library configuration." -#endif - -#if defined( __WXGTK__ ) -# if !wxUSE_LIBGNOMEPRINT && !wxUSE_GTKPRINT && !SWIG -# error "You must use '--with-gnomeprint' or '--with-gtkprint' in your wx library configuration." -# endif -#endif - class wxAboutDialogInfo;