]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
* fixed libpng linkage (2nd try)
authormattn <mattn>
Wed, 19 Mar 2008 07:20:06 +0000 (07:20 +0000)
committermattn <mattn>
Wed, 19 Mar 2008 07:20:06 +0000 (07:20 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@231 8a3a26a2-13c4-0310-b231-cf6edde360e5

SConscript.module
config.py

index 06ac53856d4bd9f6926be3fbb67a51701dc81af0..a7f254970dc45fdacb39923219c7db362510c4f7 100644 (file)
@@ -14,6 +14,7 @@ env = Environment()
 useJPEG = False
 useGtk = False
 useZ = False
 useJPEG = False
 useGtk = False
 useZ = False
+usePNG = False
 if ( libname == 'image' ):
        useJPEG = True
 if ( libname == 'surface' ):
 if ( libname == 'image' ):
        useJPEG = True
 if ( libname == 'surface' ):
@@ -40,10 +41,11 @@ if ( libname == 'model' ):
        useGtk = True
 if ( libname == 'TexTool' ):
        useGtk = True
        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
 proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
 
 # some filtering. may need to improve that
index 0006de3b41f2252f202e7d7b92e86d54a5726200..6493c01bd141a794da353aca7837bc11b26d2659 100644 (file)
--- a/config.py
+++ b/config.py
@@ -106,8 +106,7 @@ class Config:
                                         'plugins/entity/entity.vcproj',
                                         'plugins/image/image.vcproj',
                                         'plugins/model/model.vcproj',
                                         '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',
                                         'plugins/imagewal/imagewal.vcproj',
                                         'plugins/imagem8/imagem8.vcproj',
                                         'plugins/spritemodel/spritemodel.vcproj',
@@ -183,7 +182,7 @@ class Config:
                else:
                        self.emit_q3map2()
 
                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' )
                env['CC'] = self.cc
                env['CXX'] = self.cxx
                ( ret, xml2 ) = commands.getstatusoutput( 'xml2-config --cflags' )
@@ -226,6 +225,9 @@ class Config:
                        env.Append( LINKFLAGS = gtkgllibs.split( ' ' ) )
                if ( useJPEG ):
                        env.Append( LIBS = 'jpeg' )
                        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' )
 
                if ( useZ ):
                        env.Append( LIBS = 'z' )