Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: QADB algorithm #321

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ yamlcpp_dep = dependency(
method: 'pkg-config',
version: '>=' + run_command(prog_minver, 'yaml-cpp', check: true).stdout().strip(),
)
rapidjson_dep = dependency(
'RapidJSON',
method: 'pkg-config',
version: '>=1.1.0',
fallback: ['rapidjson', 'rapidjson_dep'] ###### TODO: need to test the wrapDB fallback actually works, but last time I tried, I got 'error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Missing Authority Key Identifier'
)
hipo_dep = dependency(
'hipo4',
method: 'pkg-config',
Expand Down Expand Up @@ -76,7 +82,7 @@ thread_dep = dependency(
# themselves are listed last (see FIXME in meson/this_iguana.sh.in)
# NOTE: omit ROOT (handled differently, and most ROOT users already have it in their environment)
dep_list = []
foreach dep : [ hipo_dep, fmt_dep, yamlcpp_dep, rcdb_dep ]
foreach dep : [ hipo_dep, fmt_dep, yamlcpp_dep, rapidjson_dep, rcdb_dep ]
if dep.found()
dep_list += dep
endif
Expand All @@ -89,19 +95,20 @@ dep_pkgconfig_dirs = []
foreach dep : dep_list

# get library and include dirs
libdirs = []
incdirs = []
if dep.type_name() == 'pkgconfig'
libdirs = [ dep.get_variable(pkgconfig: 'libdir') ]
incdirs = [ dep.get_variable(pkgconfig: 'includedir') ]
libdirs += dep.get_variable(pkgconfig: 'libdir', default_value: 'not_defined')
incdirs += dep.get_variable(pkgconfig: 'includedir', default_value: 'not_defined')
elif dep.type_name() == 'cmake'
libdirs = []
foreach lib : dep.get_variable(cmake: 'PACKAGE_LIBRARIES').split(';')
libdirs += run_command('dirname', lib, check: true).stdout().strip()
endforeach
incdirs = ROOT_dep.get_variable(cmake: 'PACKAGE_INCLUDE_DIRS').split(';')
else
name = dep.get_variable(internal: 'name', default_value: dep.name())
if name == 'rcdb'
incdirs = [ dep.get_variable(internal: 'includedir') ]
incdirs += dep.get_variable(internal: 'includedir')
else
warning(f'Unknown dependency "@name@"')
continue
Expand All @@ -110,7 +117,7 @@ foreach dep : dep_list

# append to `dep_*_dirs` arrays, uniquely
foreach libdir : libdirs
if not dep_lib_dirs.contains(libdir)
if not dep_lib_dirs.contains(libdir) and libdir != 'not_defined'
dep_lib_dirs += libdir
endif
if dep.type_name() == 'pkgconfig'
Expand All @@ -121,7 +128,7 @@ foreach dep : dep_list
endif
endforeach
foreach incdir : incdirs
if not dep_include_dirs.contains(incdir)
if not dep_include_dirs.contains(incdir) and incdir != 'not_defined'
dep_include_dirs += incdir
endif
endforeach
Expand Down Expand Up @@ -241,7 +248,7 @@ pkg.generate(
name: meson.project_name(),
description: project_description,
libraries: project_libs,
requires: [ fmt_dep, yamlcpp_dep, hipo_dep ], # pkg-config dependencies only
requires: [ fmt_dep, yamlcpp_dep, rapidjson_dep, hipo_dep ], # pkg-config dependencies only #### FIXME: using wrapDB with rapidjson will probably break this (cf. hipo repo)
variables: project_pkg_vars_nonempty,
)

Expand Down
13 changes: 13 additions & 0 deletions subprojects/rapidjson.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[wrap-file]
directory = rapidjson-1.1.0
source_url = https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz
source_filename = rapidjson-1.1.0.tar.gz
source_hash = bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
patch_filename = rapidjson_1.1.0-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/rapidjson_1.1.0-2/get_patch
patch_hash = c1480d0ecef09dbaa4b4d85d86090205386fb2c7e87f4f158b20dbbda14c9afc
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/rapidjson_1.1.0-2/rapidjson-1.1.0.tar.gz
wrapdb_version = 1.1.0-2

[provide]
rapidjson = rapidjson_dep
Loading