fix crash during first-run configuration of the application, caused by using an incom...
[ardour.git] / libs / ptformat / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 import os
4
5 # Version of this package (even if built as a child)
6 LIBPTFORMAT_VERSION = '0.0.0'
7
8 # Library version (UNIX style major, minor, micro)
9 # major increment <=> incompatible changes
10 # minor increment <=> compatible changes (additions)
11 # micro increment <=> no interface changes
12 LIBPTFORMAT_LIB_VERSION = '0.0.0'
13
14 # Variables for 'waf dist'
15 APPNAME = 'libptformat'
16 VERSION = LIBPTFORMAT_VERSION
17 I18N_PACKAGE = 'libptformat'
18
19 # Mandatory variables
20 top = '.'
21 out = 'build'
22
23 def options(opt):
24     autowaf.set_options(opt)
25
26 def configure(conf):
27     conf.load('compiler_cxx')
28     autowaf.configure(conf)
29
30 def build(bld):
31     # Library
32     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
33         obj = bld.shlib (features = 'cxx cxxshlib', source = [ 'ptfformat.cc' ])
34         obj.defines = [ 'LIBPTFORMAT_DLL_EXPORTS=1' ]
35     else:
36         obj = bld.stdlib (source = [ 'ptfformat.cc' ])
37         obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
38         obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
39         
40     obj.export_includes     = ['.']
41     obj.includes     = ['.']
42     obj.name         = 'libptformat'
43     obj.target       = 'ptformat'
44     obj.use          = 'libpbd'
45     obj.vnum         = LIBPTFORMAT_LIB_VERSION
46     obj.install_path = bld.env['LIBDIR']
47     obj.defines     += [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
48     
49 def shutdown():
50     autowaf.shutdown()