Browse Source

Start conversion to meson, libraries done

tags/2020-07-14
falkTX 3 years ago
parent
commit
b4f51e1c7f
15 changed files with 280 additions and 83 deletions
  1. +22
    -21
      .gitignore
  2. +0
    -14
      libs/drowaudio/Makefile
  3. +0
    -1
      libs/drowaudio/build-drowaudio/AppConfig.h
  4. +0
    -16
      libs/drowaudio/build-drowaudio/premake.lua
  5. +18
    -0
      libs/drowaudio/meson.build
  6. +0
    -0
      libs/juce-legacy/AppConfig.h
  7. +47
    -0
      libs/juce-legacy/meson.build
  8. +0
    -0
      libs/juce-legacy/premake.lua
  9. +0
    -14
      libs/juced/Makefile
  10. +0
    -1
      libs/juced/build-juced/AppConfig.h
  11. +0
    -16
      libs/juced/build-juced/premake.lua
  12. +18
    -0
      libs/juced/meson.build
  13. +7
    -0
      libs/meson.build
  14. +139
    -0
      meson.build
  15. +29
    -0
      meson_options.txt

+ 22
- 21
.gitignore View File

@@ -28,6 +28,7 @@ ports-legacy/*/VST*/Makefile

bin/lv2
bin/vst
build/
debian
intermediate
lv2_ttl_generator
@@ -41,24 +42,24 @@ sdks/VST3SDK/*
_old
ports/_todo

libs/juce/source/.gitignore
libs/juce/source/.github
libs/juce/source/ChangeList.txt
libs/juce/source/amalgamation/
libs/juce/source/docs/
libs/juce/source/examples/
libs/juce/source/extras/
libs/juce/source/juce.h
libs/juce/source/juce_amalgamated.cpp
libs/juce/source/juce_amalgamated.h
libs/juce/source/juce_amalgamated.mm
libs/juce/source/BREAKING-CHANGES.txt
libs/juce/source/README.md
libs/juce/source/doxygen/
libs/juce/source/modules/JUCE Module Format.txt
libs/juce/source/modules/juce_blocks_basics/
libs/juce/source/modules/juce_box2d/
libs/juce/source/modules/juce_browser_plugin_client/
libs/juce/source/modules/juce_osc/
libs/juce/source/modules/juce_product_unlocking/
libs/juce/source/modules/juce_video/
libs/juce-legacy/source/.gitignore
libs/juce-legacy/source/.github
libs/juce-legacy/source/ChangeList.txt
libs/juce-legacy/source/amalgamation/
libs/juce-legacy/source/docs/
libs/juce-legacy/source/examples/
libs/juce-legacy/source/extras/
libs/juce-legacy/source/juce.h
libs/juce-legacy/source/juce_amalgamated.cpp
libs/juce-legacy/source/juce_amalgamated.h
libs/juce-legacy/source/juce_amalgamated.mm
libs/juce-legacy/source/BREAKING-CHANGES.txt
libs/juce-legacy/source/README.md
libs/juce-legacy/source/doxygen/
libs/juce-legacy/source/modules/JUCE Module Format.txt
libs/juce-legacy/source/modules/juce_blocks_basics/
libs/juce-legacy/source/modules/juce_box2d/
libs/juce-legacy/source/modules/juce_browser_plugin_client/
libs/juce-legacy/source/modules/juce_osc/
libs/juce-legacy/source/modules/juce_product_unlocking/
libs/juce-legacy/source/modules/juce_video/

+ 0
- 14
libs/drowaudio/Makefile View File

@@ -1,14 +0,0 @@
# Compile the drowaudio shared lib

all:
$(MAKE) -C build-drowaudio

clean:
$(MAKE) clean -C build-drowaudio
rm -rf build-*/intermediate

distclean: clean
rm -f build-*/Makefile
rm -f build-*/*.make
rm -f build-*/*.sln
rm -f build-*/*.vcproj

+ 0
- 1
libs/drowaudio/build-drowaudio/AppConfig.h View File

@@ -1 +0,0 @@
../../juce-legacy/build-juce-legacy/AppConfig.h

+ 0
- 16
libs/drowaudio/build-drowaudio/premake.lua View File

@@ -1,16 +0,0 @@
dofile("../../../scripts/make-project.lua")
package = make_library_project("drowaudio")
package.includepaths = {
".",
"../../juce-legacy/source",
"../../juce-legacy/source/modules"
}
package.files = {
matchfiles (
"../source/dRowAudio/dRowAudio.cpp"
)
}

+ 18
- 0
libs/drowaudio/meson.build View File

@@ -0,0 +1,18 @@
###############################################################################

lib_drowaudio = static_library('drowaudio',
sources: [
'source' / 'dRowAudio' / 'dRowAudio.cpp'
],
include_directories: [
include_directories('.'),
include_directories('..' / 'juce-legacy'),
include_directories('..' / 'juce-legacy' / 'source'),
include_directories('..' / 'juce-legacy' / 'source' / 'modules'),
],
cpp_args: build_flags_cpp,
pic: true,
install: false,
)

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

libs/juce-legacy/build-juce-legacy/AppConfig.h → libs/juce-legacy/AppConfig.h View File


+ 47
- 0
libs/juce-legacy/meson.build View File

@@ -0,0 +1,47 @@
###############################################################################

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',
'source/modules/juce_core/juce_core.cpp',
'source/modules/juce_cryptography/juce_cryptography.cpp',
'source/modules/juce_data_structures/juce_data_structures.cpp',
'source/modules/juce_dsp/juce_dsp.cpp',
'source/modules/juce_events/juce_events.cpp',
]
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',
'source/modules/juce_core/juce_core.cpp',
'source/modules/juce_cryptography/juce_cryptography.cpp',
'source/modules/juce_data_structures/juce_data_structures.cpp',
'source/modules/juce_dsp/juce_dsp.cpp',
'source/modules/juce_events/juce_events.cpp',
'source/modules/juce_graphics/juce_graphics.cpp',
'source/modules/juce_gui_basics/juce_gui_basics.cpp',
'source/modules/juce_gui_extra/juce_gui_extra.cpp',
'source/modules/juce_opengl/juce_opengl.cpp',
]
endif

lib_juce_legacy = static_library('juce-legacy',
sources: juce_legacy_srcs,
include_directories: [
include_directories('.'),
include_directories('source'),
include_directories('source' / 'modules'),
],
cpp_args: build_flags_cpp,
pic: true,
install: false,
)

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

libs/juce-legacy/build-juce-legacy/premake.lua → libs/juce-legacy/premake.lua View File


+ 0
- 14
libs/juced/Makefile View File

@@ -1,14 +0,0 @@
# Compile the juced shared lib

all:
$(MAKE) -C build-juced

clean:
$(MAKE) clean -C build-juced
rm -rf build-*/intermediate

distclean: clean
rm -f build-*/Makefile
rm -f build-*/*.make
rm -f build-*/*.sln
rm -f build-*/*.vcproj

+ 0
- 1
libs/juced/build-juced/AppConfig.h View File

@@ -1 +0,0 @@
../../juce-legacy/build-juce-legacy/AppConfig.h

+ 0
- 16
libs/juced/build-juced/premake.lua View File

@@ -1,16 +0,0 @@
dofile("../../../scripts/make-project.lua")
package = make_library_project("juced")
package.includepaths = {
".",
"../../juce-legacy/source",
"../../juce-legacy/source/modules"
}
package.files = {
matchfiles (
"../source/juced.cpp"
)
}

+ 18
- 0
libs/juced/meson.build View File

@@ -0,0 +1,18 @@
###############################################################################

lib_juced = static_library('juced',
sources: [
'source' / 'juced.cpp'
],
include_directories: [
include_directories('.'),
include_directories('..' / 'juce-legacy'),
include_directories('..' / 'juce-legacy' / 'source'),
include_directories('..' / 'juce-legacy' / 'source' / 'modules'),
],
cpp_args: build_flags_cpp,
pic: true,
install: false,
)

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

+ 7
- 0
libs/meson.build View File

@@ -0,0 +1,7 @@
###############################################################################

subdir('drowaudio')
subdir('juced')
subdir('juce-legacy')

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

+ 139
- 0
meson.build View File

@@ -0,0 +1,139 @@
###############################################################################

project('DISTRHO-Ports',
'c', 'cpp',
license : 'GPLv3'
)

###############################################################################
# get options

buildtype = get_option('buildtype')
prefix = get_option('prefix')
bindir = get_option('bindir')
libdir = get_option('libdir')

linux_embed = get_option('linux-embed')
optimizations = get_option('optimizations')

###############################################################################
# set target OS

os_darwin = false
os_linux = false
os_windows = false

if host_machine.system() == 'darwin'
os_darwin = true
elif host_machine.system() == 'windows'
os_windows = true
else
os_linux = true
endif

###############################################################################
# set OS-specific details

if os_darwin
bin_suffix = ''
lib_suffix = '.dylib'
elif os_windows
bin_suffix = '.exe'
lib_suffix = '.dll'
else
bin_suffix = ''
lib_suffix = '.so'
endif

###############################################################################
# base compiler details

cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')

build_flags = [
'-DJUCE_APP_CONFIG_HEADER="AppConfig.h"',
'-pthread',
'-Wall', '-Wno-multichar', '-Wno-unused-but-set-variable', '-Wno-unused-function', '-Wno-strict-overflow',
]

build_flags_cpp = [
]

build_flags_release = [
'-O3', '-fvisibility=hidden', '-DNDEBUG=1',
]

build_flags_release_cpp = [
'-fvisibility-inlines-hidden',
]

build_flags_debug = [
'-O0', '-ggdb', '-DDEBUG=1', '-D_DEBUG=1',
]

build_flags_debug_cpp = [
]

if optimizations and not linux_embed
build_flags_release += [
'-mtune=generic', '-msse', '-msse2',
]
endif

if not os_darwin
build_flags_cpp += [
'-std=gnu++11',
]
build_flags_release += [
'-fdata-sections', '-ffunction-sections',
]
endif

if os_darwin
build_flags += [
'-DMAC=1',
]
build_flags_cpp += [
'-ObjC++',
]
elif os_windows
build_flags += [
'-DWINDOWS=1',
]
build_flags_cpp += [
'-fpermissive',
]
elif linux_embed
build_flags += [
'-DLINUX=1',
]
build_flags_cpp += [
'-DJUCE_AUDIOPROCESSOR_NO_GUI=1',
]
else
build_flags += [
'-DLINUX=1',
]
build_flags_cpp += [
'`pkg-config --cflags alsa freetype2 x11 xext`',
]
endif

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

if buildtype == 'debug'
build_flags = build_flags + build_flags_debug
build_flags_cpp = build_flags + build_flags_cpp + build_flags_debug_cpp
else
build_flags = build_flags + build_flags_release
build_flags_cpp = build_flags + build_flags_cpp + build_flags_release_cpp
endif

###############################################################################
# go into subdir to build libraries and plugins

subdir('libs')
# subdir('ports')

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

+ 29
- 0
meson_options.txt View File

@@ -0,0 +1,29 @@
option('optimizations',
type: 'boolean',
value: true,
description: 'Enable SSE2 optimizations'
)

option('linux-embed',
type: 'boolean',
value: true,
description: 'DSP-only plugin builds, without editor/GUI'
)

option('build-lv2',
type: 'boolean',
value: true,
description: 'Build LV2 plugin variants'
)

option('build-vst2',
type: 'boolean',
value: true,
description: 'Build VST2 plugin variants'
)

option('build-vst3',
type: 'boolean',
value: true,
description: 'Build VST3 plugin variants'
)

Loading…
Cancel
Save