CMake: Fix build when DAWN_BUILD_EXAMPLES=0
glfw is used by several `src/utils/*.cpp` files, regardless of whether examples are being built or not. Change-Id: Iba90fbf96e254979c72acf792af3cb86d889f5db Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64742 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
37126dd679
commit
0ecd67a3fa
|
@ -38,7 +38,6 @@ if (NOT TARGET SPIRV-Tools)
|
|||
add_subdirectory(${DAWN_SPIRV_TOOLS_DIR})
|
||||
endif()
|
||||
|
||||
if (DAWN_BUILD_EXAMPLES)
|
||||
if (NOT TARGET glfw)
|
||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
|
@ -48,6 +47,7 @@ if (DAWN_BUILD_EXAMPLES)
|
|||
add_subdirectory(${DAWN_GLFW_DIR})
|
||||
endif()
|
||||
|
||||
if (DAWN_BUILD_EXAMPLES)
|
||||
if (NOT TARGET glm)
|
||||
message(STATUS "Dawn: using GLM at ${DAWN_GLM_DIR}")
|
||||
add_subdirectory(${DAWN_GLM_DIR})
|
||||
|
|
Loading…
Reference in New Issue