Various cleanups to CMake files.
- Only request Python3 once.
- Put conditionals around add_subdirectory instead of the file itself.
- Cleanup dawn/glfw/CMakelists.txt a bit to make it simpler.
Bug: None
Change-Id: I5a8d869eaba30a9d75b8ca5d96459978ec22792e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/181462
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 17c4aab..8f3e3ae 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -32,8 +32,6 @@
# It is particularly interesting when building dawn as a subdirectory in
# a parent project that does not want to use depot_tools.
if (${DAWN_FETCH_DEPENDENCIES})
- find_package(Python3 REQUIRED)
-
set(EXTRA_FETCH_ARGS)
if (NOT TARGET gmock AND ${TINT_BUILD_TESTS})
list(APPEND EXTRA_FETCH_ARGS --use-test-deps)
@@ -76,6 +74,7 @@
if(NOT TARGET glslang AND (${TINT_BUILD_GLSL_WRITER} OR ${TINT_BUILD_GLSL_VALIDATOR}) AND ${TINT_BUILD_CMD_TOOLS})
set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "" FORCE)
+ set(ENABLE_OPT OFF CACHE BOOL "" FORCE)
add_subdirectory("${DAWN_THIRD_PARTY_DIR}/vulkan-deps/glslang/src" "${CMAKE_CURRENT_BINARY_DIR}/glslang" EXCLUDE_FROM_ALL)
endif()