From 9a5b5643817a75c67c404a474b94529c05e66654 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 21 Mar 2022 16:46:03 +0800 Subject: build: Clean up search for libtiff Like the previous commits, use CMake's builtin support to look for libtiff, which will clean things up a bit in the build files --- meson.build | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 018c2c132..b555edf79 100644 --- a/meson.build +++ b/meson.build @@ -325,23 +325,9 @@ endif # Don't check and build the tiff loader if native_windows_loaders is true tiff_opt = get_option('tiff') if not tiff_opt.disabled() and not native_windows_loaders - tiff_dep = dependency('libtiff-4', required: false) - if not tiff_dep.found() and cc.has_header('tiff.h') - # First look for the DLL builds of libtiff, then the static builds - tiff_dep = cc.find_library('libtiff_i', required: false) - - if not tiff_dep.found() - # For the static lib, zlib and libjpeg .lib's have been looked for first, and - # they are optional for libtiff - tiff_dep = cc.find_library('libtiff', required: false) - endif - endif - # We currently don't have a fallback subproject, but this handles error # reporting if tiff_opt is enabled. - if not tiff_dep.found() - tiff_dep = dependency('libtiff-4', required: tiff_opt) - endif + tiff_dep = dependency(is_msvc_like ? 'tiff' : 'libtiff-4', required: tiff_opt) if tiff_dep.found() enabled_loaders += 'tiff' -- cgit v1.2.1