Skip to content

Commit

Permalink
Merge pull request #143 from orbcode/libcapstone-optional
Browse files Browse the repository at this point in the history
build: Make libcapstone optional and add version check. This solution makes sense. There are a lot of changes and improvements in capstone4 compared to capstone3 for arm, it's best not to try and be back compatible.
  • Loading branch information
mubes authored Apr 19, 2024
2 parents 7968f96 + 910456e commit 5bfe789
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies = [
dependency('libzmq'),
dependency('SDL2'),
dependency('ncurses', 'ncursesw'),
dependency('capstone'),
dependency('libelf'),
uicolours_default,
sockets,
Expand Down Expand Up @@ -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 not libcapstone.found()
libcapstone = disabler()
endif

if host_machine.system() == 'windows'
stream_src = [
'Src/stream_win32.c',
Expand Down Expand Up @@ -173,7 +177,9 @@ executable('orbmortem',
git_version_info_h,
],
include_directories: incdirs,
dependencies: dependencies,
dependencies: dependencies + [
libcapstone,
],
link_with: liborb,
install: true,
)
Expand Down

0 comments on commit 5bfe789

Please sign in to comment.