From e768dabb5cdf41506d1030364971fe6ffbaee80b Mon Sep 17 00:00:00 2001 From: Squareys Date: Thu, 21 Apr 2016 09:15:06 +0200 Subject: [PATCH] [TODO] Platform: Add Vulkan library to GlfwApplication TODO: Add to FindMagnum.cmake Signed-off-by: Squareys --- src/Magnum/Platform/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index 1126680ea..680df392f 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -106,6 +106,13 @@ if(WITH_GLFWAPPLICATION) message(FATAL_ERROR "GLFW library, required by GlfwApplication, was not found. Set WITH_GLFWAPPLICATION to OFF to skip building it.") endif() + if(TARGET_VULKAN) + find_package(Vulkan) + if(NOT GLFW_FOUND) + message(FATAL_ERROR "Vulakn SDK was not found. Set TARGET_VULKAN to OFF to turn off Vulkan support.") + endif() + endif() + set(MagnumGlfwApplication_SRCS GlfwApplication.cpp ${MagnumSomeContext_OBJECTS}) @@ -119,6 +126,10 @@ if(WITH_GLFWAPPLICATION) # linked to the executable and not to any intermediate shared lib target_link_libraries(MagnumGlfwApplication Magnum GLFW::GLFW) + if(TARGET_VULKAN) + target_link_libraries(MagnumGlfwApplication Magnum Vulkan::Vulkan) + endif() + install(FILES ${MagnumGlfwApplication_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform) install(TARGETS MagnumGlfwApplication RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}