[Bf-blender-cvs] [1a47f3ae17f] temp-ghost-vulkan: CMAKE: Move WITH_VULKAN_BACKEND from global to specific modules.

Jeroen Bakker noreply at git.blender.org
Fri Nov 18 11:45:32 CET 2022


Commit: 1a47f3ae17f8f4e9f643294b855e9f9516877c56
Author: Jeroen Bakker
Date:   Fri Nov 18 11:24:23 2022 +0100
Branches: temp-ghost-vulkan
https://developer.blender.org/rB1a47f3ae17f8f4e9f643294b855e9f9516877c56

CMAKE: Move WITH_VULKAN_BACKEND from global to specific modules.

===================================================================

M	CMakeLists.txt
M	intern/ghost/CMakeLists.txt
M	source/blender/gpu/CMakeLists.txt
M	source/blender/windowmanager/CMakeLists.txt
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 532f1dd34b8..c54d032e1f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1247,8 +1247,6 @@ if(WITH_VULKAN_BACKEND)
   if(APPLE)
     list(APPEND BLENDER_GL_LIBRARIES ${MOLTENVK_LIBRARIES})
   endif()
-
-  add_definitions(-DWITH_VULKAN_BACKEND)
 endif()
 
 # -----------------------------------------------------------------------------
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index e24c8daf63b..512ce5300c6 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -92,6 +92,8 @@ if(WITH_VULKAN_BACKEND)
     ${VULKAN_LIBRARIES}
     ${MOLTENVK_LIBRARIES}
   )
+
+  add_definitions(-DWITH_VULKAN_BACKEND)
 endif()
 
 if(WITH_GHOST_DEBUG)
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 8da17720339..03b819c7172 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -267,6 +267,8 @@ endif()
 
 if(WITH_VULKAN_BACKEND)
   list(APPEND SRC ${VULKAN_SRC})
+
+  add_definitions(-DWITH_VULKAN_BACKEND)
 endif()
 
 if(WITH_METAL_BACKEND)
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index 3ab024841e8..16f69dac1bf 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -121,6 +121,10 @@ if(WITH_CYCLES)
   add_definitions(-DWITH_CYCLES)
 endif()
 
+if(WITH_VULKAN_BACKEND)
+  add_definitions(-DWITH_VULKAN_BACKEND)
+endif()
+
 if(WITH_OPENCOLLADA)
   add_definitions(-DWITH_COLLADA)
 endif()
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index bb9e73c0895..20d538991df 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -50,6 +50,10 @@ if(WITH_CYCLES)
   endif()
 endif()
 
+if(WITH_VULKAN_BACKEND)
+  add_definitions(-DWITH_VULKAN_BACKEND)
+endif()
+
 if(WITH_CODEC_FFMPEG)
   add_definitions(-DWITH_FFMPEG)
 endif()



More information about the Bf-blender-cvs mailing list