diff --git a/meson.build b/meson.build index 9a98f0c86a0..f7ddd75e9ce 100644 --- a/meson.build +++ b/meson.build @@ -876,10 +876,17 @@ endif libxsltopt = get_option('libxslt') if not libxsltopt.disabled() - libxslt = dependency('libxslt', required: false) - # Unfortunately the dependency is named differently with cmake - if not libxslt.found() # combine with above once meson 0.60.0 is required - libxslt = dependency('LibXslt', required: libxsltopt, method: 'cmake') + if host_system != 'windows' + libxslt = dependency('libxslt', required: false) + # Unfortunately the dependency is named differently with cmake + if not libxslt.found() # combine with above once meson 0.60.0 is required + libxslt = dependency('LibXslt', required: libxsltopt, method: 'cmake') + endif + else + libxslt = dependency('libxslt', required: false) + if not libxslt.found() + libxslt = cc.find_library('libxslt', required: libxsltopt, dirs: postgres_lib_d) + endif endif if libxslt.found()