Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ wx_dep = dependency('wxWidgets', version: '>=' + get_option('wx_version'),

if wx_dep.found()
deps += wx_dep
wx_defines_dep = wx_dep
else
build_shared = true
if get_option('default_library') == 'static'
Expand Down Expand Up @@ -184,11 +185,16 @@ else

wx = cmake.subproject('wxWidgets', options: opt_var)

deps += [
wx.dependency('wxmono'),
wx.dependency('wxregex'),
wx.dependency('wxscintilla')
]
deps += wx.dependency('wxmono')
foreach cmake_target: ['wxregex', 'wxscintilla', 'wxlexilla']
if wx.target_list().contains(cmake_target)
deps += wx.dependency(cmake_target)
endif
endforeach

# meson doesn't let you get defines from a library that has sources which need to be built,
# but allows it if you use partial_dependency() to get only includes and compile args.
wx_defines_dep = wx.dependency('wxmono').partial_dependency(compile_args: true, includes: true)

if host_machine.system() == 'windows' or host_machine.system() == 'darwin'
deps += [
Expand Down Expand Up @@ -233,7 +239,7 @@ check_deps = [
]

if host_machine.system() == 'linux'
if cc.get_define('__WXGTK3__', dependencies: wx_dep, prefix: '#include <wx/defs.h>') != ''
if cc.get_define('__WXGTK3__', dependencies: wx_defines_dep, prefix: '#include <wx/defs.h>') != ''
check_deps += [['libportal-gtk3', [], 'libportal', [], []]]
else
check_deps += [['libportal', [], 'libportal', [], []]]
Expand Down
Loading