Mercurial > fife-parpg
comparison tests/core_tests/SConscript @ 378:64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
author | vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 11 Jan 2010 23:34:52 +0000 |
parents | 5a2db5e7ab54 |
children |
comparison
equal
deleted
inserted
replaced
377:fe6fb0e0ed23 | 378:64738befdf3b |
---|---|
1 import glob, sys | 1 import os,sys |
2 from utils.util_scripts.path import path as upath | |
2 | 3 |
3 Import('env') | 4 Import('env', 'opts') |
4 | 5 |
5 env = env.Copy() | 6 if env.has_key('LIBS'): |
6 env.Append(CPPPATH = ['#/engine/core']) | 7 libs = list(env['LIBS']) |
7 env.Append(LIBPATH = ['#/engine/core']) | 8 libs.append(opts['TESTLIBS']) |
9 else: | |
10 libs = "" | |
8 | 11 |
9 env.Append(LIBS = ['libfife','libUnitTest++']) | 12 if env.has_key('LIBPATH'): |
13 lib_path = list(env['LIBPATH']) | |
14 lib_path.append(opts['LIBPATH']) | |
15 else: | |
16 lib_path = "" | |
10 | 17 |
11 if sys.platform == 'darwin': | 18 source_path = opts['SRC'] |
12 env.Append(LIBPATH = ['/System/Library']) | 19 |
13 env.Append(LINKFLAGS='-framework SDL') | 20 if env.has_key('CPPPATH'): |
14 env.Append(LINKFLAGS='-framework SDL_image') | 21 core_path = list(env['CPPPATH']) |
15 env.Append(LINKFLAGS='-framework SDL_ttf') | 22 core_path.append(os.path.join(source_path, 'core')) |
16 env.Append(LINKFLAGS=['-Wl']) | |
17 else: | 23 else: |
18 env.Append(LINKFLAGS=['-Wl,-rpath,../../ext/install/lib,-rpath,../../engine']) | 24 core_path = "" |
19 | 25 |
20 # The test_fife.py script relies on this specific layout. | 26 Alias('test_dat1', |
21 # Check it, if you change something here | 27 env.Program('test_dat1', |
22 env.Program('testprog_rect', ['test_rect.cpp']) | 28 'test_dat1.cpp', |
23 env.Program('testprog_dat1', ['test_dat1.cpp']) | 29 CPPPATH=core_path, |
24 env.Program('testprog_dat2', ['test_dat2.cpp']) | 30 LIBS=libs, |
25 env.Program('testprog_gui', ['test_gui.cpp']) | 31 LIBPATH=lib_path)) |
26 env.Program('testprog_images', ['test_images.cpp']) | |
27 env.Program('testprog_imagepool', ['test_imagepool.cpp']) | |
28 env.Program('testprog_vfs', ['test_vfs.cpp']) | |
29 | 32 |
33 Alias('test_dat2', | |
34 env.Program('test_dat2', | |
35 'test_dat2.cpp', | |
36 CPPPATH=core_path, | |
37 LIBS=libs, | |
38 LIBPATH=lib_path)) | |
30 | 39 |
31 if env['zip']: | 40 Alias('test_gui', |
32 env.Program('testprog_zip', ['test_zip.cpp']) | 41 env.Program('test_gui', |
42 'test_gui.cpp', | |
43 CPPPATH=core_path, | |
44 LIBS=libs, | |
45 LIBPATH=lib_path)) | |
33 | 46 |
34 # vim: set filetype=python : | 47 Alias('test_imagepool', |
48 env.Program('test_imagepool', | |
49 'test_imagepool.cpp', | |
50 CPPPATH=core_path, | |
51 LIBS=libs, | |
52 LIBPATH=lib_path)) | |
53 | |
54 Alias('test_images', | |
55 env.Program('test_images', | |
56 'test_images.cpp', | |
57 CPPPATH=core_path, | |
58 LIBS=libs, | |
59 LIBPATH=lib_path)) | |
60 | |
61 Alias('test_rect', | |
62 env.Program('test_rect', | |
63 'test_rect.cpp', | |
64 CPPPATH=core_path, | |
65 LIBS=libs, | |
66 LIBPATH=lib_path)) | |
67 | |
68 Alias('test_vgs', | |
69 env.Program('test_vfs', | |
70 'test_vfs.cpp', | |
71 CPPPATH=core_path, | |
72 LIBS=libs, | |
73 LIBPATH=lib_path)) | |
74 | |
75 Alias('test_zip', | |
76 env.Program('test_zip', | |
77 'test_zip.cpp', | |
78 CPPPATH=core_path, | |
79 LIBS=libs, | |
80 LIBPATH=lib_path)) | |
81 | |
82 Alias('tests', ['test_dat1','test_dat2','test_gui','test_imagepool','test_images','test_rect','test_vfs','test_zip']) |