diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-24 11:51:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-24 11:51:42 +0100 |
| commit | 4bbf23f815dfb05ace6c699595edb0908187a421 (patch) | |
| tree | daa500f11240050708542d78d585ceb7b7ffcc95 | |
| parent | 467a88f5def3c5c4b9be363e28fba77fef8f22c2 (diff) | |
Fix confused checks for Image/GraphicsMagick in wscript. Add missing InitializeMagick() call, fixing crash on loading still images.
| -rw-r--r-- | src/lib/util.cc | 7 | ||||
| -rw-r--r-- | wscript | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 92b3b22fd..bb74c168d 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -46,6 +46,9 @@ extern "C" { #include <libavcodec/avcodec.h> } #include <curl/curl.h> +#ifdef DCPOMATIC_GRAPHICS_MAGICK +#include <Magick++.h> +#endif #include <glib.h> #include <pangomm/init.h> #include <boost/algorithm/string.hpp> @@ -346,6 +349,10 @@ dcpomatic_setup () curl_global_init (CURL_GLOBAL_ALL); +#ifdef DCPOMATIC_GRAPHICS_MAGICK + Magick::InitializeMagick (0); +#endif + ui_thread = boost::this_thread::get_id (); } @@ -192,7 +192,9 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_IMAGE_MAGICK') 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) + graphics = None + if image is None: + graphics = conf.check_cfg(package='GraphicsMagick++', args='--cflags --libs', uselib_store='MAGICK', mandatory=False) if image is None and graphics is None: Logs.pprint('RED', 'Neither ImageMagick++ nor GraphicsMagick++ found: one or the other is required') if image is not None: |
