]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - SConscript.module
textool fix (Markus Fischer)
[xonotic/netradiant.git] / SConscript.module
1 # -*- mode: python -*-
2 # ZeroRadiant build scripts
3 # TTimo <ttimo@idsoftware.com>
4 # http://scons.sourceforge.net
5
6 import os
7
8 Import( [ 'utils', 'config', 'settings', 'project', 'shlib_objects' ] )
9
10 ( libpath, libname ) = os.path.split( project )
11 libname = os.path.splitext( libname )[0]
12
13 env = Environment()
14 useJPEG = False
15 useGtk = False
16 useZ = False
17 usePNG = False
18 if ( libname == 'image' ):
19         useJPEG = True
20 if ( libname == 'surface' ):
21         useGtk = True
22 if ( libname == 'surface_ufoai' ):
23         useGtk = True
24 if ( libname == 'surface_quake2' ):
25         useGtk = True
26 if ( libname == 'surface_heretic2' ):
27         useGtk = True
28 if ( libname == 'bkgrnd2d' ):
29         useGtk = True
30 if ( libname == 'gtkgensurf' ):
31         useGtk = True
32 if ( libname == 'bobToolz_gtk' ):
33         useGtk = True
34 if ( libname == 'camera' ):
35         useGtk = True
36 if ( libname == 'PrtView' ):
37         useGtk = True
38 if ( libname == 'spritemodel' ):
39         useGtk = True
40 if ( libname == 'model' ):
41         useGtk = True
42 if ( libname == 'TexTool' ):
43         useGtk = True
44 if ( libname == 'imagepng' ):
45         usePNG = True
46
47
48 settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ, usePNG = usePNG )
49 proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
50
51 # some filtering. may need to improve that
52 add_sources = []
53 ( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
54 if ( len( drop ) != 0 ):
55         add_sources.append( 'l_net_berkeley.c' )
56
57 module_base = env.SharedLibrary( os.path.join( 'modules', libname ), shlib_objects + [ os.path.join( libpath, i ) for i in files ] )
58 module = env.AddPostAction( module_base, utils.CheckUnresolved )
59
60 Return( 'module' )