From 9816680435217692c5059c1df759fbbfb24b5835 Mon Sep 17 00:00:00 2001 From: apoorv569 Date: Mon, 3 May 2021 08:05:59 +0530 Subject: [PATCH] Updating meson.build to fix a issue with wxWidgets --- meson.build | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 49652ad..99ff8f0 100755 --- a/meson.build +++ b/meson.build @@ -18,15 +18,24 @@ src = [ ] -wx = dependency('wxwidgets', modules : ['media', 'std']) +wxconfig = find_program (['wx-config-gtk3', 'wx-config']) +wx_modules = ['media', 'std'] +wx_cxx_flags = [] +wx_libs = [] + +foreach module : wx_modules + wx_cxx_flags += run_command (wxconfig, '--cxxflags', module).stdout ().strip ().split() + wx_libs += run_command (wxconfig, '--libs', module).stdout ().strip ().split() +endforeach + +wx = dependency('wxwidgets', version: '>=3.0.5') wxsvg = dependency('libwxsvg') -taglib = dependency('taglib') +taglib = dependency('taglib', version: '>=1.12') sqlite3 = dependency('sqlite3') yaml = dependency('yaml-cpp') -wx_inc = include_directories('/usr/include/wx-3.0') - executable('SampleHive', sources : src, - dependencies : [wx, wxsvg, taglib, sqlite3, yaml], - include_directories : wx_inc) + cpp_args: [wx_cxx_flags], + link_args: [wx_libs], + dependencies : [wx, wxsvg, taglib, sqlite3, yaml])