#
-# Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
+# Copyright (C) 2012-2022 Carl Hetherington <cth@carlh.net>
#
# This file is part of libdcp.
#
option_defaults = { 'jpeg': 'oj2' }
def dependencies(target, options):
- libcxml = ('libcxml', 'v0.17.2')
+ libcxml = ('libcxml', 'v0.17.3')
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
# 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'
#
-# Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+# Copyright (C) 2012-2022 Carl Hetherington <cth@carlh.net>
#
# This file is part of libdcp.
#
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')
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
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')
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:
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 = ''
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 = ''