mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Always define NOMINMAX and friends globally
Repeating this every time is worse than defining them in the compiler command line.
This commit is contained in:
+20
-19
@@ -48,11 +48,21 @@ compiler_options = [
|
|||||||
'-msse2',
|
'-msse2',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
wine_compiler_options = [
|
||||||
|
# Some stuff from `windows.h` results in conflicting definitions
|
||||||
|
'-DNOMINMAX',
|
||||||
|
# Winsock conflicts with the Posix sockets API. Before Wine 6.8 there was a
|
||||||
|
# `WINE_NOWINSOCK` that would exclude just `winsock.h` from `windows.h`, but
|
||||||
|
# they got rid of that so we now need to explicitly define the ifdef guards
|
||||||
|
'-D__WINE_WINSOCKAPI_STDLIB_H',
|
||||||
|
'-D_WINSOCKAPI_',
|
||||||
|
]
|
||||||
|
|
||||||
# NOTE: GCC doesn't 8-byte align doubles in structs on x86 for ABI-compatibilty
|
# NOTE: GCC doesn't 8-byte align doubles in structs on x86 for ABI-compatibilty
|
||||||
# reasons, but MSVC++ does. We need to force this same alignment to be
|
# reasons, but MSVC++ does. We need to force this same alignment to be
|
||||||
# ABI-compatible with 32-bit binaries created with MSVC++ on Windows.
|
# ABI-compatible with 32-bit binaries created with MSVC++ on Windows.
|
||||||
wine_32bit_compiler_options = ['-m32', '-malign-double']
|
wine_32bit_compiler_options = wine_compiler_options + ['-m32', '-malign-double']
|
||||||
wine_64bit_compiler_options = ['-m64']
|
wine_64bit_compiler_options = wine_compiler_options + ['-m64']
|
||||||
|
|
||||||
# Enable addition assertions on the STL containers during debug builds
|
# Enable addition assertions on the STL containers during debug builds
|
||||||
if get_option('buildtype') == 'debug'
|
if get_option('buildtype') == 'debug'
|
||||||
@@ -209,20 +219,11 @@ if with_vst3
|
|||||||
error('Error while trying to patch the VST3 SDK:\n' + patch_result.stderr())
|
error('Error while trying to patch the VST3 SDK:\n' + patch_result.stderr())
|
||||||
endif
|
endif
|
||||||
|
|
||||||
vst3_wine_compiler_options = [
|
|
||||||
# Some stuff from `windows.h` results in conflicting definitions
|
|
||||||
'-DNOMINMAX',
|
|
||||||
# Winsock conflicts with the Posix sockets API. Before Wine 6.8 there was a
|
|
||||||
# `WINE_NOWINSOCK` that would exclude just `winsock.h` from `windows.h`, but
|
|
||||||
# they got rid of that so we now need to explicitly define the ifdef guards
|
|
||||||
'-D__WINE_WINSOCKAPI_STDLIB_H',
|
|
||||||
'-D_WINSOCKAPI_',
|
|
||||||
]
|
|
||||||
vst3_base_wine_64bit = static_library(
|
vst3_base_wine_64bit = static_library(
|
||||||
'vst3_base_wine_64bit',
|
'vst3_base_wine_64bit',
|
||||||
vst3.get_variable('base_sources'),
|
vst3.get_variable('base_sources'),
|
||||||
native : false,
|
native : false,
|
||||||
cpp_args : vst3_compiler_options + vst3_wine_compiler_options + wine_64bit_compiler_options + [ '-Wno-cpp'],
|
cpp_args : vst3_compiler_options + wine_64bit_compiler_options + [ '-Wno-cpp'],
|
||||||
include_directories : vst3_include_dir,
|
include_directories : vst3_include_dir,
|
||||||
override_options : ['warning_level=0'],
|
override_options : ['warning_level=0'],
|
||||||
)
|
)
|
||||||
@@ -230,7 +231,7 @@ if with_vst3
|
|||||||
'vst3_pluginterfaces_wine_64bit',
|
'vst3_pluginterfaces_wine_64bit',
|
||||||
vst3.get_variable('pluginterfaces_sources'),
|
vst3.get_variable('pluginterfaces_sources'),
|
||||||
native : false,
|
native : false,
|
||||||
cpp_args : vst3_compiler_options + vst3_wine_compiler_options + wine_64bit_compiler_options,
|
cpp_args : vst3_compiler_options + wine_64bit_compiler_options,
|
||||||
include_directories : vst3_include_dir,
|
include_directories : vst3_include_dir,
|
||||||
override_options : ['warning_level=0'],
|
override_options : ['warning_level=0'],
|
||||||
)
|
)
|
||||||
@@ -239,7 +240,7 @@ if with_vst3
|
|||||||
vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'),
|
vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'),
|
||||||
native : false,
|
native : false,
|
||||||
link_with : [vst3_base_wine_64bit, vst3_pluginterfaces_wine_64bit],
|
link_with : [vst3_base_wine_64bit, vst3_pluginterfaces_wine_64bit],
|
||||||
cpp_args : vst3_compiler_options + vst3_wine_compiler_options + wine_64bit_compiler_options + ['-Wno-multichar'],
|
cpp_args : vst3_compiler_options + wine_64bit_compiler_options + ['-Wno-multichar'],
|
||||||
include_directories : vst3_include_dir,
|
include_directories : vst3_include_dir,
|
||||||
override_options : ['warning_level=0'],
|
override_options : ['warning_level=0'],
|
||||||
)
|
)
|
||||||
@@ -249,7 +250,7 @@ if with_vst3
|
|||||||
# This does mean that we now have a lot of defines in our code, but the
|
# 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
|
# alternative would be patching every location in the SDK where they include
|
||||||
# `windows.h`
|
# `windows.h`
|
||||||
compile_args : vst3_compiler_options + vst3_wine_compiler_options,
|
compile_args : vst3_compiler_options + wine_64bit_compiler_options,
|
||||||
)
|
)
|
||||||
|
|
||||||
# And another time for the 32-bit version
|
# And another time for the 32-bit version
|
||||||
@@ -258,7 +259,7 @@ if with_vst3
|
|||||||
'vst3_base_wine_32bit',
|
'vst3_base_wine_32bit',
|
||||||
vst3.get_variable('base_sources'),
|
vst3.get_variable('base_sources'),
|
||||||
native : false,
|
native : false,
|
||||||
cpp_args : vst3_compiler_options + vst3_wine_compiler_options + wine_32bit_compiler_options + ['-Wno-cpp'],
|
cpp_args : vst3_compiler_options + wine_32bit_compiler_options + ['-Wno-cpp'],
|
||||||
include_directories : vst3_include_dir,
|
include_directories : vst3_include_dir,
|
||||||
override_options : ['warning_level=0'],
|
override_options : ['warning_level=0'],
|
||||||
)
|
)
|
||||||
@@ -266,7 +267,7 @@ if with_vst3
|
|||||||
'vst3_pluginterfaces_wine_32bit',
|
'vst3_pluginterfaces_wine_32bit',
|
||||||
vst3.get_variable('pluginterfaces_sources'),
|
vst3.get_variable('pluginterfaces_sources'),
|
||||||
native : false,
|
native : false,
|
||||||
cpp_args : vst3_compiler_options + vst3_wine_compiler_options + wine_32bit_compiler_options,
|
cpp_args : vst3_compiler_options + wine_32bit_compiler_options,
|
||||||
include_directories : vst3_include_dir,
|
include_directories : vst3_include_dir,
|
||||||
override_options : ['warning_level=0'],
|
override_options : ['warning_level=0'],
|
||||||
)
|
)
|
||||||
@@ -275,7 +276,7 @@ if with_vst3
|
|||||||
vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'),
|
vst3.get_variable('sdk_common_sources') + vst3.get_variable('sdk_hosting_sources'),
|
||||||
native : false,
|
native : false,
|
||||||
link_with : [vst3_base_wine_32bit, vst3_pluginterfaces_wine_32bit],
|
link_with : [vst3_base_wine_32bit, vst3_pluginterfaces_wine_32bit],
|
||||||
cpp_args : vst3_compiler_options + vst3_wine_compiler_options + wine_32bit_compiler_options + ['-Wno-multichar'],
|
cpp_args : vst3_compiler_options + wine_32bit_compiler_options + ['-Wno-multichar'],
|
||||||
include_directories : vst3_include_dir,
|
include_directories : vst3_include_dir,
|
||||||
override_options : ['warning_level=0'],
|
override_options : ['warning_level=0'],
|
||||||
)
|
)
|
||||||
@@ -285,7 +286,7 @@ if with_vst3
|
|||||||
# This does mean that we now have a lot of defines in our code, but the
|
# 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
|
# alternative would be patching every location in the SDK where they include
|
||||||
# `windows.h`
|
# `windows.h`
|
||||||
compile_args : vst3_compiler_options + vst3_wine_compiler_options,
|
compile_args : vst3_compiler_options + wine_32bit_compiler_options,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -18,11 +18,6 @@
|
|||||||
|
|
||||||
#include "../boost-fix.h"
|
#include "../boost-fix.h"
|
||||||
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#define __WINE_WINSOCKAPI_STDLIB_H
|
|
||||||
#define _WINSOCKAPI_
|
|
||||||
#endif
|
|
||||||
#include <vestige/aeffectx.h>
|
#include <vestige/aeffectx.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,6 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#define __WINE_WINSOCKAPI_STDLIB_H
|
|
||||||
#define _WINSOCKAPI_
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <function2/function2.hpp>
|
#include <function2/function2.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -23,13 +23,7 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#define __WINE_WINSOCKAPI_STDLIB_H
|
|
||||||
#define _WINSOCKAPI_
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include <boost/asio/dispatch.hpp>
|
#include <boost/asio/dispatch.hpp>
|
||||||
#include <boost/asio/io_context.hpp>
|
#include <boost/asio/io_context.hpp>
|
||||||
#include <function2/function2.hpp>
|
#include <function2/function2.hpp>
|
||||||
|
|||||||
Reference in New Issue
Block a user