]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - SConscript.module
- Updated Windows build doc, very slight revision. Changed 37 targets to 38.
[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' ):
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 useJPEG = True
48 useGtk = True
49 useZ = True
50 usePNG = True
51
52 settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ, usePNG = usePNG )
53 proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
54
55 # some filtering. may need to improve that
56 add_sources = []
57 ( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
58 if ( len( drop ) != 0 ):
59         add_sources.append( 'l_net_berkeley.c' )
60
61 module_base = env.SharedLibrary( os.path.join( 'modules', libname ), shlib_objects + [ os.path.join( libpath, i ) for i in files ] )
62 module = env.AddPostAction( module_base, utils.CheckUnresolved )
63
64 Return( 'module' )