Add missing CMake spirv-cross dependency

Also add a missing SPIRV-Tool link

Change-Id: I0d81b6878f09017147b9ccbe21a5784383535ba9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Aleksi Sapon 2020-09-09 16:39:00 +00:00 committed by Commit Bot service account
parent 0a1061da0c
commit 97b880e6ff
2 changed files with 12 additions and 0 deletions

View File

@ -150,6 +150,9 @@ target_link_libraries(dawn_native
dawn_platform
dawn_internal_config
spirv-cross-core
spirv-cross-glsl
spirv-cross-hlsl
SPIRV-Tools
)
if (DAWN_USE_X11)

View File

@ -12,6 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (NOT TARGET spirv-cross)
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_SKIP_INSTALL ON CACHE BOOL "" FORCE)
message(STATUS "Dawn: using spirv-cross at ${DAWN_SPIRV_CROSS_DIR}")
add_subdirectory(${DAWN_SPIRV_CROSS_DIR})
endif()
if (NOT TARGET SPIRV-Headers)
set(SPIRV_HEADERS_SKIP_EXAMPLES ON CACHE BOOL "" FORCE)
set(SPIRV_HEADERS_SKIP_INSTALL ON CACHE BOOL "" FORCE)