Avoid target conflicts with glslang and googletest.
authorLei Zhang <antiagainst@google.com>
Wed, 29 Jul 2015 19:22:09 +0000 (15:22 -0400)
committerLei Zhang <antiagainst@google.com>
Wed, 29 Jul 2015 20:53:58 +0000 (16:53 -0400)
commite3800df71c3a36ee5e1185b46034679fffdf58d6
tree5f302a07a580ac71f6f8aceea713941b178d91ba
parent81d7d49a205b27b72906c7a2634aca9c06786895
Avoid target conflicts with glslang and googletest.

This makes it easier to include spirv-tools into larger cmake-based
projects, which may already include glslang or googletest. It is
currently difficult to do this because of target clashes and a
hardcoded googletest path.

glslang defines a target named SPIRV, so rename ours to SPIRV-TOOLS.

A googletest subdirectory may already be added somewhere else, so if
the external/googletest directory does not exist, probe whether there
is a gtest target defined already. This makes spirv-tools work
out-of-the-box when plopped into a larger project already containing
googletest; otherwise the README.md procedure still works as before.
CMakeLists.txt