summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-10 17:09:25 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-10 17:09:25 +0100
commitd915fd0a238cc1bb9a0cb8824ac4cc81a1d1eab8 (patch)
treed16940b0bbee2a3c2d0684721477d7dbb0a9e07c /wscript
parent0fc9be381e709178d83dd5a23327241859d57ce1 (diff)
Attempt to fix built with new glibmm automatically rather than having to be told.
Diffstat (limited to 'wscript')
-rw-r--r--wscript11
1 files changed, 10 insertions, 1 deletions
diff --git a/wscript b/wscript
index 6ae1e995d..867b0385e 100644
--- a/wscript
+++ b/wscript
@@ -23,7 +23,7 @@ import sys
import glob
import distutils
import distutils.spawn
-from waflib import Logs
+from waflib import Logs, Context
APPNAME = 'dcpomatic'
VERSION = '2.4.6devel'
@@ -372,6 +372,15 @@ def configure(conf):
lib=['boost_regex%s' % boost_lib_suffix],
uselib_store='BOOST_REGEX')
+ # libxml++ requires glibmm and versions of glibmm 2.45.31 and later
+ # must be built with -std=c++11 as they use c++11
+ # features and c++11 is not (yet) the default in gcc.
+ glibmm_version = conf.cmd_and_log(['pkg-config', '--modversion', 'glibmm-2.4'], output=Context.STDOUT, quiet=Context.BOTH)
+ s = glibmm_version.split('.')
+ v = (int(s[0]) << 16) | (int(s[1]) << 8) | int(s[2])
+ if v >= 0x022D1F:
+ conf.env.append_value('CXXFLAGS', '-std=c++11')
+
# Other stuff
conf.find_program('msgfmt', var='MSGFMT')