Don't build 64-bit plugin hosts on 32-bit systems

This should in theory work.
This commit is contained in:
Robbert van der Helm
2021-07-01 15:16:56 +02:00
parent e1e5c8beae
commit 9edae35304
4 changed files with 109 additions and 88 deletions
+38 -34
View File
@@ -45,32 +45,34 @@ vst3_sdk_native = static_library(
override_options : ['warning_level=0'],
)
# And two more dependencies for the host SDK for our Wine host applications
vst3_base_wine_64bit = static_library(
'vst3_base_wine_64bit',
vst3.get_variable('base_sources'),
native : false,
cpp_args : vst3_compiler_options + wine_64bit_compiler_options + [ '-Wno-cpp'],
include_directories : vst3_include_dir,
override_options : ['warning_level=0'],
)
vst3_pluginterfaces_wine_64bit = static_library(
'vst3_pluginterfaces_wine_64bit',
vst3.get_variable('pluginterfaces_sources'),
native : false,
cpp_args : vst3_compiler_options + wine_64bit_compiler_options,
include_directories : vst3_include_dir,
override_options : ['warning_level=0'],
)
vst3_sdk_hosting_wine_64bit = static_library(
'vst3_sdk_hosting_wine_64bit',
vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'),
native : false,
link_with : [vst3_base_wine_64bit, vst3_pluginterfaces_wine_64bit],
cpp_args : vst3_compiler_options + wine_64bit_compiler_options + ['-Wno-multichar'],
include_directories : vst3_include_dir,
override_options : ['warning_level=0'],
)
# We need a separate host SDK dependency for our Wine plugin host applications
if is_64bit_system
vst3_base_wine_64bit = static_library(
'vst3_base_wine_64bit',
vst3.get_variable('base_sources'),
native : false,
cpp_args : vst3_compiler_options + wine_64bit_compiler_options + [ '-Wno-cpp'],
include_directories : vst3_include_dir,
override_options : ['warning_level=0'],
)
vst3_pluginterfaces_wine_64bit = static_library(
'vst3_pluginterfaces_wine_64bit',
vst3.get_variable('pluginterfaces_sources'),
native : false,
cpp_args : vst3_compiler_options + wine_64bit_compiler_options,
include_directories : vst3_include_dir,
override_options : ['warning_level=0'],
)
vst3_sdk_hosting_wine_64bit = static_library(
'vst3_sdk_hosting_wine_64bit',
vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'),
native : false,
link_with : [vst3_base_wine_64bit, vst3_pluginterfaces_wine_64bit],
cpp_args : vst3_compiler_options + wine_64bit_compiler_options + ['-Wno-multichar'],
include_directories : vst3_include_dir,
override_options : ['warning_level=0'],
)
endif
# And another time for the 32-bit version
if with_bitbridge
@@ -111,14 +113,16 @@ vst3_sdk_native_dep = declare_dependency(
compile_args : vst3_compiler_options,
)
vst3_sdk_hosting_wine_64bit_dep = declare_dependency(
link_with : vst3_sdk_hosting_wine_64bit,
include_directories : vst3_include_dir,
# This does mean that we now have a lot of defines in our code, but the
# alternative would be patching every location in the SDK where they include
# `windows.h`
compile_args : vst3_compiler_options + wine_64bit_compiler_options,
)
if is_64bit_system
vst3_sdk_hosting_wine_64bit_dep = declare_dependency(
link_with : vst3_sdk_hosting_wine_64bit,
include_directories : vst3_include_dir,
# This does mean that we now have a lot of defines in our code, but the
# alternative would be patching every location in the SDK where they include
# `windows.h`
compile_args : vst3_compiler_options + wine_64bit_compiler_options,
)
endif
if with_bitbridge
vst3_sdk_hosting_wine_32bit_dep = declare_dependency(
+36 -31
View File
@@ -6,23 +6,25 @@
# As with the libraries, we cannot call `executable()` here since we would like
# to keep all relevant files in the root of the build directory, and Meson
# doesn't have a way to customize that yet.
host_64bit_deps = [
boost_dep,
boost_filesystem_64bit_dep,
bitsery_dep,
function2_dep,
rt_dep,
tomlplusplus_dep,
wine_ole32_dep,
wine_threads_dep,
xcb_64bit_dep,
]
if with_vst3
host_64bit_deps += [
vst3_sdk_hosting_wine_64bit_dep,
wine_shell32_dep,
wine_uuid_dep,
if is_64bit_system
host_64bit_deps = [
boost_dep,
boost_filesystem_64bit_dep,
bitsery_dep,
function2_dep,
rt_dep,
tomlplusplus_dep,
wine_ole32_dep,
wine_threads_dep,
xcb_64bit_dep,
]
if with_vst3
host_64bit_deps += [
vst3_sdk_hosting_wine_64bit_dep,
wine_shell32_dep,
wine_uuid_dep,
]
endif
endif
if with_bitbridge
@@ -146,21 +148,24 @@ group_host_sources = files(
version_header,
]
host_common_64bit = static_library(
'host_common_64bit',
host_common_sources,
native : false,
include_directories : include_dir,
dependencies : host_64bit_deps,
cpp_args : compiler_options + wine_64bit_compiler_options,
link_args : ['-m64'],
)
host_common_64bit_dep = declare_dependency(
link_with : host_common_64bit,
include_directories : include_dir,
dependencies : host_64bit_deps,
compile_args : compiler_options + wine_64bit_compiler_options,
)
if is_64bit_system
host_common_64bit = static_library(
'host_common_64bit',
host_common_sources,
native : false,
include_directories : include_dir,
dependencies : host_64bit_deps,
cpp_args : compiler_options + wine_64bit_compiler_options,
link_args : ['-m64'],
)
host_common_64bit_dep = declare_dependency(
link_with : host_common_64bit,
include_directories : include_dir,
dependencies : host_64bit_deps,
compile_args : compiler_options + wine_64bit_compiler_options,
)
endif
if with_bitbridge
host_common_32bit = static_library(
'host_common_32bit',