cmake: some cleanup of linking parameters

when building the tests, we don't need to link to gtest in the examples
Merge pull request #109 from torbjoernk/feature/cmake-cleanup

cmake: some cleanup of linking parameters