Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2008-07-20 23:00:01


Author: grafik
Date: 2008-07-20 23:00:01 EDT (Sun, 20 Jul 2008)
New Revision: 47645
URL: http://svn.boost.org/trac/boost/changeset/47645

Log:
Add custom PNG header to override some settings post include.
Text files modified:
   sandbox/tools/build_extensions/ext/irrlicht.jam | 34 +++++++++++++++++++++++++++++++++-
   1 files changed, 33 insertions(+), 1 deletions(-)

Modified: sandbox/tools/build_extensions/ext/irrlicht.jam
==============================================================================
--- sandbox/tools/build_extensions/ext/irrlicht.jam (original)
+++ sandbox/tools/build_extensions/ext/irrlicht.jam 2008-07-20 23:00:01 EDT (Sun, 20 Jul 2008)
@@ -8,6 +8,7 @@
 ###
 ### /ext/irrlicht//Irrlicht
 
+import set ;
 import extension ;
 
 extension.declare irrlicht ;
@@ -186,6 +187,22 @@
         : $(requirements)
             <dependency>/ext/irrlicht//IrrCompileConfig.h
         ;
+
+ extension.text irrlicht $(version)
+ : irrPNG.h
+ : ## format
+ "#ifndef IRR_PNG_H"
+ "#define IRR_PNG_H"
+ "#include <png.h>"
+ <target-os>iphone:<>"#define png_set_swap_alpha(x)"
+ <target-os>iphone:<>"#define png_set_bgr(x)"
+ "#endif"
+ : $(requirements)
+ : <toolset>msvc:<cxxflags>"/FIirrPNG.h"
+ <toolset>gcc:<cxxflags>"-include irrPNG.h"
+ <toolset>darwin:<cxxflags>"-include irrPNG.h"
+ ;
+
     common-requirements +=
         <implicit-dependency>/ext/irrlicht//IrrCompileConfigPre.h
         <dependency>/ext/irrlicht//IrrCompileConfigPre.h
@@ -226,8 +243,23 @@
         ext-libs += /ext/irrlicht//gl ;
     }
     
+ local custom-objs =
+ [ glob $(location)/source/Irrlicht/CImageLoaderPNG.cpp ] ;
+
+ obj CImageLoaderPNG
+ : [ glob $(location)/source/Irrlicht/CImageLoaderPNG.cpp ]
+ : $(requirements) $(common-requirements)
+ <use>$(ext-libs)
+ <location-prefix>Irrlicht
+ <link>shared:<define>IRRLICHT_EXPORTS=1
+ <link>static:<define>_IRR_STATIC_LIB_
+ <implicit-dependency>irrPNG.h
+ <dependency>irrPNG.h
+ ;
+
     lib Irrlicht
- : [ glob $(location)/source/Irrlicht/*.cpp ]
+ : [ set.difference [ glob $(location)/source/Irrlicht/*.cpp ] : $(custom-objs) ]
+ $(custom-objs:B)
             $(ext-libs)
         : $(requirements) $(common-requirements)
             <location-prefix>Irrlicht


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk