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 <lamikr@pilppa.org>
This commit is contained in:
Mika Laitio 2017-01-08 01:44:31 -08:00 committed by Mika Laitio
parent 93bdd86917
commit 67383cb444

View file

@ -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)