File: SConscript.luarlvm

package info (click to toggle)
rlvm 0.12-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 16,348 kB
  • sloc: cpp: 92,030; ansic: 39,532; perl: 768; python: 181; sh: 171; makefile: 7
file content (60 lines) | stat: -rw-r--r-- 1,745 bytes parent folder | download
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
55
56
57
58
59
60
# Main scons file

import shutil
import sys

Import('env')

########################################################## [ Root environment ]
test_env = env.Clone()
test_env.Append(
  CPPDEFINES = [
    "CASE_SENSITIVE_FILESYSTEM",
    "_THREAD_SAFE"
  ],
  CXXFLAGS = [
    "--ansi",
  ]
)

if test_env['PLATFORM'] == 'darwin':
  test_env.Append(FRAMEWORKS=["OpenGL"])
else:
  test_env.Append(LIBS=["GL", "GLU"])
test_env.ParseConfig("sdl-config --libs")

test_env.Append(CPPPATH = ["#/test"])

config = test_env.Configure()

# Building the luaRlvm test harness requires having lua installed; if we do
# have lua installed, go ahead and use it, but don't really worry if this fails
# since end users don't use this binary.
if config.CheckLibWithHeader('lua5.1', 'lua5.1/lua.h', 'cpp'):
  env['BUILD_LUA_TESTS'] = True
else:
  print "Not building luaRlvm. (Don't worry, it's only a testing tool!)"

test_env = config.Finish()

script_machine_files = [
  "test/ScriptMachine/ScriptMachine.cpp",
  "test/ScriptMachine/ScriptWorld.cpp",
  "test/ScriptMachine/luabind_EventSystem.cpp",
  "test/ScriptMachine/luabind_GraphicsObject.cpp",
  "test/ScriptMachine/luabind_GraphicsSystem.cpp",
  "test/ScriptMachine/luabind_Machine.cpp",
  "test/ScriptMachine/luabind_System.cpp",
  "test/ScriptMachine/luabind_utility.cpp"
]

if env['BUILD_LUA_TESTS'] == True:
  test_env.Append(CPPPATH = [ "/usr/include/lua5.1" ] )

  # Build our included copy of luabind.
  test_env.ParseConfig ("pkg-config luabind --cflags --libs")

  test_env.RlvmProgram("luaRlvm", ['test/luaRlvm.cpp', script_machine_files],
                       use_lib_set = ["SDL", "LUA"],
                       rlvm_libs = ["system_sdl", "rlvm"])
  test_env.Install('$OUTPUT_DIR', 'luaRlvm')