Browse Source

Fix build setup for new juce7

Signed-off-by: falkTX <falktx@falktx.com>
juce7
falkTX 3 years ago
parent
commit
0ebee8d7e8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
9 changed files with 50 additions and 18 deletions
  1. +3
    -0
      libs/juce-current/AppConfig.h
  2. +1
    -6
      libs/juce-current/meson.build
  3. +5
    -8
      libs/juce-plugin/JucePluginMain.cpp
  4. +35
    -0
      libs/lv2-ttl-generator/lv2_ttl_generator.cpp
  5. +1
    -0
      ports/meson.build
  6. +0
    -2
      ports/swankyamp/meson.build
  7. +1
    -1
      ports/swankyamp/source/PluginEditor.cpp
  8. +3
    -1
      ports/swankyamp/source/PluginProcessor.cpp
  9. +1
    -0
      ports/vitalium/JuceHeader.h

+ 3
- 0
libs/juce-current/AppConfig.h View File

@@ -34,6 +34,9 @@
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 0
#endif
// FIXME needed for Vitalium
// #define JUCE_MODAL_LOOPS_PERMITTED 1
//=============================================================================
#define JUCE_STANDALONE_APPLICATION 0


+ 1
- 6
libs/juce-current/meson.build View File

@@ -40,11 +40,6 @@ juce_current_extra_cpp_args = [
]

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'
juce_current_extra_cpp_args += [
'-mpreferred-stack-boundary=2',
@@ -58,7 +53,7 @@ lib_juce_current = static_library('juce-current',
include_directories('.'),
include_directories('source'),
include_directories('source/modules'),
include_directories('..' / 'juced' / 'source' / 'dependancies' / 'ladspa_sdk' / 'src'),
include_directories('../juced/source/dependancies/ladspa_sdk/src'),
],
cpp_args: build_flags_cpp + juce_current_extra_cpp_args,
dependencies: dependencies,


+ 5
- 8
libs/juce-plugin/JucePluginMain.cpp View File

@@ -20,7 +20,11 @@
#if JucePlugin_Build_AU
#include "modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm"
#elif JucePlugin_Build_LV2
#include "modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper.cpp"
#if JUCE_MAJOR_VERSION >= 6
#include "modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp"
#else
#include "modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper.cpp"
#endif
#elif JucePlugin_Build_RTAS
#include "modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp"
#elif JucePlugin_Build_VST
@@ -42,10 +46,3 @@
#else
#error Invalid configuration
#endif

#if JUCE_AUDIOPROCESSOR_NO_GUI
// commonly used classes in DSP code
namespace juce {
Colour::Colour(juce::uint32) noexcept {}
}
#endif

+ 35
- 0
libs/lv2-ttl-generator/lv2_ttl_generator.cpp View File

@@ -16,7 +16,32 @@
#define nullptr (0)
#endif

// Replicating some of the LV2 header here so that we don't have to set up any
// custom include paths for this file.
// Normally this would be a bad idea, but the LV2 API has to keep these definitions
// in order to remain backwards-compatible.

extern "C" {

typedef struct LV2_Descriptor {
const void* a;
const void* b;
const void* c;
const void* d;
const void* e;
const void* f;
const void* g;
const void* (*extension_data)(const char* uri);
} LV2_Descriptor;

typedef struct RecallFeature {
int (*doRecall)(const char*);
} RecallFeature;

}

typedef void (*TTL_Generator_Function)(const char* basename);
typedef const LV2_Descriptor* (*LV2_Descriptor_Function)(unsigned index);

int main(int argc, char* argv[])
{
@@ -44,8 +69,10 @@ int main(int argc, char* argv[])

#ifdef TTL_GENERATOR_WINDOWS
const TTL_Generator_Function ttlFn = (TTL_Generator_Function)GetProcAddress(handle, "lv2_generate_ttl");
const LV2_Descriptor_Function lv2Fn = (LV2_Descriptor_Function)GetProcAddress(handle, "lv2_descriptor");
#else
const TTL_Generator_Function ttlFn = (TTL_Generator_Function)dlsym(handle, "lv2_generate_ttl");
const LV2_Descriptor_Function lv2Fn = (LV2_Descriptor_Function)dlsym(handle, "lv2_descriptor");
#endif

if (ttlFn != NULL)
@@ -81,8 +108,16 @@ int main(int argc, char* argv[])

ttlFn(basename);
}
else if (lv2Fn != nullptr)
{
if (const LV2_Descriptor* const descriptor = lv2Fn(0))
if (const RecallFeature* const recallFeature = (const RecallFeature*)descriptor->extension_data("https://lv2-extensions.juce.com/turtle_recall"))
recallFeature->doRecall(argv[1]);
}
else
{
printf("Failed to find 'lv2_generate_ttl' function\n");
}

#ifdef TTL_GENERATOR_WINDOWS
FreeLibrary(handle);


+ 1
- 0
ports/meson.build View File

@@ -17,6 +17,7 @@ plugin_include_dirs = [
include_directories('../libs/juce-current'),
include_directories('../libs/juce-current/source'),
include_directories('../libs/juce-current/source/modules'),
include_directories('../libs/juce-current/source/modules/juce_audio_processors/format_types/LV2_SDK'),
include_directories('../libs/juce-current/source/modules/juce_audio_processors/format_types/VST3_SDK'),
include_directories('../libs/juce-plugin'),
]


+ 0
- 2
ports/swankyamp/meson.build View File

@@ -7,9 +7,7 @@ plugin_extra_include_dirs = include_directories([

if linux_embed
plugin_srcs = files([
'source/BinaryData.cpp',
'source/PluginProcessor.cpp',
'source/PresetManager.cpp',
'source/Utils.cpp',
])
else


+ 1
- 1
ports/swankyamp/source/PluginEditor.cpp View File

@@ -41,7 +41,7 @@ SwankyAmpAudioProcessorEditor::SwankyAmpAudioProcessorEditor(
tooltipWindow(this)
{
LookAndFeel::getDefaultLookAndFeel().setDefaultSansSerifTypeface(
laf.getDefaultFont().getTypeface());
laf.getDefaultFont().getTypefacePtr());
setLookAndFeel(&laf);
tooltipWindow.setLookAndFeel(&laf);
tooltipWindow.setOpaque(false);


+ 3
- 1
ports/swankyamp/source/PluginProcessor.cpp View File

@@ -22,7 +22,9 @@

#include <JuceHeader.h>

#include "PluginEditor.h"
#if ! JUCE_AUDIOPROCESSOR_NO_GUI
#include "PluginEditor.h"
#endif
#include "Utils.h"

#include "PluginProcessor.h"


+ 1
- 0
ports/vitalium/JuceHeader.h View File

@@ -7,6 +7,7 @@
#include "BinaryData.h"
using namespace juce;
using namespace juce::gl;
namespace ProjectInfo
{


Loading…
Cancel
Save