From 76d86142367e0eb67e7a423ae5a4884bbd21d6ac Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 11 Jul 2022 16:12:27 +0200 Subject: GPU: Do not allow GPU Shader builder when USD is enabled. Linking GPU shader builder requires stubs for many functions of the USD library. We don't want to rely on other modules to update the stubs for a tool that is only used by GPU developers. This patch raises an error when both WITH_GPU_SHADER_BUILDER and WITH_USD are enabled. This reduces the maintenance of updating the stubs when USD API changes. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D15422 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1416b5b4189..22f31d6af48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1340,6 +1340,12 @@ else() list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE) endif() +if (WITH_GPU_SHADER_BUILDER AND WITH_USD) + message(FATAL_ERROR + "Unable to compile WITH_GPU_SHADER_BUILDER and WITH_USD." + ) +endif() + #----------------------------------------------------------------------------- # Configure Metal. if (WITH_METAL_BACKEND) -- cgit v1.2.3