[glib-networking/build.fixes: 1/2] meson.build: Don't mandate pkg-config search for OpenSSL on MSVC



commit d3472a5d2bd42f940d6dc33f6c42bfed9ba8db94
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Mar 7 16:28:55 2019 +0800

    meson.build: Don't mandate pkg-config search for OpenSSL on MSVC
    
    It is likely that Visual Studio builds of OpenSSL do not have pkg-config
    files generated and so have to fall back into the header and .lib search
    combo sequence, so we only make OpenSSL's pkg-config files mandatory
    when:
    
    -We want to build the OpenSSL TLS backend
    -We are not building with Visual Studio
    
    On Visual Studio, when we ask for the OpenSSL TLS backend to be build,
    Meson already searches for the headers and the corresponding .lib
    pair as hard dependencies in the case that the pkg-config files are not
    found.

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 5c9a56f..d0d445a 100644
--- a/meson.build
+++ b/meson.build
@@ -79,7 +79,7 @@ endif
 
 # *** Checks for OpenSSL    ***
 openssl_option = get_option('openssl')
-openssl_dep = dependency('openssl', required: openssl_option)
+openssl_dep = dependency('openssl', required: openssl_option.enabled() and cc.get_id() != 'msvc')
 if openssl_dep.found()
   backends += ['openssl']
 elif cc.get_id() == 'msvc' and not openssl_option.disabled()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]