mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Linux: Only add libcurl dependency when JUCE_USE_CURL is enabled
This commit is contained in:
parent
a093112c05
commit
1951714776
4 changed files with 44 additions and 41 deletions
|
|
@ -325,6 +325,7 @@ private:
|
|||
}
|
||||
|
||||
if (project.getEnabledModules().isModuleEnabled ("juce_core")
|
||||
&& project.isConfigFlagEnabled ("JUCE_USE_CURL", true)
|
||||
&& ! project.isConfigFlagEnabled ("JUCE_LOAD_CURL_SYMBOLS_LAZILY", false))
|
||||
result.add ("libcurl");
|
||||
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ private:
|
|||
}
|
||||
|
||||
// don't add libcurl if curl symbols are loaded at runtime
|
||||
if (! isLoadCurlSymbolsLazilyEnabled())
|
||||
if (isCurlEnabled() && ! isLoadCurlSymbolsLazilyEnabled())
|
||||
packages.add ("libcurl");
|
||||
|
||||
packages.removeDuplicates (false);
|
||||
|
|
@ -607,6 +607,14 @@ private:
|
|||
&& project.isConfigFlagEnabled ("JUCE_WEB_BROWSER", true));
|
||||
}
|
||||
|
||||
bool isCurlEnabled() const
|
||||
{
|
||||
static String juceCoreModule ("juce_core");
|
||||
|
||||
return (project.getEnabledModules().isModuleEnabled (juceCoreModule)
|
||||
&& project.isConfigFlagEnabled ("JUCE_USE_CURL", true));
|
||||
}
|
||||
|
||||
bool isLoadCurlSymbolsLazilyEnabled() const
|
||||
{
|
||||
static String juceCoreModule ("juce_core");
|
||||
|
|
|
|||
|
|
@ -186,51 +186,50 @@
|
|||
|
||||
//==============================================================================
|
||||
#if ! JUCE_WINDOWS
|
||||
#include "native/juce_posix_SharedCode.h"
|
||||
#include "native/juce_posix_NamedPipe.cpp"
|
||||
#if ! JUCE_ANDROID || __ANDROID_API__ >= 24
|
||||
#include "native/juce_posix_IPAddress.h"
|
||||
#endif
|
||||
#include "native/juce_posix_SharedCode.h"
|
||||
#include "native/juce_posix_NamedPipe.cpp"
|
||||
#if ! JUCE_ANDROID || __ANDROID_API__ >= 24
|
||||
#include "native/juce_posix_IPAddress.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_MAC || JUCE_IOS
|
||||
#include "native/juce_mac_Files.mm"
|
||||
#include "native/juce_mac_Network.mm"
|
||||
#include "native/juce_mac_Strings.mm"
|
||||
#include "native/juce_mac_SystemStats.mm"
|
||||
#include "native/juce_mac_Threads.mm"
|
||||
#include "native/juce_mac_Files.mm"
|
||||
#include "native/juce_mac_Network.mm"
|
||||
#include "native/juce_mac_Strings.mm"
|
||||
#include "native/juce_mac_SystemStats.mm"
|
||||
#include "native/juce_mac_Threads.mm"
|
||||
|
||||
//==============================================================================
|
||||
#elif JUCE_WINDOWS
|
||||
#include "native/juce_win32_Files.cpp"
|
||||
#include "native/juce_win32_Network.cpp"
|
||||
#include "native/juce_win32_Registry.cpp"
|
||||
#include "native/juce_win32_SystemStats.cpp"
|
||||
#include "native/juce_win32_Threads.cpp"
|
||||
#include "native/juce_win32_Files.cpp"
|
||||
#include "native/juce_win32_Network.cpp"
|
||||
#include "native/juce_win32_Registry.cpp"
|
||||
#include "native/juce_win32_SystemStats.cpp"
|
||||
#include "native/juce_win32_Threads.cpp"
|
||||
|
||||
//==============================================================================
|
||||
#elif JUCE_LINUX
|
||||
#include "native/juce_linux_CommonFile.cpp"
|
||||
#include "native/juce_linux_Files.cpp"
|
||||
#include "native/juce_linux_Network.cpp"
|
||||
#if JUCE_USE_CURL
|
||||
#include "native/juce_curl_Network.cpp"
|
||||
#endif
|
||||
#include "native/juce_linux_SystemStats.cpp"
|
||||
#include "native/juce_linux_Threads.cpp"
|
||||
#include "native/juce_linux_CommonFile.cpp"
|
||||
#include "native/juce_linux_Files.cpp"
|
||||
#include "native/juce_linux_Network.cpp"
|
||||
#if JUCE_USE_CURL
|
||||
#include "native/juce_curl_Network.cpp"
|
||||
#endif
|
||||
#include "native/juce_linux_SystemStats.cpp"
|
||||
#include "native/juce_linux_Threads.cpp"
|
||||
|
||||
//==============================================================================
|
||||
#elif JUCE_ANDROID
|
||||
|
||||
#include "native/juce_linux_CommonFile.cpp"
|
||||
#include "native/juce_android_JNIHelpers.cpp"
|
||||
#include "native/juce_android_Files.cpp"
|
||||
#include "native/juce_android_Misc.cpp"
|
||||
#include "native/juce_android_Network.cpp"
|
||||
#include "native/juce_android_SystemStats.cpp"
|
||||
#include "native/juce_android_Threads.cpp"
|
||||
#include "native/juce_android_RuntimePermissions.cpp"
|
||||
#include "native/juce_linux_CommonFile.cpp"
|
||||
#include "native/juce_android_JNIHelpers.cpp"
|
||||
#include "native/juce_android_Files.cpp"
|
||||
#include "native/juce_android_Misc.cpp"
|
||||
#include "native/juce_android_Network.cpp"
|
||||
#include "native/juce_android_SystemStats.cpp"
|
||||
#include "native/juce_android_Threads.cpp"
|
||||
#include "native/juce_android_RuntimePermissions.cpp"
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -242,7 +241,7 @@
|
|||
|
||||
//==============================================================================
|
||||
#if JUCE_UNIT_TESTS
|
||||
#include "containers/juce_HashMap_test.cpp"
|
||||
#include "containers/juce_HashMap_test.cpp"
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -134,14 +134,10 @@
|
|||
Enables http/https support via libcurl (Linux only). Enabling this will add an additional
|
||||
run-time dynamic dependency to libcurl.
|
||||
|
||||
If you disable this then https/ssl support will not be available on linux.
|
||||
If you disable this then https/ssl support will not be available on Linux.
|
||||
*/
|
||||
#ifndef JUCE_USE_CURL
|
||||
#if JUCE_LINUX
|
||||
#define JUCE_USE_CURL 1
|
||||
#else
|
||||
#define JUCE_USE_CURL 0
|
||||
#endif
|
||||
#define JUCE_USE_CURL 1
|
||||
#endif
|
||||
|
||||
/** Config: JUCE_LOAD_CURL_SYMBOLS_LAZILY
|
||||
|
|
@ -155,7 +151,6 @@
|
|||
#define JUCE_LOAD_CURL_SYMBOLS_LAZILY 0
|
||||
#endif
|
||||
|
||||
|
||||
/** Config: JUCE_CATCH_UNHANDLED_EXCEPTIONS
|
||||
If enabled, this will add some exception-catching code to forward unhandled exceptions
|
||||
to your JUCEApplicationBase::unhandledException() callback.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue