diff options
| author | Ahmad Fatoum <[email protected]> | 2018-07-03 20:34:31 +0200 |
|---|---|---|
| committer | Ahmad Fatoum <[email protected]> | 2018-07-03 21:35:28 +0200 |
| commit | c3aeaf4a4941514653b9e3f3b7e1ea0965ef925f (patch) | |
| tree | 90dcf9d458c6c4ea9bea727b2e802a94930fb991 /cmake | |
| parent | 61747508b0b0ee77b1de40a1c7f0a483c1a07e05 (diff) | |
| download | raylib-c3aeaf4a4941514653b9e3f3b7e1ea0965ef925f.tar.gz raylib-c3aeaf4a4941514653b9e3f3b7e1ea0965ef925f.zip | |
Travis CI: Add test case for pkg-config
Diffstat (limited to 'cmake')
| -rwxr-xr-x | cmake/test-pkgconfig.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/test-pkgconfig.sh b/cmake/test-pkgconfig.sh new file mode 100755 index 00000000..ccbdfb65 --- /dev/null +++ b/cmake/test-pkgconfig.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Test if including/linking/running an installed raylib works + +set -x +export LD_RUN_PATH=/usr/local/lib + +CFLAGS="-Wall -Wextra -Werror $CFLAGS" +if [ "$ARCH" = "i386" ]; then +CFLAGS="-m32 $CLFAGS" +fi + +cat << EOF | ${CC:-cc} -otest -xc - $(pkg-config --libs --cflags $@ raylib.pc) $CFLAGS && exec ./test +#include <stdlib.h> +#include <raylib.h> + +int main(void) +{ + int num = GetRandomValue(42, 1337); + return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE; +} +EOF |
