Skip to content

Commit

Permalink
Fixed some build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeetchhetri committed Jun 9, 2024
1 parent 531468e commit ec83c4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ if get_option('MOD_SDORM_SQL') == true
if not cc.has_header('libpq-fe.h', args : '-I/usr/local/include/postgresql')
if cc.has_header('libpq-fe.h', args : '-I/usr/local/include/pgsql')
pqincpath = '/usr/local/include/pgsql'
else if cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/postgresql')
elif cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/postgresql')
pqincpath = '/opt/homebrew/include/postgresql'
else if cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/pgsql')
elif cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/pgsql')
pqincpath = '/opt/homebrew/include/pgsql'
else
error('libpq headers not found')
Expand Down Expand Up @@ -189,7 +189,7 @@ if get_option('MOD_SDORM_MONGO') == true
if not cc.has_header('bson.h', args : '-I/usr/include/libbson-1.0')
if cc.has_header('bson.h', args : '-I/usr/local/include/libbson-1.0')
global_includes += ['/usr/local/include/libbson-1.0']
else notif cc.has_header('bson.h', args : '-I/opt/homebrew/include/libbson-1.0')
elif cc.has_header('bson.h', args : '-I/opt/homebrew/include/libbson-1.0')
global_includes += ['/opt/homebrew/include/libbson-1.0']
else
error('bson headers not found')
Expand All @@ -200,7 +200,7 @@ if get_option('MOD_SDORM_MONGO') == true
if not cc.has_header('mongoc.h', args : '-I/usr/include/libmongoc-1.0')
if cc.has_header('mongoc.h', args : '-I/usr/local/include/libmongoc-1.0')
global_includes += ['/usr/local/include/libmongoc-1.0']
else notif cc.has_header('mongoc.h', args : '-I/opt/homebrew/include/libmongoc-1.0')
elif cc.has_header('mongoc.h', args : '-I/opt/homebrew/include/libmongoc-1.0')
global_includes += ['/opt/homebrew/include/libmongoc-1.0']
else
error('mongoc headers not found')
Expand Down
4 changes: 2 additions & 2 deletions sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ if bool(mod_mongo):
if FindFile('bson.h', '/usr/include/libbson-1.0'):
conf.env.Append(CPPPATH=['/usr/include/libbson-1.0'])
conf.env.Append(CPPPATH=['/usr/include/libmongoc-1.0'])
conf.env.Append(CPPDEFINES=['HAVE_BSONLIB', 'HAVE_MONGOCLIB', 'HAVE_BSONINC', 'HAVE_MONGOINC', 'INC_SDORM', 'INC_SDORM_MONGO'])
elif FindFile('bson.h', '/usr/local/include/libbson-1.0'):
conf.env.Append(CPPPATH=['/usr/local/include/libbson-1.0'])
conf.env.Append(CPPPATH=['/usr/local/include/libmongoc-1.0'])
conf.env.Append(CPPDEFINES=['HAVE_BSONLIB', 'HAVE_MONGOCLIB', 'HAVE_BSONINC', 'HAVE_MONGOINC', 'INC_SDORM', 'INC_SDORM_MONGO'])
elif FindFile('bson.h', '/opt/homebrewinclude/libbson-1.0'):
conf.env.Append(CPPPATH=['/opt/homebrew/include/libbson-1.0'])
conf.env.Append(CPPPATH=['/opt/homebrew/include/libmongoc-1.0'])

if oi or li:
conf.env.Append(CPPDEFINES=['HAVE_BSONLIB', 'HAVE_MONGOCLIB', 'HAVE_BSONINC', 'HAVE_MONGOINC', 'INC_SDORM', 'INC_SDORM_MONGO'])
else:
print('Did not find mongo development files!')
Expand Down

0 comments on commit ec83c4d

Please sign in to comment.