microsoft / D3D12TranslationLayer

A library containing utilities for mapping higher-level graphics work to D3D12
MIT License
329 stars 47 forks source link

Add missing include(FetchContent) #51

Closed jenatali closed 2 years ago

vdwtanner commented 2 years ago

Looks like github's web editor changed all the line endings or something, so I'm going to rebase and fix the conflict locally

hanfling commented 2 years ago

Some more context:

this is a fix for "CMake Error at CMakeLists.txt:9 (FetchContent_Declare): Unknown CMake command 'FetchContent_Declare'.", which occurs when building D3D12TranslationLayer standalone.

How to reproduce (with VS 2022):

Reference for this specific build issue: https://discourse.cmake.org/t/fetchcontent-declare-not-recognized/443

Readme.md on https://github.com/microsoft/D3D11On12 recommends using a top level CMakeLists.txt for building D3D12TranslationLayer alongside D3D11On12. That recommended top level CMakeLists.txt includes the include(FetchContent) line, and may thus be optional in that build scenerio (and may never have shown up on ms radar).