Permalink
Browse files

* fixed libpng linkage (2nd try)

  • Loading branch information...
1 parent 5695678 commit 271807af0c650c688d6805e82221c068aa39dea0 mattn committed Mar 19, 2008
Showing with 10 additions and 6 deletions.
  1. +5 −3 SConscript.module
  2. +5 −3 config.py
View
@@ -14,6 +14,7 @@ env = Environment()
useJPEG = False
useGtk = False
useZ = False
+usePNG = False
if ( libname == 'image' ):
useJPEG = True
if ( libname == 'surface' ):
@@ -40,10 +41,11 @@ if ( libname == 'model' ):
useGtk = True
if ( libname == 'TexTool' ):
useGtk = True
-#if ( libname == 'imagepng' ):
-# useZ = True
+if ( libname == 'imagepng' ):
+ usePNG = True
-settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ )
+
+settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ, usePNG = usePNG )
proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
# some filtering. may need to improve that
View
@@ -106,8 +106,7 @@ def emit_radiant( self ):
'plugins/entity/entity.vcproj',
'plugins/image/image.vcproj',
'plugins/model/model.vcproj',
- # FIXME: Fix linker flags - xml2, z
- # 'plugins/imagepng/imagepng.vcproj',
+ 'plugins/imagepng/imagepng.vcproj',
'plugins/imagewal/imagewal.vcproj',
'plugins/imagem8/imagem8.vcproj',
'plugins/spritemodel/spritemodel.vcproj',
@@ -183,7 +182,7 @@ def emit( self ):
else:
self.emit_q3map2()
- def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useJPEG = False, useZ = False ):
+ def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useJPEG = False, useZ = False, usePNG = False ):
env['CC'] = self.cc
env['CXX'] = self.cxx
( ret, xml2 ) = commands.getstatusoutput( 'xml2-config --cflags' )
@@ -226,6 +225,9 @@ def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useJP
env.Append( LINKFLAGS = gtkgllibs.split( ' ' ) )
if ( useJPEG ):
env.Append( LIBS = 'jpeg' )
+ if ( usePNG ):
+ pnglibs = 'png z'
+ env.Append( LIBS = pnglibs.split( ' ' ) )
if ( useZ ):
env.Append( LIBS = 'z' )

0 comments on commit 271807a

Please sign in to comment.