OSDN Git Service

[cmake] Check for deps before adding.
authorDan Sinclair <dsinclair@google.com>
Mon, 11 Mar 2019 14:48:19 +0000 (10:48 -0400)
committerDan Sinclair <dsinclair@google.com>
Wed, 13 Mar 2019 18:00:31 +0000 (18:00 +0000)
commit6480d4e10cb57f36baa2b03f8eb40b8d04f0e39f
treedad44a32d35720e59730c80121c39f502e058dad
parent25ec7b0cd393f08c41f35fbf86c65d7828759b8c
[cmake] Check for deps before adding.

When embedding SwitftShader into a third party application, the top
level cmake files may already include googletest and SPIRV-Tools. This
CL updates the SwiftShader tests to only try to pull in googletest if
the `gtest` target is not found and only pull in SPIRV-Tools if the
`SPIRV-Tools` target is not found.

Change-Id: I3c3ebb528725017dbbb80aa05b01ee2de8d4a2d1
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/26788
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Dan Sinclair <dsinclair@google.com>
CMakeLists.txt