Fix meson.build to work properly with '-Ddatabase=false'

This commit is contained in:
Eugene Gorodinsky 2019-04-16 13:28:08 +03:00 committed by Max Kellermann
parent fe8621906d
commit 8d18b4c24b
3 changed files with 9 additions and 1 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ ver 0.21.8 (not yet released)
- httpd: fix use-after-free bug - httpd: fix use-after-free bug
* fix Bonjour bug * fix Bonjour bug
* fix build failure with GCC 9 * fix build failure with GCC 9
* fix build failure with -Ddatabase=false
* systemd: add user socket unit * systemd: add user socket unit
ver 0.21.7 (2019/04/03) ver 0.21.7 (2019/04/03)

View File

@ -367,8 +367,10 @@ basic_dep = declare_dependency(
if enable_database if enable_database
subdir('src/storage') subdir('src/storage')
subdir('src/db') else
storage_glue_dep = dependency('', required: false)
endif endif
subdir('src/db')
if neighbor_glue_dep.found() if neighbor_glue_dep.found()
sources += 'src/command/NeighborCommands.cxx' sources += 'src/command/NeighborCommands.cxx'

View File

@ -9,6 +9,11 @@ db_api_dep = declare_dependency(
link_with: db_api, link_with: db_api,
) )
if not enable_database
db_glue_dep = db_api_dep
subdir_done()
endif
subdir('plugins') subdir('plugins')
db_glue_sources = [ db_glue_sources = [