Skip to content

Commit

Permalink
Fix linux pkg-config envs
Browse files Browse the repository at this point in the history
  • Loading branch information
kragniz committed Oct 5, 2018
1 parent 605233c commit 37e839d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmocka; fi

- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./testing/install_cmocka.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PKG_CONFIG_PATH=/home/travis/lib/pkgconfig ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/home/travis/lib/; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then . ./testing/install_cmocka.sh; fi

script:
- make test
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ OBJ = boat.o sailing.o wind.o physics.o testing/test_sailing.o
$(CC) -c -o $@ $< $(CFLAGS)

test: $(OBJ)
echo ${PKG_CONFIG_PATH}
echo ${LD_LIBRARY_PATH}
$(CC) -coverage -o test_sailing $^ $(CFLAGS) $(shell pkg-config --libs --cflags cmocka)

clean:
Expand Down
3 changes: 3 additions & 0 deletions testing/install_cmocka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ make
make install

cd ../..

export PKG_CONFIG_PATH=/home/travis/lib/pkgconfig
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/home/travis/lib/

0 comments on commit 37e839d

Please sign in to comment.