step: fix meson

This commit is contained in:
Alexander Couzens 2022-06-14 23:20:50 +02:00
parent 32b0253a55
commit 64e9506555
3 changed files with 6 additions and 5 deletions

View File

@ -17,12 +17,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <mongoc.h>
#include "ogs-dbi.h"
int __ogs_dbi_domain;
#ifdef OGS_DBI_WITH_MONGODB
#include <mongoc.h>
static ogs_mongoc_t self;
/*

View File

@ -24,12 +24,11 @@
#ifndef OGS_MONGOC_H
#define OGS_MONGOC_H
#include <mongoc.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct ogs_mongoc_s {
bool initialized;
const char *name;

View File

@ -115,7 +115,7 @@ subdir('src')
subdir('misc')
# Don't build the tests unless we can run them (either natively or in an exe wrapper)
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
if build_tests and get_option('mongodb')
subdir('tests')
endif