summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-14 16:09:26 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-16 20:09:41 +0100
commit7f1a89fce5c87c5328c53d031f24dc979caf56ab (patch)
treedb8023bdcfe85ea2087906c5026884b867a584f1
parent6daa16d2893d0c0d9cd8433f3a03f76c76f031de (diff)
Build with C++17 also on Debian Unstable.v1.10.15
-rw-r--r--cscript7
-rw-r--r--wscript4
2 files changed, 8 insertions, 3 deletions
diff --git a/cscript b/cscript
index 0d9fb622..38282c06 100644
--- a/cscript
+++ b/cscript
@@ -34,9 +34,12 @@
import os
import shutil
+def build_with_cpp17(target):
+ return target.platform.startswith('osx') or (target.platform == 'linux' and target.distro == 'debian' and target.version == 'unstable')
+
def dependencies(target, options):
deps = [
- ('libcxml', 'v0.17.13', { 'c++17': target.platform.startswith('osx') }),
+ ('libcxml', 'v0.17.13', { 'c++17': build_with_cpp17(target) }),
('openjpeg', 'ad8edaacd54a862940d0a77c41ecda5858b54d6e'),
('asdcplib', 'v1.0.5')
]
@@ -64,7 +67,7 @@ def build(target, options):
elif target.platform == 'windows':
cmd += f' --target-windows-{target.bits}'
- if ('c++17' in options and options['c++17']) or target.platform.startswith('osx'):
+ if ('c++17' in options and options['c++17']) or build_with_cpp17(target):
cmd += ' --c++17'
if target.debug:
diff --git a/wscript b/wscript
index 1fcdd119..c162011b 100644
--- a/wscript
+++ b/wscript
@@ -77,9 +77,11 @@ def configure(conf):
if vars(conf.options)['c++17']:
cpp_std = '17'
conf.env.XMLPP_API = '4.0'
+ conf.env.GLIBMM_API = '2.68'
else:
cpp_std = '11'
conf.env.XMLPP_API = '2.6'
+ conf.env.GLIBMM_API = '2.4'
conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-D_FILE_OFFSET_BITS=64', '-D__STDC_FORMAT_MACROS', '-std=c++' + cpp_std])
gcc = conf.env['CC_VERSION']
@@ -174,7 +176,7 @@ def configure(conf):
conf.env.HAVE_ASDCPLIB_DCPOMATIC = 1
conf.env.STLIB_ASDCPLIB_DCPOMATIC = ['asdcp-dcpomatic', 'kumu-dcpomatic']
conf.env.HAVE_CXML = 1
- conf.env.LIB_CXML = ['xml++-' + conf.env.XMLPP_API, 'glibmm-2.4']
+ conf.env.LIB_CXML = ['xml++-' + conf.env.XMLPP_API, 'glibmm-' + conf.env.GLIBMM_API]
conf.env.STLIB_CXML = ['cxml']
conf.check_cfg(package='xerces-c', args='--cflags', uselib_store='XERCES', mandatory=True)
conf.env.LIB_XERCES = ['xerces-c', 'icuuc', 'curl']