# CMakeList.txt : CMake project for dx12tutorial, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.8)

set( SHADER_FILES
    Shaders/VertexShader.hlsl
    Shaders/PixelShader.hlsl
)

source_group( "Resources\\Shaders" FILES ${SHADER_FILES} )

set_source_files_properties( Shaders/VertexShader.hlsl PROPERTIES 
    VS_SHADER_TYPE Vertex
    VS_SHADER_MODEL 5.1
)

set_source_files_properties( Shaders/PixelShader.hlsl PROPERTIES 
    VS_SHADER_TYPE Pixel
    VS_SHADER_MODEL 5.1
)

add_subdirectory("DirectX-Headers")

# Add source to this project's executable.
add_executable (dx12tutorial WIN32 "main.cpp" "Helpers.h"  "CommandQueue.h" "CommandQueue.cpp" "Game.h" "Game.cpp" "Tutorial2.h" "Tutorial2.cpp" "Application.h" "Application.cpp" "Window.h" "Window.cpp" "Events.h" "Keycodes.h" "DX12LibPCH.h" "HighResolutionClock.h" "HighResolutionClock.cpp" ${SHADER_FILES})

target_include_directories(dx12tutorial PRIVATE "./DirectX-Headers/include/directx")
target_link_libraries(dx12tutorial PRIVATE Microsoft::DirectX-Guids Microsoft::DirectX-Headers)
target_link_libraries(dx12tutorial PRIVATE d3d12.lib dxgi.lib d3dcompiler.lib dxguid.lib Pathcch.lib Shlwapi.lib)

if (CMAKE_VERSION VERSION_GREATER 3.12)
  set_property(TARGET dx12tutorial PROPERTY CXX_STANDARD 20)
endif()

# TODO: Add tests and install targets if needed.
