-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSConstruct
More file actions
55 lines (44 loc) · 2.02 KB
/
SConstruct
File metadata and controls
55 lines (44 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# A Linux Ogre/CEGUI/OIS/OgreOde build Script by Grey, with many thanks to keir from #scons on freenode.
# Setup our Build Environment, Smarter scripts might be able to change this at the command line,
env = Environment(
CCFLAGS='-ggdb -pg -g3 -DEXT_HASH',
LDFLAGS='-pg'
)
# Our External Libs
# Got some fugly stuff ( || true ) in there to supress unreadable crashes, it
# ends up using the nicer formatted error messages below
env.ParseConfig('pkg-config --silence-errors --libs --cflags OGRE || true')
env.ParseConfig('pkg-config --silence-errors --libs --cflags OIS || true')
#env.ParseConfig('pkg-config --silence-errors --libs --cflags CEGUI-OGRE || true')
#env.ParseConfig('pkg-config --silence-errors --libs --cflags OgreOde_Core || true')
# Get out current config so we can verify we have everything we need.
# There is an autoadd method here, but then we'd have to specify full paths for
# the libs and headers, which is lame.
config = Configure(env);
# Everyone needs OIS :)
if not config.CheckLibWithHeader('OIS', 'OISPrereqs.h', 'C++'):
print 'OIS must be installed!'
Exit(1)
# this should work to get Ogre included
if not config.CheckLibWithHeader( 'OgreMain', 'Ogre.h', 'C++' ):
print "Ogre Must be installed!"
Exit(1)
# # Any other component libraries you use can be added and tested in this manner
# if not config.CheckLibWithHeader( 'OgreOde_Core', 'OgreOde_Core.h', 'C++'):
# print 'OgreOde must be installed!'
# Exit(1);
# # Substitute with your GUI of choice
# if not config.CheckLibWithHeader('CEGUIBase', 'CEGUI.h', 'C++'):
# print "You need CEGUI to compile this program"
# Exit(1);
# if not config.CheckLibWithHeader('CEGUIOgreRenderer', 'OgreCEGUIRenderer.h', 'C++'):
# print "You need OGRE-CEGUI to compile this program"
# Exit(1);
# Validate the configuration and assign it to our env
env = config.Finish();
# Build our main program
env.Program(
target = 'main',
# Replace these with your source files of course
source = [
'Main.cpp', 'Game.cpp', 'Input.cpp', 'GameState.cpp', 'PlayState.cpp'])