Fixes #71 Signed-off-by: falkTX <falktx@falktx.com>tags/2021-03-15
@@ -10,7 +10,6 @@ | |||||
#define BUILD_JUCE_APPCONFIG_H_INCLUDED | #define BUILD_JUCE_APPCONFIG_H_INCLUDED | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 | |||||
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1 | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 | ||||
@@ -30,6 +29,11 @@ | |||||
#define JUCE_MODULE_AVAILABLE_juce_product_unlocking 0 | #define JUCE_MODULE_AVAILABLE_juce_product_unlocking 0 | ||||
#define JUCE_MODULE_AVAILABLE_juce_video 0 | #define JUCE_MODULE_AVAILABLE_juce_video 0 | ||||
// optional | |||||
#ifndef JUCE_MODULE_AVAILABLE_juce_audio_devices | |||||
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 0 | |||||
#endif | |||||
//============================================================================= | //============================================================================= | ||||
#define JUCE_STANDALONE_APPLICATION 0 | #define JUCE_STANDALONE_APPLICATION 0 | ||||
@@ -3,7 +3,6 @@ | |||||
if linux_embed | if linux_embed | ||||
juce_current_srcs = [ | juce_current_srcs = [ | ||||
'source/modules/juce_audio_basics/juce_audio_basics.cpp', | 'source/modules/juce_audio_basics/juce_audio_basics.cpp', | ||||
'source/modules/juce_audio_devices/juce_audio_devices.cpp', | |||||
'source/modules/juce_audio_formats/juce_audio_formats.cpp', | 'source/modules/juce_audio_formats/juce_audio_formats.cpp', | ||||
'source/modules/juce_audio_processors/juce_audio_processors.cpp', | 'source/modules/juce_audio_processors/juce_audio_processors.cpp', | ||||
'source/modules/juce_audio_utils/juce_audio_utils.cpp', | 'source/modules/juce_audio_utils/juce_audio_utils.cpp', | ||||
@@ -16,7 +15,6 @@ if linux_embed | |||||
else | else | ||||
juce_current_srcs = [ | juce_current_srcs = [ | ||||
'source/modules/juce_audio_basics/juce_audio_basics.cpp', | 'source/modules/juce_audio_basics/juce_audio_basics.cpp', | ||||
'source/modules/juce_audio_devices/juce_audio_devices.cpp', | |||||
'source/modules/juce_audio_formats/juce_audio_formats.cpp', | 'source/modules/juce_audio_formats/juce_audio_formats.cpp', | ||||
'source/modules/juce_audio_processors/juce_audio_processors.cpp', | 'source/modules/juce_audio_processors/juce_audio_processors.cpp', | ||||
'source/modules/juce_audio_utils/juce_audio_utils.cpp', | 'source/modules/juce_audio_utils/juce_audio_utils.cpp', | ||||
@@ -32,6 +30,10 @@ else | |||||
] | ] | ||||
endif | endif | ||||
juce_current_devices_srcs = [ | |||||
'source/modules/juce_audio_devices/juce_audio_devices.cpp', | |||||
] | |||||
juce_current_extra_cpp_args = [ | juce_current_extra_cpp_args = [ | ||||
'-std=gnu++14', | '-std=gnu++14', | ||||
'-Wno-non-virtual-dtor', | '-Wno-non-virtual-dtor', | ||||
@@ -64,4 +66,17 @@ lib_juce_current = static_library('juce-current', | |||||
install: false, | install: false, | ||||
) | ) | ||||
lib_juce_current_device = static_library('juce-current-devices', | |||||
sources: juce_current_devices_srcs, | |||||
include_directories: [ | |||||
include_directories('.'), | |||||
include_directories('source'), | |||||
include_directories('source/modules'), | |||||
], | |||||
cpp_args: build_flags_cpp + juce_current_extra_cpp_args + ['-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1'], | |||||
dependencies: dependencies_devices, | |||||
pic: true, | |||||
install: false, | |||||
) | |||||
############################################################################### | ############################################################################### |
@@ -10,7 +10,6 @@ | |||||
#define BUILD_JUCE_APPCONFIG_H_INCLUDED | #define BUILD_JUCE_APPCONFIG_H_INCLUDED | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 | |||||
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1 | ||||
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 | #define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 | ||||
@@ -30,6 +29,11 @@ | |||||
#define JUCE_MODULE_AVAILABLE_juce_product_unlocking 0 | #define JUCE_MODULE_AVAILABLE_juce_product_unlocking 0 | ||||
#define JUCE_MODULE_AVAILABLE_juce_video 0 | #define JUCE_MODULE_AVAILABLE_juce_video 0 | ||||
// optional | |||||
#ifndef JUCE_MODULE_AVAILABLE_juce_audio_devices | |||||
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 0 | |||||
#endif | |||||
//============================================================================= | //============================================================================= | ||||
#define JUCE_STANDALONE_APPLICATION 0 | #define JUCE_STANDALONE_APPLICATION 0 | ||||
@@ -3,7 +3,6 @@ | |||||
if linux_embed | if linux_embed | ||||
juce_legacy_srcs = [ | juce_legacy_srcs = [ | ||||
'source/modules/juce_audio_basics/juce_audio_basics.cpp', | 'source/modules/juce_audio_basics/juce_audio_basics.cpp', | ||||
'source/modules/juce_audio_devices/juce_audio_devices.cpp', | |||||
'source/modules/juce_audio_formats/juce_audio_formats.cpp', | 'source/modules/juce_audio_formats/juce_audio_formats.cpp', | ||||
'source/modules/juce_audio_processors/juce_audio_processors.cpp', | 'source/modules/juce_audio_processors/juce_audio_processors.cpp', | ||||
'source/modules/juce_audio_utils/juce_audio_utils.cpp', | 'source/modules/juce_audio_utils/juce_audio_utils.cpp', | ||||
@@ -16,7 +15,6 @@ if linux_embed | |||||
else | else | ||||
juce_legacy_srcs = [ | juce_legacy_srcs = [ | ||||
'source/modules/juce_audio_basics/juce_audio_basics.cpp', | 'source/modules/juce_audio_basics/juce_audio_basics.cpp', | ||||
'source/modules/juce_audio_devices/juce_audio_devices.cpp', | |||||
'source/modules/juce_audio_formats/juce_audio_formats.cpp', | 'source/modules/juce_audio_formats/juce_audio_formats.cpp', | ||||
'source/modules/juce_audio_processors/juce_audio_processors.cpp', | 'source/modules/juce_audio_processors/juce_audio_processors.cpp', | ||||
'source/modules/juce_audio_utils/juce_audio_utils.cpp', | 'source/modules/juce_audio_utils/juce_audio_utils.cpp', | ||||
@@ -32,6 +30,10 @@ else | |||||
] | ] | ||||
endif | endif | ||||
juce_legacy_devices_srcs = [ | |||||
'source/modules/juce_audio_devices/juce_audio_devices.cpp', | |||||
] | |||||
juce_legacy_extra_cpp_args = [ | juce_legacy_extra_cpp_args = [ | ||||
'-Wno-non-virtual-dtor', | '-Wno-non-virtual-dtor', | ||||
] | ] | ||||
@@ -56,4 +58,17 @@ lib_juce_legacy = static_library('juce-legacy', | |||||
install: false, | install: false, | ||||
) | ) | ||||
lib_juce_legacy_devices = static_library('juce-legacy-devices', | |||||
sources: juce_legacy_devices_srcs, | |||||
include_directories: [ | |||||
include_directories('.'), | |||||
include_directories('source'), | |||||
include_directories('source' / 'modules'), | |||||
], | |||||
cpp_args: build_flags_cpp + juce_legacy_extra_cpp_args + ['-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1'], | |||||
dependencies: dependencies_devices, | |||||
pic: true, | |||||
install: false, | |||||
) | |||||
############################################################################### | ############################################################################### |
@@ -74,22 +74,42 @@ cpp = meson.get_compiler('cpp') | |||||
############################################################################### | ############################################################################### | ||||
# dependencies | # dependencies | ||||
dependencies = [ | |||||
] | |||||
if os_linux | if os_linux | ||||
dependencies += [ | |||||
dependencies = [ | |||||
cc.find_library('dl'), | cc.find_library('dl'), | ||||
cc.find_library('rt'), | cc.find_library('rt'), | ||||
dependency('fftw3f').partial_dependency(link_args: false, links: false), | |||||
] | ] | ||||
endif | |||||
if os_linux and not linux_embed | |||||
dependencies += [ | |||||
dependencies_devices = [ | |||||
dependency('alsa'), | dependency('alsa'), | ||||
dependency('freetype2'), | |||||
dependency('x11'), | |||||
dependency('xext'), | |||||
] | |||||
if not linux_embed | |||||
dependencies += [ | |||||
dependency('freetype2'), | |||||
dependency('x11').partial_dependency(link_args: false, links: false), | |||||
dependency('xext').partial_dependency(link_args: false, links: false), | |||||
] | |||||
endif | |||||
elif os_windows | |||||
dependencies = [ | |||||
cc.find_library('comdlg32'), | |||||
cc.find_library('gdi32'), | |||||
cc.find_library('imm32'), | |||||
cc.find_library('ole32'), | |||||
cc.find_library('oleaut32'), | |||||
cc.find_library('shlwapi'), | |||||
cc.find_library('uuid'), | |||||
cc.find_library('version'), | |||||
cc.find_library('wininet'), | |||||
cc.find_library('ws2_32'), | |||||
] | |||||
dependencies_devices = [ | |||||
cc.find_library('winmm'), | |||||
] | |||||
else | |||||
dependencies = [ | |||||
] | |||||
dependencies_devices = [ | |||||
] | ] | ||||
endif | endif | ||||
@@ -236,17 +256,19 @@ subdir('ports-legacy') | |||||
############################################################################### | ############################################################################### | ||||
# extra files to install | # extra files to install | ||||
extra_lv2_preset_bundles = [ | |||||
'TAL-NoiseMaker-Noise4U.lv2', | |||||
] | |||||
if 'tal-noisemaker' in get_option('plugins') | |||||
extra_lv2_preset_bundles = [ | |||||
'TAL-NoiseMaker-Noise4U.lv2', | |||||
] | |||||
foreach bundle : extra_lv2_preset_bundles | |||||
install_data([ | |||||
'static-lv2-ttl/@0@/manifest.ttl'.format(bundle), | |||||
'static-lv2-ttl/@0@/presets.ttl'.format(bundle), | |||||
], | |||||
install_dir: lv2dir / bundle, | |||||
) | |||||
endforeach | |||||
foreach bundle : extra_lv2_preset_bundles | |||||
install_data([ | |||||
'static-lv2-ttl/@0@/manifest.ttl'.format(bundle), | |||||
'static-lv2-ttl/@0@/presets.ttl'.format(bundle), | |||||
], | |||||
install_dir: lv2dir / bundle, | |||||
) | |||||
endforeach | |||||
endif | |||||
############################################################################### | ############################################################################### |
@@ -30,5 +30,9 @@ plugin_srcs = files([ | |||||
]) | ]) | ||||
plugin_name = 'Dexed' | plugin_name = 'Dexed' | ||||
plugin_uses_devices = true | |||||
plugin_extra_build_flags = [ | |||||
'-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1' | |||||
] | |||||
############################################################################### | ############################################################################### |
@@ -72,22 +72,13 @@ plugin_include_dirs = [ | |||||
############################################################################### | ############################################################################### | ||||
# dependencies | # dependencies | ||||
dependencies_plugin = [ | |||||
] | |||||
if os_windows | |||||
dependencies_plugin += [ | |||||
cc.find_library('comdlg32'), | |||||
cc.find_library('gdi32'), | |||||
cc.find_library('imm32'), | |||||
cc.find_library('ole32'), | |||||
cc.find_library('oleaut32'), | |||||
cc.find_library('shlwapi'), | |||||
cc.find_library('uuid'), | |||||
cc.find_library('version'), | |||||
cc.find_library('winmm'), | |||||
cc.find_library('wininet'), | |||||
cc.find_library('ws2_32'), | |||||
if os_linux and not linux_embed | |||||
dependencies_plugin = [ | |||||
dependency('x11'), | |||||
dependency('xext'), | |||||
] | |||||
else | |||||
dependencies_plugin = [ | |||||
] | ] | ||||
endif | endif | ||||
@@ -197,6 +188,7 @@ if build_lv2 or build_vst2 | |||||
if plugin in get_option('plugins') | if plugin in get_option('plugins') | ||||
plugin_uses_drowaudio = false | plugin_uses_drowaudio = false | ||||
plugin_uses_juced = false | plugin_uses_juced = false | ||||
plugin_uses_devices = false | |||||
plugin_uses_opengl = false | plugin_uses_opengl = false | ||||
plugin_extra_dependencies = [] | plugin_extra_dependencies = [] | ||||
plugin_extra_include_dirs = [] | plugin_extra_include_dirs = [] | ||||
@@ -223,6 +215,15 @@ if build_lv2 or build_vst2 | |||||
link_with_plugin += lib_juced | link_with_plugin += lib_juced | ||||
endif | endif | ||||
if plugin_uses_devices | |||||
link_with_plugin += lib_juce_legacy_devices | |||||
if os_linux | |||||
plugin_extra_dependencies += [ | |||||
dependency('alsa'), | |||||
] | |||||
endif | |||||
endif | |||||
if plugin_uses_opengl or buildtype == 'debug' | if plugin_uses_opengl or buildtype == 'debug' | ||||
if os_darwin | if os_darwin | ||||
plugin_extra_link_flags += [ | plugin_extra_link_flags += [ | ||||
@@ -19,28 +19,6 @@ plugin_include_dirs = [ | |||||
include_directories('../libs/juce-plugin'), | include_directories('../libs/juce-plugin'), | ||||
] | ] | ||||
############################################################################### | |||||
# dependencies | |||||
dependencies_plugin = [ | |||||
] | |||||
if os_windows | |||||
dependencies_plugin += [ | |||||
cc.find_library('comdlg32'), | |||||
cc.find_library('gdi32'), | |||||
cc.find_library('imm32'), | |||||
cc.find_library('ole32'), | |||||
cc.find_library('oleaut32'), | |||||
cc.find_library('shlwapi'), | |||||
cc.find_library('uuid'), | |||||
cc.find_library('version'), | |||||
cc.find_library('winmm'), | |||||
cc.find_library('wininet'), | |||||
cc.find_library('ws2_32'), | |||||
] | |||||
endif | |||||
############################################################################### | ############################################################################### | ||||
# build flags for plugins | # build flags for plugins | ||||
@@ -167,6 +145,7 @@ endif | |||||
foreach plugin : plugins | foreach plugin : plugins | ||||
if plugin in get_option('plugins') and not build_legacy_only | if plugin in get_option('plugins') and not build_legacy_only | ||||
plugin_uses_devices = false | |||||
plugin_uses_opengl = false | plugin_uses_opengl = false | ||||
plugin_extra_dependencies = [] | plugin_extra_dependencies = [] | ||||
plugin_extra_include_dirs = [] | plugin_extra_include_dirs = [] | ||||
@@ -181,6 +160,15 @@ foreach plugin : plugins | |||||
'../libs/juce-plugin/JucePluginUtils.cpp', | '../libs/juce-plugin/JucePluginUtils.cpp', | ||||
]) | ]) | ||||
if plugin_uses_devices | |||||
link_with_plugin += lib_juce_current_devices | |||||
if os_linux | |||||
plugin_extra_dependencies += [ | |||||
dependency('alsa') | |||||
] | |||||
endif | |||||
endif | |||||
if plugin_uses_opengl | if plugin_uses_opengl | ||||
if os_darwin | if os_darwin | ||||
plugin_extra_link_flags += [ | plugin_extra_link_flags += [ | ||||
@@ -207,7 +195,7 @@ foreach plugin : plugins | |||||
], | ], | ||||
c_args: build_flags + build_flags_plugin + plugin_extra_build_flags, | c_args: build_flags + build_flags_plugin + plugin_extra_build_flags, | ||||
cpp_args: build_flags_cpp + build_flags_plugin + build_flag_plugin_cpp + plugin_extra_build_flags, | cpp_args: build_flags_cpp + build_flags_plugin + build_flag_plugin_cpp + plugin_extra_build_flags, | ||||
dependencies: dependencies_plugin + plugin_extra_dependencies, | |||||
dependencies: plugin_extra_dependencies, | |||||
pic: true, | pic: true, | ||||
install: false, | install: false, | ||||
) | ) | ||||