Skip to content

Commit

Permalink
meson: added x86_64-w64-mingw32.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher31 committed Aug 4, 2022
1 parent 33bf21c commit 233d981
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 3 deletions.
8 changes: 7 additions & 1 deletion libs/compat/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ vstfxstore_h_found = cpp.check_header ('pluginterfaces/vst2.x/vstfxstore.h',
include_directories : vst2_includes, required : false)
juce_conf_data.set10 ('JUCE_PLUGINHOST_VST', aeffect_h_found and aeffectx_h_found)

vst3_includes = include_directories ('../JUCE/modules/juce_audio_processors/format_types/VST3_SDK')
if get_option('vst3sdk') == 'auto'
vst3_includes = include_directories ('../JUCE/modules/juce_audio_processors/format_types/VST3_SDK')
else
vst3_includes = include_directories (get_option ('vst3sdk'))
endif

juce_conf_data.set10 ('JUCE_VST3_CAN_REPLACE_VST2', vstfxstore_h_found)
juce_conf_data.set10 ('JUCE_PLUGINHOST_VST3', true)

lv2_includes = include_directories (
'../JUCE/modules/juce_audio_processors/format_types/LV2_SDK',
'../JUCE/modules/juce_audio_processors/format_types/LV2_SDK/lv2',
Expand Down
3 changes: 2 additions & 1 deletion libs/lua/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if host_machine.system() == 'linux'
elif host_machine.system() == 'darwin'
lua_c_args += '-DLUA_USE_MACOSX'
elif host_machine.system() == 'windows'
lua_c_args += '-DLUA_USE_WINDOWS'
# not actually needed
# lua_c_args += '-DLUA_USE_WINDOWS'
endif

libelement_lua = static_library ('element_lua', '''
Expand Down
15 changes: 15 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ add_global_arguments ([
# Boost
boost_dep = dependency ('boost', required : true)
deps = [ boost_dep ]
ldflags = []

subdir ('libs/lua')
subdir ('libs/compat')
Expand Down Expand Up @@ -258,6 +259,19 @@ if host_machine.system() == 'linux'
]
endif

if host_machine.system() == 'windows'
if meson.is_cross_build()
foreach l : 'uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm dxgi'.split()
deps += cpp.find_library (l)
endforeach
ldflags += [ '-static-libgcc', '-static-libstdc++',
'-Wl,-Bstatic,--whole-archive', '-lwinpthread',
'-Wl,--no-whole-archive' ]
else
# MSVC...
endif
endif

libelement_cpp_args = host_cpp_args
libelement = static_library ('element',
libelement_sources,
Expand All @@ -276,6 +290,7 @@ element_app = executable ('element', 'src/Main.cc',
dependencies : deps,
include_directories : libelement_includes,
gnu_symbol_visibility : 'hidden',
link_args : ldflags,
link_with : [ libelement ])

if host_machine.system() == 'linux'
Expand Down
4 changes: 3 additions & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
option ('vst2sdk', type : 'string', value : 'auto', description : 'Path to VST2 SDK v2.4')
option ('asiosdk', type : 'string', value : 'auto', description : 'Path to ASIO SDK')
option ('vst2sdk', type : 'string', value : 'auto', description : 'Path to VST2 SDK v2.4')
option ('vst3sdk', type : 'string', value : 'auto', description : 'Path to VST3 SDK')
1 change: 1 addition & 0 deletions tools/machine/msvc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ boost_root = 'C:/SDKs/boost_1_71_0'
cpp_args = [ '/bigobj', '/wd4244' ]
bindir = '/'
prefix = '/'
datadir = '/'
30 changes: 30 additions & 0 deletions tools/machine/x86_64-w64-mingw32.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
exe_wrapper = 'wine64'

[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[built-in options]
prefix = '/'
datadir = '/'
bindir = '/'
cpp_args = [
'-Wa,-mbig-obj',
'-Wno-unused-but-set-variable',
'-Wno-deprecated-declarations',
'-Wno-sign-compare',
'-Wno-non-virtual-dtor' ]

[properties]
boost_root = '/opt/SDKs/boost'

[project options]
vst2sdk = '/opt/SDKs/vstsdk2.4'
vst3sdk = '/opt/SDKs/vst3sdk'

0 comments on commit 233d981

Please sign in to comment.