* add the soleil pom.xml file
[diffractometer.git] / wscript
blob491aa76dfb2d2a90aa6559055442b5d848243685
1 #! /usr/bin/env python
2 # encoding: utf-8
3 # Thomas Nagy, 2006-2008 (ita)
5 import Options
7 # the following two variables are used by the target "waf dist"
8 VERSION='3.1.0'
9 APPNAME='ds_Diffractometer'
11 # these variables are mandatory ('/' are converted automatically)
12 srcdir = '.'
13 blddir = 'build'
15 def set_options(opt):
16 opt.tool_options('compiler_cxx')
17 opt.add_option('--soleil', action='store_true', default=False, help='Build for the Soleil site')
19 def configure(conf):
20 conf.check_tool('compiler_cxx')
21 conf.add_os_flags('LIBPATH_TANGO')
22 conf.add_os_flags('CPPPATH_TANGO')
23 if Options.options.soleil:
24 conf.env['LIB_HKL'] = ['hkl', 'GSL', 'GSLcblas']
25 #conf.env['LIBPATH_HKL'] = '${SOLEIL_ROOT}/sw-support/HKL/lib'
26 #conf.env['INCPATH_HKL'] = '${SOLEIL_ROOT}/sw-support/HKL/include'
27 prefix = '${HOME}/projects/'
28 conf.env['LIBPATH_HKL'] = [prefix + 'hkl/build/default/src',
29 '${SOLEIL_ROOT}/sw-support/GSL/lib']
30 conf.env['CPPPATH_HKL'] = [prefix + 'hkl/include',
31 '${SOLEIL_ROOT}/sw-support/GSL/include']
32 conf.env['RPATH_HKL'] = [prefix + 'hkl/build/default/src']
33 conf.env['LIB_TANGO'] = ['log4tango', 'tango', 'COSDynamic4', 'COS4', 'omnithread', 'omniORB4']
34 conf.env['LIBPATH_TANGO'] = ['${SOLEIL_ROOT}/sw-support/Tango/lib',
35 '${SOLEIL_ROOT}/sw-support/OmniORB/lib']
36 conf.env['CPPPATH_TANGO'] = ['${SOLEIL_ROOT}/sw-support/Tango/include',
37 '${SOLEIL_ROOT}/sw-support/OmniORB/include']
38 else:
39 conf.check_cfg(atleast_pkgconfig_version='0.0.0')
40 conf.check_cfg(package='hkl', args='--cflags --libs')
42 #tango < 7.0.0 do not have a pkgconfig file
43 if conf.env['LIBPATH_TANGO'] or conf.env['CPPPATH_TANGO']:
44 conf.env['LIB_TANGO'] = ['log4tango', 'tango']
45 else:
46 conf.check_cfg(package='tango', args='--cflags --libs')
48 def build(bld):
49 bld.add_subdirs('src')