Skip to content

Commit

Permalink
use native linenoise if available
Browse files Browse the repository at this point in the history
  • Loading branch information
LizzyFleckenstein03 committed Aug 3, 2024
1 parent cf6be05 commit 85214e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ if not cc.has_function('getline')
deps += dependency('getline')
endif

linenoise = cc.find_library('linenoise', required: false)
if linenoise.found()
linenoise = [linenoise, cc.find_library('stdc++')]
else
linenoise = dependency('linenoise')
endif

common_lib = static_library('dragonblocks',
sources: [
vcs_tag(
Expand Down Expand Up @@ -103,8 +110,8 @@ executable('dragonblocks-client',
dependency('glew'),
dependency('gl'),
dependency('glfw3'),
dependency('linenoise'),
dependency('freetype2'),
linenoise,
],
install: true,
)
Expand Down
4 changes: 2 additions & 2 deletions tools/archlinux/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Maintainer: Lizzy Fleckenstein <[email protected]>

pkgname=dragonblocks-git
pkgver=0.2.2.62.gcc44857
pkgver=0.2.2.64.g46bd431
pkgrel=1
pkgdesc='A multiplayer voxelgame for POSIX systems.'
arch=('i686' 'x86_64')
url='https://github.com/dragonblocks/dragonblocks_alpha'
license=('GPLv3+')
depends=('sqlite3' 'freetype2' 'zlib' 'glfw' 'glew' 'mesa')
depends=('sqlite3' 'freetype2' 'zlib' 'glfw' 'glew' 'mesa' 'linenoise-ng')
makedepends=('meson' 'gcc' 'lua' 'cmake')
source=("git+https://github.com/dragonblocks/dragonblocks_alpha.git")
md5sums=('SKIP')
Expand Down

0 comments on commit 85214e7

Please sign in to comment.