Use CMake's find_package to locate vulkan for samples and tests. (#308)
This commit is contained in:
committed by
Markus Tavenrath
parent
2d8483e06f
commit
fba738079a
@@ -14,6 +14,8 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
project(Vulkan-Hpp_Tests)
|
||||
|
||||
option (TESTS_BUILD_WITH_LOCAL_VULKAN_HPP OFF)
|
||||
@@ -30,7 +32,7 @@ if (TESTS_BUILD_WITH_LOCAL_VULKAN_HPP)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Docs/include")
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
else()
|
||||
include_directories("$ENV{VK_SDK_PATH}/include")
|
||||
include_directories("${Vulkan_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../glm")
|
||||
|
||||
@@ -32,4 +32,4 @@ add_executable(DeviceFunctions
|
||||
)
|
||||
|
||||
set_target_properties(DeviceFunctions PROPERTIES FOLDER "Tests")
|
||||
target_link_libraries(DeviceFunctions "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib")
|
||||
target_link_libraries(DeviceFunctions "${Vulkan_LIBRARIES}")
|
||||
|
||||
@@ -32,4 +32,4 @@ add_executable(NoExceptions
|
||||
)
|
||||
|
||||
set_target_properties(NoExceptions PROPERTIES FOLDER "Tests")
|
||||
target_link_libraries(NoExceptions "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib")
|
||||
target_link_libraries(NoExceptions "${Vulkan_LIBRARIES}")
|
||||
|
||||
@@ -32,4 +32,4 @@ add_executable(StructureChain
|
||||
)
|
||||
|
||||
set_target_properties(StructureChain PROPERTIES FOLDER "Tests")
|
||||
target_link_libraries(StructureChain "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib")
|
||||
target_link_libraries(StructureChain "${Vulkan_LIBRARIES}")
|
||||
|
||||
Reference in New Issue
Block a user