]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - SConscript.module
misc fixes
[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 if ( libname == 'image' ):
17         useJPEG = True
18 if ( libname == 'surface' ):
19         useGtk = True
20 if ( libname == 'surface_quake2' ):
21         useGtk = True
22 if ( libname == 'surface_heretic2' ):
23         useGtk = True
24 if ( libname == 'bkgrnd2d' ):
25         useGtk = True
26 if ( libname == 'gtkgensurf' ):
27         useGtk = True
28 if ( libname == 'bobToolz_gtk' ):
29         useGtk = True
30 if ( libname == 'camera' ):
31         useGtk = True
32 if ( libname == 'PrtView' ):
33         useGtk = True
34 if ( libname == 'spritemodel' ):
35         useGtk = True
36 if ( libname == 'TexTool' ):
37         useGtk = True
38
39 settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG )
40 proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
41
42 # some filtering. may need to improve that
43 add_sources = []
44 ( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
45 if ( len( drop ) != 0 ):
46         add_sources.append( 'l_net_berkeley.c' )
47
48 module_base = env.SharedLibrary( os.path.join( 'modules', libname ), shlib_objects + [ os.path.join( libpath, i ) for i in files ] )
49 module = env.AddPostAction( module_base, utils.CheckUnresolved )
50
51 Return( 'module' )