Skip to content

Commit

Permalink
Merge pull request #2632 from MatthewGentoo/build-cld2
Browse files Browse the repository at this point in the history
build: add cld2 option
  • Loading branch information
djcb committed Feb 25, 2024
2 parents 9d7f3f1 + f88acc0 commit f103e19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ else
endif

# optionally, use Compact Language Detector2 if we can find it.
cld2_dep = meson.get_compiler('cpp').find_library('cld2', required: false)
if cld2_dep.found()
cld2_dep = meson.get_compiler('cpp').find_library('cld2', required: get_option('cld2'))
if not get_option('cld2').disabled() and cld2_dep.found()
config_h_data.set('HAVE_CLD2', 1)
else
message('CLD2 not found; no support for language detection')
message('CLD2 not found or disabled; no support for language detection')
endif

# note: these are for the unit-tests
Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ option('guile',
value: 'auto',
description: 'build the guile scripting support (requires guile-3.x)')

option('cld2',
type : 'feature',
value: 'auto',
description: 'Compact Language Detector2')

# by default, this uses guile_dep.get_variable(pkgconfig: 'extensiondir')
option('guile-extension-dir',
type: 'string',
Expand Down

0 comments on commit f103e19

Please sign in to comment.