poly2tri/wscript

70 lines
1.6 KiB
Plaintext
Raw Normal View History

2010-01-17 17:41:09 +01:00
VERSION='0.0.1'
import sys
APPNAME='p2t'
srcdir = '.'
blddir = 'build'
2010-01-19 23:23:38 +01:00
p2t_source_files = ['poly2tri/common/shapes.cc',
2010-04-25 18:40:54 +02:00
'poly2tri/sweep/cdt.cc',
2010-01-17 17:41:09 +01:00
'poly2tri/sweep/advancing_front.cc',
'poly2tri/sweep/sweep_context.cc',
2010-01-19 23:23:38 +01:00
'poly2tri/sweep/sweep.cc']
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
testbed_source_files = ['testbed/main.cc']
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
#Platform specific libs
if sys.platform == 'win32':
# MS Windows
sys_libs = ['glfw', 'opengl32']
2010-04-25 18:40:54 +02:00
elif sys.platform == 'darwin':
2010-01-17 17:41:09 +01:00
# Apple OSX
sys_libs = ['glfw', 'OpenGL']
else:
# GNU/Linux, BSD, etc
sys_libs = ['glfw', 'GL']
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
def init():
print(' init called')
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
def set_options(opt):
print(' set_options')
opt.tool_options('g++')
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
def configure(conf):
print(' calling the configuration')
conf.check_tool('g++')
2010-04-25 18:40:54 +02:00
#conf.env.CXXFLAGS = ['-O0', '-pg', '-g']
conf.env.CXXFLAGS = ['-O0', '-g']
#conf.env.CXXFLAGS = ['-O3', '-ffast-math']
2010-01-17 17:41:09 +01:00
def build(bld):
print(' building')
2010-04-25 18:40:54 +02:00
2010-02-10 13:14:38 +01:00
'''
2010-01-17 17:41:09 +01:00
# A static library
# The extension (.a) is added automatically
bld.new_task_gen(
2010-02-10 13:14:38 +01:00
features = 'cxx cshlib',
2010-01-17 17:41:09 +01:00
source = p2t_source_files,
name = 'poly2tri',
target = 'poly2tri')
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
# 1. A simple program
bld.new_task_gen(
features = 'cxx cprogram',
source = testbed_source_files,
target = 'p2t',
uselib_local = 'poly2tri',
libs = sys_libs)
'''
bld.new_task_gen(
features = 'cxx cprogram',
source = testbed_source_files + p2t_source_files,
target = 'p2t',
libs = sys_libs)
2010-04-25 18:40:54 +02:00
2010-01-17 17:41:09 +01:00
def shutdown():
print(' shutdown called')