From 67383cb4444b36fb42f4ac89a180283cb7d359be Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Sun, 8 Jan 2017 01:44:31 -0800 Subject: [PATCH] allow bundled Vulkan lib also with newer cmakes Remove REQUIRED flag for the Vulkan library search that are used if CMake version > 3.7. This will allow the configuration and build fall back of searching the internal vulkan library versions that are bundled within this repo. (In case that the user has not installed vulkan libraries under /usr) Signed-off-by: Mika Laitio --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f2aeaca..2861b01d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ OPTION(USE_D2D_WSI "Build the project using Direct to Display swapchain" OFF) # Use FindVulkan module added with CMAKE 3.7 if (NOT CMAKE_VERSION VERSION_LESS 3.7.0) message(STATUS "Using module to find Vulkan") - find_package(Vulkan REQUIRED) + find_package(Vulkan) endif() IF(WIN32) @@ -25,6 +25,7 @@ IF(WIN32) find_library(Vulkan_LIBRARY NAMES vulkan-1 vulkan PATHS ${CMAKE_SOURCE_DIR}/libs/vulkan) IF (Vulkan_LIBRARY) set(Vulkan_FOUND ON) + MESSAGE("Using bundled Vulkan library version") ENDIF() ENDIF() find_library(ASSIMP_LIBRARIES NAMES assimp libassimp.dll.a PATHS ${CMAKE_SOURCE_DIR}/libs/assimp) @@ -34,6 +35,7 @@ ELSE(WIN32) find_library(Vulkan_LIBRARY NAMES vulkan HINTS "$ENV{VULKAN_SDK}/lib" "${CMAKE_SOURCE_DIR}/libs/vulkan" REQUIRED) IF (Vulkan_LIBRARY) set(Vulkan_FOUND ON) + MESSAGE("Using bundled Vulkan library version") ENDIF() ENDIF() find_package(ASSIMP REQUIRED) @@ -144,4 +146,4 @@ set(EXAMPLES vulkanscene ) -buildExamples() \ No newline at end of file +buildExamples()