Add support for using a system copy of libroaring
Distributions try to avoid using bundled copies of libraries that are maintained in an API- and ABI-stable way. Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
@@ -21,7 +21,11 @@
|
||||
|
||||
#include "gtkbitset.h"
|
||||
|
||||
#ifdef HAVE_LIBROARING
|
||||
#include <roaring/roaring.h>
|
||||
#else
|
||||
#include "roaring.c"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SECTION:gtkbitset
|
||||
|
||||
@@ -968,6 +968,7 @@ gtk_deps = [
|
||||
epoxy_dep,
|
||||
libm,
|
||||
graphene_dep,
|
||||
roaring_dep,
|
||||
]
|
||||
|
||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||
|
||||
19
meson.build
19
meson.build
@@ -683,6 +683,25 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
roaring_dep = []
|
||||
|
||||
internal_roaring = get_option('internal_roaring')
|
||||
if internal_roaring == 'yes'
|
||||
message('Using bundled copy of libroaring as requested.')
|
||||
else
|
||||
roaring_dep = dependency('roaring', required: false)
|
||||
if roaring_dep.found()
|
||||
cdata.set('HAVE_LIBROARING', 1)
|
||||
else
|
||||
if internal_roaring == 'no'
|
||||
error('System copy of libroaring not found, but was explicitly requested.')
|
||||
else
|
||||
message('Using bundled copy of libroaring automatically.')
|
||||
roaring_dep = []
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
cloudproviders_enabled = get_option('cloudproviders')
|
||||
if cloudproviders_enabled
|
||||
cloudproviders_dep = dependency('cloudproviders',
|
||||
|
||||
@@ -27,6 +27,8 @@ option('profiler', type: 'boolean', value: false,
|
||||
description : 'Enable profiler support')
|
||||
option('tracker3', type: 'boolean', value: false,
|
||||
description : 'Enable Tracker3 filechooser search')
|
||||
option('internal_roaring', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
|
||||
description : 'use bundled copy of libroaring?')
|
||||
|
||||
# Print backends
|
||||
option('print-backends', type : 'string', value : 'cups,file',
|
||||
|
||||
Reference in New Issue
Block a user