forked from AuroraMiddleware/gtk
meson: Always look for both cmake and pkgconfig names
The is_msvc_like change is wrong; it used a false correlation between "compiler being used" and "dependency method" by saying that on Windows, when building with MSVC, you will only use CMake to find png, jpeg, tiff. You can use pkgconfig to find these deps on Windows with MSVC -- when the deps have been built with Autotools or Meson (with MSVC). You can also find these deps using CMake on other platforms like macOS or Linux. The solution is simple: just search for both names on all platforms, and just search for the pkgconfig name first.
This commit is contained in:
parent
235f01952c
commit
cc6b0c5750
17
meson.build
17
meson.build
@ -410,22 +410,17 @@ if win32_enabled
|
||||
pangowin32_dep = dependency('pangowin32')
|
||||
endif
|
||||
|
||||
is_msvc_like = cc.get_argument_syntax() == 'msvc'
|
||||
|
||||
pangocairo_dep = dependency('pangocairo', version: pango_req,
|
||||
fallback : ['pango', 'libpangocairo_dep'])
|
||||
pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
|
||||
fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'],
|
||||
default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false'])
|
||||
png_dep = dependency(is_msvc_like ? 'png' : 'libpng',
|
||||
fallback: ['libpng', 'libpng_dep'],
|
||||
required: true)
|
||||
tiff_dep = dependency(is_msvc_like ? 'tiff' : 'libtiff-4',
|
||||
fallback: ['libtiff', 'libtiff4_dep'],
|
||||
required: true)
|
||||
jpeg_dep = dependency(is_msvc_like ? 'jpeg' : 'libjpeg',
|
||||
fallback: ['libjpeg-turbo', 'jpeg_dep'],
|
||||
required: true)
|
||||
png_dep = dependency('libpng', 'png',
|
||||
fallback: ['libpng', 'libpng_dep'])
|
||||
tiff_dep = dependency('libtiff-4', 'tiff',
|
||||
fallback: ['libtiff', 'libtiff4_dep'])
|
||||
jpeg_dep = dependency('libjpeg', 'jpeg',
|
||||
fallback: ['libjpeg-turbo', 'jpeg_dep'])
|
||||
|
||||
epoxy_dep = dependency('epoxy', version: epoxy_req,
|
||||
fallback: ['libepoxy', 'libepoxy_dep'])
|
||||
|
Loading…
Reference in New Issue
Block a user