Fix missing parameters to pkg-config for libopenjp2.
[libdcp.git] / wscript
diff --git a/wscript b/wscript
index d813c536b42560f4acc0f4bc9c847f0d7a51bab1..bd17e61998e27f29b1ee832bba12661231deb82a 100644 (file)
--- a/wscript
+++ b/wscript
@@ -131,7 +131,8 @@ def configure(conf):
             image = conf.check_cfg(package='ImageMagick++', args='--cflags --libs', uselib_store='MAGICK', mandatory=False)
             graphics = conf.check_cfg(package='GraphicsMagick++', args='--cflags --libs', uselib_store='MAGICK', mandatory=False)
             if image is None and graphics is None:
-                Logs.error('Neither ImageMagick++ nor GraphicsMagick++ found: one or the other is required unless you ./waf configure --disable-examples --disable-dcpdumpimage')
+                Logs.error('Neither ImageMagick++ nor GraphicsMagick++ found: one or the other is required unless you ./waf configure --disable-examples --disable-dumpimage')
+                sys.exit(1)
 
     conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=False)
 
@@ -152,7 +153,7 @@ def configure(conf):
 
     if not patched_openjpeg:
         # We don't have our patched version so we need 2.5.0 to get the GUARD_BITS option
-        conf.check_cfg(package='libopenjp2', args='libopenjp2 >= 2.5.0', uselib_store='OPENJPEG', mandatory=True, msg='Checking for libopenjp2 >= 2.5.0')
+        conf.check_cfg(package='libopenjp2', args='libopenjp2 >= 2.5.0 --cflags --libs', uselib_store='OPENJPEG', mandatory=True, msg='Checking for libopenjp2 >= 2.5.0')
 
     if conf.options.static:
         conf.env.STLIB_OPENJPEG = ['openjp2']