Skip to content

Commit

Permalink
external-project: Test env kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse committed Nov 11, 2024
1 parent f0851c9 commit 19d3665
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test cases/common/230 external project/libfoo/configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /bin/sh

set -e

srcdir=$(dirname "$0")

for i in "$@"
Expand Down Expand Up @@ -42,3 +44,8 @@ install: libfoo.$LIBEXT
cp \$< "\$(DESTDIR)$LIBDIR";
cp "$srcdir/libfoo.h" "\$(DESTDIR)$INCDIR";
EOL

if [ "$FOO" != "BAR" ]; then
echo "Env FOO is not set"
exit 1
fi
1 change: 1 addition & 0 deletions test cases/common/230 external project/libfoo/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ p = mod.add_project('configure',
'--libext=' + libext,
],
depends: somelib,
env: ['FOO=BAR'],
)

libfoo_dep = declare_dependency(link_with : somelib,
Expand Down

0 comments on commit 19d3665

Please sign in to comment.