diff --git a/libs/juce-current/meson.build b/libs/juce-current/meson.build index ec3ef856..c8c618fa 100644 --- a/libs/juce-current/meson.build +++ b/libs/juce-current/meson.build @@ -37,18 +37,18 @@ juce_current_extra_cpp_args = [ '-Wno-non-virtual-dtor', ] -# if os_windows -juce_current_extra_cpp_args += [ - '-D_NATIVE_WCHAR_T_DEFINED', - '-D__wchar_t=wchar_t', - '-Wno-unknown-pragmas', -] -if host_machine.cpu() == 'x86' +if os_windows juce_current_extra_cpp_args += [ - '-mpreferred-stack-boundary=2', + '-D_NATIVE_WCHAR_T_DEFINED', + '-D__wchar_t=wchar_t', + '-Wno-unknown-pragmas', ] + if host_machine.cpu() == 'x86' + juce_current_extra_cpp_args += [ + '-mpreferred-stack-boundary=2', + ] + endif endif -# endif lib_juce_current = static_library('juce-current', sources: juce_current_srcs, diff --git a/libs/juce-current/source/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/libs/juce-current/source/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 0f7c152e..3ae14372 100644 --- a/libs/juce-current/source/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/libs/juce-current/source/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -61,7 +61,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996 4100) #define PRAGMA_ALIGN_SUPPORTED 1 #endif -#ifndef _MSC_VER +#if ! JUCE_WINDOWS #define __cdecl #endif diff --git a/libs/juce-current/source/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h b/libs/juce-current/source/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h index 6bea8430..baaa59f0 100644 --- a/libs/juce-current/source/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h +++ b/libs/juce-current/source/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h @@ -73,11 +73,6 @@ #define JucePlugin_Build_RTAS 0 #endif -#if ! (defined (_MSC_VER) || defined (__APPLE_CPP__) || defined (__APPLE_CC__) || defined (LINUX) || defined (__linux__)) - #undef JucePlugin_Build_VST3 - #define JucePlugin_Build_VST3 0 -#endif - //============================================================================== #if JucePlugin_Build_LV2 && ! defined (JucePlugin_LV2URI) #error "You need to define the JucePlugin_LV2URI value!" diff --git a/libs/juce-legacy/meson.build b/libs/juce-legacy/meson.build index 33de36ae..35955b8e 100644 --- a/libs/juce-legacy/meson.build +++ b/libs/juce-legacy/meson.build @@ -32,6 +32,16 @@ else ] endif +juce_legacy_extra_cpp_args = [ + '-Wno-non-virtual-dtor', +] + +if os_windows + juce_legacy_extra_cpp_args += [ + '-Wno-unknown-pragmas', + ] +endif + lib_juce_legacy = static_library('juce-legacy', sources: juce_legacy_srcs, include_directories: [ @@ -40,7 +50,7 @@ lib_juce_legacy = static_library('juce-legacy', include_directories('source' / 'modules'), include_directories('..' / 'juced' / 'source' / 'dependancies' / 'ladspa_sdk' / 'src'), ], - cpp_args: build_flags_cpp, + cpp_args: build_flags_cpp + juce_legacy_extra_cpp_args, dependencies: dependencies, pic: true, install: false, diff --git a/libs/juce-plugin/JucePluginUtils.cpp b/libs/juce-plugin/JucePluginUtils.cpp index 4145add4..d3ac6a7c 100644 --- a/libs/juce-plugin/JucePluginUtils.cpp +++ b/libs/juce-plugin/JucePluginUtils.cpp @@ -7,8 +7,20 @@ */ #include "AppConfig.h" + +#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1 +#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1 +#include "modules/juce_gui_basics/juce_gui_basics.h" +#undef None + #include "JucePluginMain.h" +#if JucePlugin_Build_AU || JucePlugin_Build_LV2 || JucePlugin_Build_RTAS || JucePlugin_Build_VST || JucePlugin_Build_VST3 || JucePlugin_Build_Standalone + // all good here +#else + #error Invalid configuration +#endif + #if ! JucePlugin_Build_Standalone #include "modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp" #endif diff --git a/ports/meson.build b/ports/meson.build index 636f3227..51e3ad93 100644 --- a/ports/meson.build +++ b/ports/meson.build @@ -141,6 +141,13 @@ build_flags_plugin_vst3 = [ '-Wno-non-virtual-dtor', ] +if os_windows + build_flags_plugin_vst3 += [ + '-D_NATIVE_WCHAR_T_DEFINED', + '-D__wchar_t=wchar_t', + ] +endif + ############################################################################### foreach plugin : plugins