From bb928b5f70520e8edc79c3af280bf1a3b55caf78 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 23 Sep 2025 22:46:27 +0200 Subject: Build fixes for 32-bit Windows. --- wscript | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 052bb014..b7eeb443 100644 --- a/wscript +++ b/wscript @@ -271,17 +271,21 @@ def configure(conf): conf.check_cfg(package='fmt', args='--cflags --libs', uselib_store='FMT', mandatory=True) conf.check_cxx(header_name="fast_float/fast_float.h", uselib_store='FAST_FLOAT', mandatory=True) - haru = conf.check_cc(fragment=""" - #include "hpdf.h"\n - int main() { HPDF_Doc pdf; return 0; }\n - """, - msg='Checking for haru library', - libpath='/usr/local/lib', - lib=['hpdf'], - uselib_store='HARU', - define_name='LIBDCP_HAVE_HARU', - mandatory=False) - + # Windows has a .pc file, and we must use it to get an import cflag (HPDF_DLL) without which + # the 32-bit link fails + haru = conf.check_cfg(package='libharu', args='--cflags --libs', uselib_store='HARU', define_name='LIBDCP_HAVE_HARU', mandatory=False) + if not haru: + # Nobody else ships a .pc file + haru = conf.check_cc(fragment=""" + #include "hpdf.h"\n + int main() { HPDF_Doc pdf; return 0; }\n + """, + msg='Checking for haru library', + libpath='/usr/local/lib', + lib=['hpdf'], + uselib_store='HARU', + define_name='LIBDCP_HAVE_HARU', + mandatory=False) if haru: conf.env.append_value('LIBDCP_HAVE_HARU', '1') -- cgit v1.2.3