blob: 58024cfbbe699369b4f4a4ab1adf1af875920887 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
cmake_minimum_required(VERSION 3.20)
set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
# Multi-threaded statically-linked runtime library (-MT)
# Debug results in a linker warning, I think because the DX12 libs are linked
# against a Release version of the runtime.
#set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
# Set the target architecture. VSCode doesn't seem to set this by default.
add_compile_definitions(-D_AMD64_=1)
project(dx12c)
# External dependencies.
# TODO: These could be moved to dxg/app respectively.
add_subdirectory(contrib/DirectX-Headers-1.618.2)
add_subdirectory(contrib/glfw)
# Common libraries.
add_subdirectory(dxg)
add_subdirectory(app)
# Applications.
#add_subdirectory(game)
add_subdirectory(hello)
add_subdirectory(triangle)
|