Fixing CMakeLists.txt for older Cmake

See #303
This commit is contained in:
Adam Sawicki 2022-11-29 16:06:36 +01:00
parent b367b36ffc
commit 3703ef88ff

View File

@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.9)
project(VulkanMemoryAllocator)
# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL)
if(PROJECT_IS_TOP_LEVEL)
find_package(Vulkan REQUIRED)
endif()