meson: gl: find libjpeg via pkg-config
authorTim-Philipp Müller <tim@centricular.com>
Thu, 16 Aug 2018 10:08:38 +0000 (11:08 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 16 Aug 2018 10:09:51 +0000 (11:09 +0100)
This effectively (but optionally) requires libjpeg-turbo which
ships with a .pc file and is what pretty much everyone these days
uses anyway for libjpeg, so shouldn't be a problem hopefully.

https://bugzilla.gnome.org/show_bug.cgi?id=796947

ext/gl/meson.build

index 7eba0b3..eda2bf4 100644 (file)
@@ -72,10 +72,7 @@ if graphene_dep.found()
 endif
 
 png_dep = dependency('libpng', version : '>=1.0', required : get_option('gl-png'))
-jpeg_dep = cc.find_library('jpeg-mmx', required : false)
-if not jpeg_dep.found()
-  jpeg_dep = cc.find_library('jpeg', required : get_option('gl-jpeg'))
-endif
+jpeg_dep = dependency('libjpeg', required : get_option('gl-jpeg'))
 
 if png_dep.found()
   optional_deps += png_dep