diff --git a/meson.build b/meson.build index d7dac2a8..6dba6868 100644 --- a/meson.build +++ b/meson.build @@ -15,7 +15,6 @@ dependencies = [ dependency('libzmq'), dependency('SDL2'), dependency('ncurses', 'ncursesw'), - dependency('capstone'), dependency('libelf'), uicolours_default, sockets, @@ -47,6 +46,11 @@ add_project_arguments(['-include', 'uicolours_default.h'], language: 'c') libdwarf = subproject('libdwarf').get_variable('libdwarf') dependencies += libdwarf +libcapstone = dependency('capstone', version: '>=4', required: false) +if libcapstone.found() + dependencies += libcapstone +endif + if host_machine.system() == 'windows' stream_src = [ 'Src/stream_win32.c', @@ -165,18 +169,20 @@ executable('orbstat', install: true, ) -executable('orbmortem', - sources: [ - 'Src/orbmortem.c', - 'Src/loadelf.c', - 'Src/sio.c', - git_version_info_h, - ], - include_directories: incdirs, - dependencies: dependencies, - link_with: liborb, - install: true, -) +if libcapstone.found() + executable('orbmortem', + sources: [ + 'Src/orbmortem.c', + 'Src/loadelf.c', + 'Src/sio.c', + git_version_info_h, + ], + include_directories: incdirs, + dependencies: dependencies, + link_with: liborb, + install: true, + ) +endif executable('orbprofile', sources: [