From 8d18b4c24b776fe62c39ad9ce72e1e57ac0aa3ea Mon Sep 17 00:00:00 2001 From: Eugene Gorodinsky Date: Tue, 16 Apr 2019 13:28:08 +0300 Subject: [PATCH] Fix meson.build to work properly with '-Ddatabase=false' --- NEWS | 1 + meson.build | 4 +++- src/db/meson.build | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e0d567722..542905467 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ ver 0.21.8 (not yet released) - httpd: fix use-after-free bug * fix Bonjour bug * fix build failure with GCC 9 +* fix build failure with -Ddatabase=false * systemd: add user socket unit ver 0.21.7 (2019/04/03) diff --git a/meson.build b/meson.build index 466d1149d..40fe2e182 100644 --- a/meson.build +++ b/meson.build @@ -367,8 +367,10 @@ basic_dep = declare_dependency( if enable_database subdir('src/storage') - subdir('src/db') +else + storage_glue_dep = dependency('', required: false) endif +subdir('src/db') if neighbor_glue_dep.found() sources += 'src/command/NeighborCommands.cxx' diff --git a/src/db/meson.build b/src/db/meson.build index 3ad0be246..4f2b32f8e 100644 --- a/src/db/meson.build +++ b/src/db/meson.build @@ -9,6 +9,11 @@ db_api_dep = declare_dependency( link_with: db_api, ) +if not enable_database + db_glue_dep = db_api_dep + subdir_done() +endif + subdir('plugins') db_glue_sources = [