summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorBenjamin Radel <benjamin@radel.tk>2024-06-28 21:56:36 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-29 00:58:28 +0200
commit6ddd3e5bbc1c5668c90595217a4a50b986384049 (patch)
treecb5c5be054efbb82f781ef7143c193bfd4940383 /wscript
parent3dbe0b9ff88a16b938ad6adf2c26179e278fa712 (diff)
Make DCPoMatic compatible with ICU >= 75
ICU >= 75 uses c++17 features and therefore requires compilation with -std=c++17. However, this causes some namespace issues in src/wx/file_picker_ctrl.cc and src/wx/film_name_location_dialog.cc between boost::optional, boost::filesystem and the corresponding names from the std lib. The patch fixes this namespace issues and adds a version check in wscript to enable compilation with c++17, if icu >= 75 is detected.
Diffstat (limited to 'wscript')
-rw-r--r--wscript6
1 files changed, 6 insertions, 0 deletions
diff --git a/wscript b/wscript
index 5aeb4f1c3..744e45416 100644
--- a/wscript
+++ b/wscript
@@ -252,6 +252,12 @@ def configure(conf):
lib=['icuio', 'icui18n', 'icudata', 'icuuc'],
uselib_store='ICU')
+ # If ICU version > 75 we need stdc++17, otherwise we stick with stdc++11
+ if (conf.check_cfg(modversion='icu-i18n') >= '75'):
+ conf.env.append_value('CXXFLAGS', '-std=c++17')
+ else:
+ conf.env.append_value('CXXFLAGS', '-std=c++11')
+
# libsamplerate
conf.check_cfg(package='samplerate', args='--cflags --libs', uselib_store='SAMPLERATE', mandatory=True)