Skip to content

Commit

Permalink
Make vulkan and d3d included when cmake flags are set
Browse files Browse the repository at this point in the history
  • Loading branch information
qbojj committed Dec 21, 2022
1 parent 8abd28d commit 7fc412c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ if(OPTICK_USE_VULKAN)
message(STATUS "Optick uses Vulkan")
find_package(Vulkan REQUIRED)
target_link_libraries(OptickCore PRIVATE Vulkan::Vulkan)
target_compile_definitions(OptickCore PRIVATE OPTICK_ENABLE_GPU_VULKAN=1)
else()
target_compile_definitions(OptickCore PRIVATE OPTICK_ENABLE_GPU_VULKAN=0)
endif()
if(OPTICK_USE_D3D12)
message(STATUS "Optick uses DirectX 12")
target_link_libraries(OptickCore PRIVATE "d3d12.lib" "dxgi.lib")
target_compile_definitions(OptickCore PRIVATE OPTICK_ENABLE_GPU_D3D12=1)
else()
target_compile_definitions(OptickCore PRIVATE OPTICK_ENABLE_GPU_D3D12=0)
endif()
Expand Down

0 comments on commit 7fc412c

Please sign in to comment.