Merge branch 'avoid-cmake-target-conflicts' into 'master'
authorKenneth Benzie <k.benzie@codeplay.com>
Mon, 17 Aug 2015 11:58:16 +0000 (07:58 -0400)
committerKenneth Benzie <k.benzie@codeplay.com>
Mon, 17 Aug 2015 11:58:16 +0000 (07:58 -0400)
Avoid cmake target conflicts

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.

See merge request !1


Trivial merge