summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cscript10
-rw-r--r--test/wscript6
-rw-r--r--wscript26
3 files changed, 25 insertions, 17 deletions
diff --git a/cscript b/cscript
index 5a2da6d1..f39a3773 100644
--- a/cscript
+++ b/cscript
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
+# Copyright (C) 2012-2022 Carl Hetherington <cth@carlh.net>
#
# This file is part of libdcp.
#
@@ -37,11 +37,11 @@ import shutil
option_defaults = { 'jpeg': 'oj2' }
def dependencies(target, options):
- libcxml = ('libcxml', 'v0.17.2')
+ libcxml = ('libcxml', '6c374a1fa54d7b9827500449275e5f454e2be292')
if options['jpeg'] == 'oj1':
- return (libcxml, ('openjpeg', 'f166257'), ('asdcplib', 'bb09615'))
+ return (libcxml, ('openjpeg', 'f166257'), ('asdcplib', '97918d86caf4b5a2296a0d3092f1e2e69b9af9e5'))
else:
- return (libcxml, ('openjpeg', 'a1403c2'), ('asdcplib', 'bb09615'))
+ return (libcxml, ('openjpeg', 'a1403c2'), ('asdcplib', '97918d86caf4b5a2296a0d3092f1e2e69b9af9e5'))
def build(target, options):
cmd = './waf configure --disable-examples --disable-benchmarks --prefix=%s' % target.directory
@@ -52,7 +52,7 @@ def build(target, options):
# We only build tests on Ubuntu 18.04
cmd += ' --disable-tests'
elif target.platform == 'windows':
- cmd += ' --target-windows --disable-gcov --disable-tests'
+ cmd += f' --target-windows-{target.bits} --disable-gcov --disable-tests'
if target.version == 'xp':
# OpenJPEG 1.x is inexplicably faster on Windows XP; see DCP-o-matic bug #771
cmd += ' --jpeg=oj1'
diff --git a/test/wscript b/test/wscript
index 29b3e487..62d258bf 100644
--- a/test/wscript
+++ b/test/wscript
@@ -32,8 +32,10 @@
#
def configure(conf):
- if conf.options.target_windows:
- boost_lib_suffix = '-mt'
+ if conf.options.target_windows_64:
+ boost_lib_suffix = '-mt-x64'
+ elif conf.options.target_windows_32:
+ boost_lib_suffix = '-mt-x32'
else:
boost_lib_suffix = ''
diff --git a/wscript b/wscript
index eee10843..71733e99 100644
--- a/wscript
+++ b/wscript
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+# Copyright (C) 2012-2022 Carl Hetherington <cth@carlh.net>
#
# This file is part of libdcp.
#
@@ -52,7 +52,8 @@ API_VERSION = '-1.0'
def options(opt):
opt.load('compiler_cxx')
- opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to Windows')
+ opt.add_option('--target-windows-64', action='store_true', default=False, help='set up to do a cross-compile to Windows 64-bit')
+ opt.add_option('--target-windows-32', action='store_true', default=False, help='set up to do a cross-compile to Windows 32-bit')
opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation')
opt.add_option('--static', action='store_true', default=False, help='build libdcp statically, and link statically to openjpeg, cxml, asdcplib-carl')
opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests')
@@ -72,7 +73,8 @@ def configure(conf):
conf.env.append_value('CXXFLAGS', ['-Wno-maybe-uninitialized'])
conf.env.append_value('CXXFLAGS', ['-DLIBDCP_VERSION="%s"' % VERSION])
- conf.env.TARGET_WINDOWS = conf.options.target_windows
+ conf.env.TARGET_WINDOWS_64 = conf.options.target_windows_64
+ conf.env.TARGET_WINDOWS_32 = conf.options.target_windows_32
conf.env.TARGET_OSX = sys.platform == 'darwin'
conf.env.TARGET_LINUX = not conf.env.TARGET_WINDOWS and not conf.env.TARGET_OSX
conf.env.ENABLE_DEBUG = conf.options.enable_debug
@@ -82,7 +84,7 @@ def configure(conf):
conf.env.STATIC = conf.options.static
conf.env.API_VERSION = API_VERSION
- if conf.env.TARGET_WINDOWS:
+ if conf.env.TARGET_WINDOWS_64 or conf.env.TARGET_WINDOWS_32:
conf.env.append_value('CXXFLAGS', '-DLIBDCP_WINDOWS')
if conf.env.TARGET_OSX:
conf.env.append_value('CXXFLAGS', '-DLIBDCP_OSX')
@@ -104,7 +106,7 @@ def configure(conf):
conf.env.append_value('LDFLAGS', ['-l%s' % conf.options.openmp])
conf.check_cxx(cxxflags='-fopenmp', msg='Checking that compiler supports -fopenmp')
- if not conf.env.TARGET_WINDOWS:
+ if not conf.env.TARGET_WINDOWS_64 and not conf.env.TARGET_WINDOWS_32:
conf.env.append_value('LINKFLAGS', '-pthread')
if conf.env.TARGET_LINUX:
@@ -159,13 +161,15 @@ def configure(conf):
conf.check_cfg(package='libcxml', atleast_version='0.17.0', args='--cflags --libs', uselib_store='CXML', mandatory=True)
conf.check_cfg(package='xerces-c', args='--cflags --libs', uselib_store='XERCES', mandatory=True)
- if conf.options.target_windows:
+ if conf.env.TARGET_WINDOWS_64 or conf.env.TARGET_WINDOWS_32:
# XXX: it feels like there should be a more elegant way to get these included
conf.env.LIB_XERCES.append('curl')
conf.env.LIB_XERCES.append('ws2_32')
- if conf.options.target_windows:
- boost_lib_suffix = '-mt'
+ if conf.options.target_windows_64:
+ boost_lib_suffix = '-mt-x64'
+ elif conf.options.target_windows_32:
+ boost_lib_suffix = '-mt-x32'
else:
boost_lib_suffix = ''
@@ -226,8 +230,10 @@ def configure(conf):
def build(bld):
create_version_cc(bld, VERSION)
- if bld.env.TARGET_WINDOWS:
- boost_lib_suffix = '-mt'
+ if bld.env.TARGET_WINDOWS_64:
+ boost_lib_suffix = '-mt-x64'
+ elif bld.env.TARGET_WINDOWS_32:
+ boost_lib_suffix = '-mt-x32'
else:
boost_lib_suffix = ''