Skip to content

Commit

Permalink
build: Make libSDL2 optional and only link orblcd against it
Browse files Browse the repository at this point in the history
* Only orblcd requires libSDL2.
* Allow building the command-line tools if libSDL2 is not found.
* Don't link them all against libSDL2.
  • Loading branch information
ALTracer committed Jun 2, 2024
1 parent 9a36749 commit 25d047c
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 @@ -13,7 +13,6 @@ dependencies = [
dependency('threads'),
dependency('libusb-1.0'),
dependency('libzmq'),
dependency('SDL2'),
dependency('ncurses', 'ncursesw'),
dependency('libelf'),
uicolours_default,
Expand Down Expand Up @@ -51,6 +50,11 @@ if not libcapstone.found()
libcapstone = disabler()
endif

libSDL2 = dependency('SDL2', required: false)
if not libSDL2.found()
libSDL2 = disabler()
endif

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

0 comments on commit 25d047c

Please sign in to comment.