Don't look for ImageMagick/GraphicsMagick if not building examples.
authorCarl Hetherington <cth@carlh.net>
Sat, 19 Feb 2022 22:27:37 +0000 (23:27 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 19 Feb 2022 22:28:40 +0000 (23:28 +0100)
README.md
wscript

index e03f4fb4dcdab8128a030d7d6336935c17c6d6b1..337ce3cde2a6bcd858a5ceed7bf8ea5df06a8113 100644 (file)
--- a/README.md
+++ b/README.md
@@ -29,11 +29,11 @@ Bugfixes were received from Philip Tschiemer.
 - libsigc++
 - libxml++
 - xmlsec
-- ImageMagick or GraphicsMagick
 - sndfile
 - openjpeg (1.5.0 or above)
 - [libasdcp-cth](https://github.com/cth103/asdcplib-cth/tree/cth)
 - [libcxml](https://github.com/cth103/libcxml)
+- (optional) ImageMagick or GraphicsMagick (for examples)
 - (optional) OpenMP
 - (optional) gcov (for tests)
 
diff --git a/wscript b/wscript
index 97b7bf25e5d0ed930b2199ab19ceee6d0239345e..eee10843e0bcadfc3b6915bbd7f1fb01b49a81b8 100644 (file)
--- a/wscript
+++ b/wscript
@@ -124,13 +124,14 @@ def configure(conf):
     conf.env.DEFINES_XMLSEC1 = [f.replace('\\', '') for f in conf.env.DEFINES_XMLSEC1]
 
     # ImageMagick / GraphicsMagick
-    if distutils.spawn.find_executable('Magick++-config'):
-        conf.check_cfg(package='', path='Magick++-config', args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True, msg='Checking for ImageMagick/GraphicsMagick')
-    else:
-        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')
+    if not conf.options.disable_examples:
+        if distutils.spawn.find_executable('Magick++-config'):
+            conf.check_cfg(package='', path='Magick++-config', args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True, msg='Checking for ImageMagick/GraphicsMagick')
+        else:
+            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')
 
     conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=False)