From 1dcfbbd194218c1934569aed33cf6d84a7201a11 Mon Sep 17 00:00:00 2001 From: line0 Date: Sun, 12 Apr 2020 21:51:28 +0200 Subject: [PATCH] meson: add missing link dependencies on windows --- meson.build | 23 +++++++++++++++++++---- src/meson.build | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index c85f076bc..5ba12f0f0 100644 --- a/meson.build +++ b/meson.build @@ -89,9 +89,9 @@ else # this will only be hit with msvc endif wx = cmake.subproject('wxWidgets', cmake_options: ['-DwxBUILD_INSTALL=OFF', - '-DwxBUILD_PRECOMP=OFF', # breaks project generation w/ meson + '-DwxBUILD_PRECOMP=OFF', # otherwise breaks project generation w/ meson '-DwxBUILD_SHARED=@0@'.format(buildShared), - '-DwxBUILD_MONOLITHIC=ON']) + '-DwxBUILD_MONOLITHIC=ON']) # otherwise breaks project generation w/ meson deps += [ wx.dependency('mono'), wx.dependency('wxzlib'), @@ -99,6 +99,19 @@ else # this will only be hit with msvc wx.dependency('wxexpat'), wx.dependency('wxscintilla') ] + + if host_machine.system() == 'windows' + if cc.has_header('rpc.h') + deps += cc.find_library('rpcrt4', required: true) + else + error('Missing Windows SDK RPC Library (rpc.h / rpcrt4.lib)') + endif + if cc.has_header('commctrl.h') + deps += cc.find_library('comctl32', required: true) + else + error('Missing Windows SDK Common Controls Library (commctrl.h / comctl32.lib)') + endif + endif endif endif @@ -155,8 +168,10 @@ if host_machine.system() == 'windows' and not get_option('directsound').disabled if not have_dsound_h and get_option('directsound').enabled() error('DirectSound enabled but dsound.h not found') endif - if dsound_dep.found() and winmm_dep.found() and ole32_dep.found() and have_dsound_h - deps += [dsound_dep, winmm_dep, ole32_dep] + + dxguid_dep = cc.find_library('dxguid', required: true) + if dsound_dep.found() and winmm_dep.found() and ole32_dep.found() and dxguid_dep.found() and have_dsound_h + deps += [dsound_dep, winmm_dep, ole32_dep, dxguid_dep] conf.set('WITH_DIRECTSOUND', '1') dep_avail += 'DirectSound' endif diff --git a/src/meson.build b/src/meson.build index e01353ae4..bf932654e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -171,6 +171,20 @@ if host_machine.system() == 'darwin' 'osx/retina_helper.mm', 'osx/scintilla_ime.mm', ] +elif host_machine.system() == 'windows' + aegisub_src += [ + 'font_file_lister_gdi.cpp' + ] + if cc.has_header('wingdi.h') + deps += cc.find_library('gdi32', required: true) + else + error('Missing Windows SDK GDI Library (wingdi.h / gdi32.lib)') + endif + if cc.has_header('usp10.h') + deps += cc.find_library('usp10', required: true) + else + error('Missing Windows SDK Uniscribe Library (usp10.h / usp10.lib)') + endif elif conf.get('WITH_FONTCONFIG') == '1' aegisub_src += 'font_file_lister_fontconfig.cpp' endif