gtkradiant/SConscript.module
mattn 62a2a92b5c * fixed libpng linkage (2nd try)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@231 8a3a26a2-13c4-0310-b231-cf6edde360e5
2008-03-19 07:20:06 +00:00

60 lines
1.6 KiB
Python

# -*- mode: python -*-
# ZeroRadiant build scripts
# TTimo <ttimo@idsoftware.com>
# http://scons.sourceforge.net
import os
Import( [ 'utils', 'config', 'settings', 'project', 'shlib_objects' ] )
( libpath, libname ) = os.path.split( project )
libname = os.path.splitext( libname )[0]
env = Environment()
useJPEG = False
useGtk = False
useZ = False
usePNG = False
if ( libname == 'image' ):
useJPEG = True
if ( libname == 'surface' ):
useGtk = True
if ( libname == 'surface_ufoai' ):
useGtk = True
if ( libname == 'surface_quake2' ):
useGtk = True
if ( libname == 'surface_heretic2' ):
useGtk = True
if ( libname == 'bkgrnd2d' ):
useGtk = True
if ( libname == 'gtkgensurf' ):
useGtk = True
if ( libname == 'bobToolz_gtk' ):
useGtk = True
if ( libname == 'camera' ):
useGtk = True
if ( libname == 'PrtView' ):
useGtk = True
if ( libname == 'spritemodel' ):
useGtk = True
if ( libname == 'model' ):
useGtk = True
if ( libname == 'TexTool' ):
useGtk = True
if ( libname == 'imagepng' ):
usePNG = True
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
add_sources = []
( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
if ( len( drop ) != 0 ):
add_sources.append( 'l_net_berkeley.c' )
module_base = env.SharedLibrary( os.path.join( 'modules', libname ), shlib_objects + [ os.path.join( libpath, i ) for i in files ] )
module = env.AddPostAction( module_base, utils.CheckUnresolved )
Return( 'module' )