[SCons] Include Boost import libraries in Windows installations
This commit is contained in:
parent
736fccf7ef
commit
fa27015468
2 changed files with 15 additions and 3 deletions
11
SConstruct
11
SConstruct
|
|
@ -793,7 +793,8 @@ env['HAS_UNISTD_H'] = conf.CheckCHeader('unistd.h', '""')
|
|||
env['HAS_MATH_H_ERF'] = conf.CheckDeclaration('erf', '#include <math.h>', 'C++')
|
||||
env['HAS_BOOST_MATH'] = conf.CheckCXXHeader('boost/math/special_functions/erf.hpp', '<>')
|
||||
boost_version_source = get_expression_value(['<boost/version.hpp>'], 'BOOST_LIB_VERSION')
|
||||
retcode, env['BOOST_LIB_VERSION'] = conf.TryRun(boost_version_source, '.cpp')
|
||||
retcode, boost_lib_version = conf.TryRun(boost_version_source, '.cpp')
|
||||
env['BOOST_LIB_VERSION'] = boost_lib_version.strip()
|
||||
|
||||
import SCons.Conftest, SCons.SConf
|
||||
ret = SCons.Conftest.CheckLib(SCons.SConf.CheckContext(conf),
|
||||
|
|
@ -1231,6 +1232,14 @@ if addInstallActions:
|
|||
pjoin('$inst_bindir','ctml_writer%s' % pyExt),
|
||||
'interfaces/python/ctml_writer.py')
|
||||
|
||||
# Copy external libaries for Windows installations
|
||||
if env['CC'] == 'cl':
|
||||
boost_suffix = '-vc%s-mt-%s.lib' % (env['MSVC_VERSION'].replace('.',''),
|
||||
env['BOOST_LIB_VERSION'])
|
||||
install('$inst_libdir', pjoin('$boost_lib_dir', 'libboost_date_time' + boost_suffix))
|
||||
install('$inst_libdir', pjoin('$boost_lib_dir', 'libboost_thread' + boost_suffix))
|
||||
|
||||
|
||||
### List of libraries needed to link to Cantera ###
|
||||
linkLibs = ['cantera']
|
||||
linkSharedLibs = ['cantera_shared']
|
||||
|
|
|
|||
|
|
@ -47,16 +47,19 @@ class WxsGenerator(object):
|
|||
#self.prefix: path to the parent directory
|
||||
directories = {}
|
||||
|
||||
# replace characters that are not valid in IDs
|
||||
clean = lambda s: s.replace('/', '_').replace('@', 'a').replace('-','_')
|
||||
|
||||
directories[directory] = self.Directory(parent, directory, directory)
|
||||
for path, dirs, files in os.walk('/'.join((self.prefix, directory))):
|
||||
path = path.replace(self.prefix + '/', '', 1).replace('\\', '/')
|
||||
for d in dirs:
|
||||
dpath = '/'.join((path, d))
|
||||
ID = dpath.replace('/', '_').replace('@', 'a')
|
||||
ID = clean(dpath)
|
||||
directories[dpath] = self.Directory(directories[path], ID, d)
|
||||
|
||||
for f in files:
|
||||
ID = '_'.join((path, f)).replace('/', '_').replace('@', 'a')
|
||||
ID = clean('_'.join((path, f)))
|
||||
self.FileComponent(directories[path], ID, ID, f,
|
||||
'/'.join((self.prefix, path, f)))
|
||||
et.SubElement(feature, 'ComponentRef', dict(Id=ID))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue