Compare commits

...

1 Commits

Author SHA1 Message Date
Simon McVittie
33e4cb8e9f 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>
2020-08-07 21:17:45 +01:00
4 changed files with 26 additions and 0 deletions

View File

@@ -21,7 +21,11 @@
#include "gtkbitset.h"
#ifdef HAVE_LIBROARING
#include <roaring/roaring.h>
#else
#include "roaring.c"
#endif
/**
* SECTION:gtkbitset

View File

@@ -968,6 +968,7 @@ gtk_deps = [
epoxy_dep,
libm,
graphene_dep,
roaring_dep,
]
if harfbuzz_dep.found() and pangoft_dep.found()

View File

@@ -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',

View File

@@ -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',