Simplify wxUSE_WEBREQUEST_XXX logic
Remove automatic definition of wxUSE_WEBREQUEST depending on whether wxUSE_WEBREQUEST_XXX are defined and follow the same approach as with wxUSE_GRAPHICS_XXX, i.e. define wxUSE_WEBREQUEST_XXX as wxUSE_WEBREQUEST by default instead. Move wxUSE_WEBREQUEST_WINHTTP to wxMSW-specific file, it doesn't need to be in common one (unfortunately this can't be done for the Mac-specific wxUSE_WEBREQUEST_URLSESSION yet, because macOS-specific settings are not injected into setup.h.in currently). Also fix test for winhttp.h availability: it seems to be present in all MinGW64 distributions, but not in MinGW32, so test for this and not for gcc version. Finally remove the now unnecessary test for macOS 10.9, as we only support 10.10+ anyhow by now.
This commit is contained in:
@@ -294,31 +294,15 @@
|
||||
|
||||
#cmakedefine01 wxUSE_MIMETYPE
|
||||
|
||||
#cmakedefine01 wxUSE_WEBREQUEST
|
||||
|
||||
#if defined(_MSC_VER) || \
|
||||
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
|
||||
#else
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_URLSESSION
|
||||
#ifdef __APPLE__
|
||||
#define wxUSE_WEBREQUEST_URLSESSION wxUSE_WEBREQUEST
|
||||
#else
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_URLSESSION
|
||||
#endif
|
||||
|
||||
#if defined(__WINDOWS__) || defined(__APPLE__)
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_CURL
|
||||
#else
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_CURL
|
||||
#endif
|
||||
|
||||
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
|
||||
#cmakedefine01 wxUSE_WEBREQUEST
|
||||
#else
|
||||
#cmakedefine01 wxUSE_WEBREQUEST
|
||||
#endif
|
||||
|
||||
#cmakedefine01 wxUSE_PROTOCOL
|
||||
|
||||
@@ -707,6 +691,12 @@
|
||||
#cmakedefine01 wxUSE_GRAPHICS_DIRECT2D
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
|
||||
#else
|
||||
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
|
||||
#endif
|
||||
|
||||
|
||||
#cmakedefine01 wxUSE_OLE
|
||||
|
||||
|
Reference in New Issue
Block a user