Skip to content

Commit

Permalink
lib/mariadb/meson.build: make optional
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Oct 9, 2023
1 parent 6cade15 commit 7b41e44
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
libsystemd-dev \
libdbus-1-dev \
libcap-dev \
libmariadb-dev \
libseccomp-dev \
libsodium-dev \
libssl-dev \
Expand All @@ -56,6 +57,7 @@ jobs:
-Dcares=enabled \
-Dcurl=enabled \
-Dlua=enabled \
-Dmariadb=enabled \
-Dnettle=enabled \
-Dpcre=enabled \
-Dpg=enabled \
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Optional dependencies:

- `c-ares <https://c-ares.org/>`__
- `libcurl <https://curl.haxx.se/>`__
- `libmariadb <https://mariadb.org/>`__
- `libpq <https://www.postgresql.org/>`__
- `libsodium <https://www.libsodium.org/>`__
- `liburing <https://github.com/axboe/liburing>`__
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ libcommon_require_avahi = get_option('avahi')
libcommon_require_cares = get_option('cares')
libcommon_require_curl = get_option('curl')
libcommon_require_lua = get_option('lua')
libcommon_require_mariadb = get_option('mariadb')
libcommon_require_nettle = get_option('nettle')
libcommon_require_pcre = get_option('pcre')
libcommon_require_pg = get_option('pg')
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ option('avahi', type: 'feature', description: 'Avahi support (using libavahi-cli
option('cares', type: 'feature', description: 'c-ares support')
option('curl', type: 'feature', description: 'CURL support')
option('lua', type: 'feature', description: 'Lua support (using luajit)')
option('mariadb', type: 'feature', description: 'MariaDB support')
option('nettle', type: 'feature', description: 'Nettle support')
option('pcre', type: 'feature', description: 'PCRE support')
option('pg', type: 'feature', description: 'PostgreSQL support (using libpq)')
Expand Down
7 changes: 6 additions & 1 deletion src/lib/mariadb/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
libmariadb = dependency('libmariadb')
libmariadb = dependency('libmariadb',
required: get_variable('libcommon_require_mariadb', true))
if not libmariadb.found()
mariadb_dep = dependency('', required: false)
subdir_done()
endif

mariadb = static_library(
'mariadb',
Expand Down

0 comments on commit 7b41e44

Please sign in to comment.