Browse Source

Make juce_audio_devices optional, cleanup meson files

Fixes #71

Signed-off-by: falkTX <falktx@falktx.com>
tags/2021-03-15
falkTX 4 years ago
parent
commit
da2868f1a4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 120 additions and 67 deletions
  1. +5
    -1
      libs/juce-current/AppConfig.h
  2. +17
    -2
      libs/juce-current/meson.build
  3. +5
    -1
      libs/juce-legacy/AppConfig.h
  4. +17
    -2
      libs/juce-legacy/meson.build
  5. +44
    -22
      meson.build
  6. +4
    -0
      ports-legacy/dexed/meson.build
  7. +17
    -16
      ports-legacy/meson.build
  8. +11
    -23
      ports/meson.build

+ 5
- 1
libs/juce-current/AppConfig.h View File

@@ -10,7 +10,6 @@
#define BUILD_JUCE_APPCONFIG_H_INCLUDED
#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_plugin_client 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_video 0
// optional
#ifndef JUCE_MODULE_AVAILABLE_juce_audio_devices
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 0
#endif
//=============================================================================
#define JUCE_STANDALONE_APPLICATION 0


+ 17
- 2
libs/juce-current/meson.build View File

@@ -3,7 +3,6 @@
if linux_embed
juce_current_srcs = [
'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_processors/juce_audio_processors.cpp',
'source/modules/juce_audio_utils/juce_audio_utils.cpp',
@@ -16,7 +15,6 @@ if linux_embed
else
juce_current_srcs = [
'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_processors/juce_audio_processors.cpp',
'source/modules/juce_audio_utils/juce_audio_utils.cpp',
@@ -32,6 +30,10 @@ else
]
endif

juce_current_devices_srcs = [
'source/modules/juce_audio_devices/juce_audio_devices.cpp',
]

juce_current_extra_cpp_args = [
'-std=gnu++14',
'-Wno-non-virtual-dtor',
@@ -64,4 +66,17 @@ lib_juce_current = static_library('juce-current',
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,
)

###############################################################################

+ 5
- 1
libs/juce-legacy/AppConfig.h View File

@@ -10,7 +10,6 @@
#define BUILD_JUCE_APPCONFIG_H_INCLUDED
#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_plugin_client 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_video 0
// optional
#ifndef JUCE_MODULE_AVAILABLE_juce_audio_devices
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 0
#endif
//=============================================================================
#define JUCE_STANDALONE_APPLICATION 0


+ 17
- 2
libs/juce-legacy/meson.build View File

@@ -3,7 +3,6 @@
if linux_embed
juce_legacy_srcs = [
'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_processors/juce_audio_processors.cpp',
'source/modules/juce_audio_utils/juce_audio_utils.cpp',
@@ -16,7 +15,6 @@ if linux_embed
else
juce_legacy_srcs = [
'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_processors/juce_audio_processors.cpp',
'source/modules/juce_audio_utils/juce_audio_utils.cpp',
@@ -32,6 +30,10 @@ else
]
endif

juce_legacy_devices_srcs = [
'source/modules/juce_audio_devices/juce_audio_devices.cpp',
]

juce_legacy_extra_cpp_args = [
'-Wno-non-virtual-dtor',
]
@@ -56,4 +58,17 @@ lib_juce_legacy = static_library('juce-legacy',
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,
)

###############################################################################

+ 44
- 22
meson.build View File

@@ -74,22 +74,42 @@ cpp = meson.get_compiler('cpp')
###############################################################################
# dependencies

dependencies = [
]

if os_linux
dependencies += [
dependencies = [
cc.find_library('dl'),
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('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

@@ -236,17 +256,19 @@ subdir('ports-legacy')
###############################################################################
# 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

###############################################################################

+ 4
- 0
ports-legacy/dexed/meson.build View File

@@ -30,5 +30,9 @@ plugin_srcs = files([
])

plugin_name = 'Dexed'
plugin_uses_devices = true
plugin_extra_build_flags = [
'-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1'
]

###############################################################################

+ 17
- 16
ports-legacy/meson.build View File

@@ -72,22 +72,13 @@ plugin_include_dirs = [
###############################################################################
# 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

@@ -197,6 +188,7 @@ if build_lv2 or build_vst2
if plugin in get_option('plugins')
plugin_uses_drowaudio = false
plugin_uses_juced = false
plugin_uses_devices = false
plugin_uses_opengl = false
plugin_extra_dependencies = []
plugin_extra_include_dirs = []
@@ -223,6 +215,15 @@ if build_lv2 or build_vst2
link_with_plugin += lib_juced
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 os_darwin
plugin_extra_link_flags += [


+ 11
- 23
ports/meson.build View File

@@ -19,28 +19,6 @@ plugin_include_dirs = [
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

@@ -167,6 +145,7 @@ endif

foreach plugin : plugins
if plugin in get_option('plugins') and not build_legacy_only
plugin_uses_devices = false
plugin_uses_opengl = false
plugin_extra_dependencies = []
plugin_extra_include_dirs = []
@@ -181,6 +160,15 @@ foreach plugin : plugins
'../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 os_darwin
plugin_extra_link_flags += [
@@ -207,7 +195,7 @@ foreach plugin : plugins
],
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,
dependencies: dependencies_plugin + plugin_extra_dependencies,
dependencies: plugin_extra_dependencies,
pic: true,
install: false,
)


Loading…
Cancel
Save