[Bf-blender-cvs] [8dec7e5219e] tmp-vulkan: Vulkan: Add CMake inclusion
Clément Foucault
noreply at git.blender.org
Thu Jul 23 16:21:40 CEST 2020
Commit: 8dec7e5219e3348f66b8ef164db0e1cad4afce9f
Author: Clément Foucault
Date: Sun Jul 19 01:23:17 2020 +0200
Branches: tmp-vulkan
https://developer.blender.org/rB8dec7e5219e3348f66b8ef164db0e1cad4afce9f
Vulkan: Add CMake inclusion
We need to bump minimum version to 3.7 for FindVulkan.cmake to be
available.
===================================================================
M CMakeLists.txt
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49b974596f7..643b8f6c765 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,7 +41,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
endif()
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.7)
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
# platforms which don't hare GLVND yet. Only do it if preference was not set
@@ -441,9 +441,12 @@ if(UNIX AND NOT APPLE)
endif()
+# Vulkan
+option(WITH_VULKAN "Enable Vulkan backend (Experimental)" OFF)
+
# OpenGL
-option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
+option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu (temporary option for development purposes)" ON)
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (through either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
@@ -950,6 +953,17 @@ if(WITH_OPENVDB)
list(APPEND OPENVDB_LIBRARIES ${BOOST_LIBRARIES} ${TBB_LIBRARIES})
endif()
+#-----------------------------------------------------------------------------
+# Configure Vulkan.
+
+if(WITH_VULKAN)
+ find_package(Vulkan)
+
+ list(APPEND BLENDER_GL_LIBRARIES ${Vulkan_LIBRARY})
+
+ add_definitions(-DWITH_VULKAN)
+endif()
+
#-----------------------------------------------------------------------------
# Configure OpenGL.
More information about the Bf-blender-cvs
mailing list