From: Ryan Norton Date: Wed, 22 Sep 2004 20:47:23 +0000 (+0000) Subject: Only include/build pnghand if the user builds the png library (avoids multiple build... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a76fd371f7201d04ae517f69931ea2f1753a3e51 Only include/build pnghand if the user builds the png library (avoids multiple build errors) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/carbon/pnghand.h b/include/wx/mac/carbon/pnghand.h index 19271c4705..7f504457d9 100644 --- a/include/wx/mac/carbon/pnghand.h +++ b/include/wx/mac/carbon/pnghand.h @@ -9,12 +9,16 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#ifndef _WX_PNGHAND_H_ +#define _WX_PNGHAND_H_ + #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "pnghand.h" #endif -#ifndef _WX_PNGHAND_H_ -#define _WX_PNGHAND_H_ +#include "wx/defs.h" + +#if wxUSE_PNGLIB class WXDLLEXPORT wxPNGFileHandler: public wxBitmapHandler { @@ -32,6 +36,8 @@ public: virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); }; +#endif //wxUSE_LIBPNG + #endif // _WX_PNGHAND_H_ diff --git a/src/mac/carbon/pnghand.cpp b/src/mac/carbon/pnghand.cpp index f25141d7e9..9ac29da3c2 100644 --- a/src/mac/carbon/pnghand.cpp +++ b/src/mac/carbon/pnghand.cpp @@ -21,6 +21,8 @@ # pragma hdrstop #endif +#if wxUSE_LIBPNG + #include #include #include @@ -902,3 +904,4 @@ bool wxPNGFileHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, in return FALSE; } +#endif //wxUSE_LIBPNG