36 lines
702 B
CMake
36 lines
702 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
project(D3D12)
|
|
|
|
add_executable(D3D12
|
|
WIN32
|
|
main.cpp
|
|
${CMAKE_SOURCE_DIR}/engine/third_party/stbi/stb_image.cpp
|
|
)
|
|
|
|
target_compile_definitions(D3D12 PRIVATE
|
|
UNICODE
|
|
_UNICODE
|
|
)
|
|
|
|
target_include_directories(D3D12 PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_SOURCE_DIR}/engine/third_party
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
)
|
|
|
|
target_link_libraries(D3D12 PRIVATE
|
|
d3d12
|
|
dxgi
|
|
d3dcompiler
|
|
winmm
|
|
XCEngine
|
|
)
|
|
|
|
# Copy Res folder to output directory after build
|
|
add_custom_command(TARGET D3D12 POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
${CMAKE_SOURCE_DIR}/tests/D3D12/Res
|
|
$<TARGET_FILE_DIR:D3D12>/Res
|
|
)
|