mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add another flag for enabling a bit bridge build
This commit is contained in:
+47
-20
@@ -12,9 +12,19 @@ winelib_check = '''#ifndef __WINE__
|
||||
#error 1
|
||||
#endif'''
|
||||
if not meson.get_compiler('cpp').compiles(winelib_check)
|
||||
error('You need to set up a cross compiler, check the README for more information.')
|
||||
error('You need to set up a cross compiler, check the README for compilation instructions.')
|
||||
endif
|
||||
|
||||
# Depending on the `use-bitbridge` flag we'll enable building a second 32-bit
|
||||
# host application that can act as a bit bridge for using 32-bit Windows plugins
|
||||
# in 64-bit Linux VST hsots. The plugin will determine which host application to
|
||||
# use based on the `.dll` file it's trying to load.
|
||||
# This setup is necessary until Meson provides a way to have multiple
|
||||
# cross-builds for a single build directory:
|
||||
# https://github.com/mesonbuild/meson/issues/5125
|
||||
host_name_64bit = 'yabridge-host'
|
||||
host_name_32bit = 'yabridge-host-32'
|
||||
|
||||
# This provides an easy way to start the Wine VST host using winedbg since it
|
||||
# can be quite a pain to set up
|
||||
compiler_options = []
|
||||
@@ -22,13 +32,8 @@ if get_option('use-winedbg')
|
||||
compiler_options += '-DUSE_WINEDBG'
|
||||
endif
|
||||
|
||||
# The application consists of a VST plugin (yabridge) that calls a winelib
|
||||
# program (yabridge-host) that can host Windows VST plugins. More information
|
||||
# about the way these two components work together can be found in the readme
|
||||
# file.
|
||||
|
||||
# Generate header files for configuration variables such as the current git tag
|
||||
# and the last commit hash
|
||||
# and the name of the host binary
|
||||
subdir('src/common/config')
|
||||
|
||||
boost_dep = dependency('boost', modules : ['filesystem'])
|
||||
@@ -40,6 +45,11 @@ xcb_dep = dependency('xcb')
|
||||
|
||||
include_dir = include_directories('src/include')
|
||||
|
||||
# The application consists of a VST plugin (yabridge) that calls a winelib
|
||||
# program (yabridge-host) that can host Windows VST plugins. More information
|
||||
# about the way these two components work together can be found in the readme
|
||||
# file.
|
||||
|
||||
shared_library(
|
||||
'yabridge',
|
||||
[
|
||||
@@ -56,21 +66,38 @@ shared_library(
|
||||
link_args : ['-ldl']
|
||||
)
|
||||
|
||||
host_sources = [
|
||||
'src/common/logging.cpp',
|
||||
'src/common/serialization.cpp',
|
||||
'src/wine-host/editor.cpp',
|
||||
'src/wine-host/editor.cpp',
|
||||
'src/wine-host/plugin-bridge.cpp',
|
||||
'src/wine-host/vst-host.cpp',
|
||||
'src/wine-host/utils.cpp',
|
||||
version_header,
|
||||
]
|
||||
|
||||
executable(
|
||||
'yabridge-host',
|
||||
[
|
||||
'src/common/logging.cpp',
|
||||
'src/common/serialization.cpp',
|
||||
'src/wine-host/editor.cpp',
|
||||
'src/wine-host/editor.cpp',
|
||||
'src/wine-host/plugin-bridge.cpp',
|
||||
'src/wine-host/vst-host.cpp',
|
||||
'src/wine-host/utils.cpp',
|
||||
version_header,
|
||||
],
|
||||
host_name_64bit,
|
||||
host_sources,
|
||||
native : false,
|
||||
include_directories : include_dir,
|
||||
dependencies : [boost_dep, bitsery_dep, wine_threads_dep, xcb_dep],
|
||||
cpp_args : compiler_options,
|
||||
link_args : []
|
||||
cpp_args : compiler_options + ['-m64'],
|
||||
link_args : ['-m64']
|
||||
)
|
||||
|
||||
if get_option('use-bitbridge')
|
||||
compiler_options += '-DUSE_BITBRIDGE'
|
||||
|
||||
# TODO: Use 32 bit libraries
|
||||
executable(
|
||||
host_name_32bit,
|
||||
host_sources,
|
||||
native : false,
|
||||
include_directories : include_dir,
|
||||
dependencies : [boost_dep, bitsery_dep, wine_threads_dep, xcb_dep],
|
||||
cpp_args : compiler_options + ['-m32'],
|
||||
link_args : ['-m32']
|
||||
)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user