]> git.saurik.com Git - wxWidgets.git/commitdiff
Only include/build pnghand if the user builds the png library (avoids multiple build...
authorRyan Norton <wxprojects@comcast.net>
Wed, 22 Sep 2004 20:47:23 +0000 (20:47 +0000)
committerRyan Norton <wxprojects@comcast.net>
Wed, 22 Sep 2004 20:47:23 +0000 (20:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/carbon/pnghand.h
src/mac/carbon/pnghand.cpp

index 19271c4705e7e8881ac667613527e7bbc7b63c50..7f504457d9c4ab447ce4f4aea0b697e9dfabd999 100644 (file)
@@ -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_
 
index f25141d7e9c50e559a4dc236b295b8888414835b..9ac29da3c2d9eb46eaa1635de5142689401177ca 100644 (file)
@@ -21,6 +21,8 @@
 #  pragma hdrstop
 #endif
 
+#if wxUSE_LIBPNG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -902,3 +904,4 @@ bool wxPNGFileHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, in
     return FALSE;
 }
 
+#endif //wxUSE_LIBPNG