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