From a12d365d604b060b1c60e9a85172f2cb2108b8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 17 Apr 2021 17:26:52 +0200 Subject: [PATCH] Fix PCH when building with CMake + Ninja + MSVC on Windows fmt/format.h is included in the PCH, so we need to make sure fmt is actually in the include path. Not sure how Visual Studio + CMake manages to build without this. --- Source/PCH/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/PCH/CMakeLists.txt b/Source/PCH/CMakeLists.txt index 0e214789ad..7346b24dff 100644 --- a/Source/PCH/CMakeLists.txt +++ b/Source/PCH/CMakeLists.txt @@ -1,4 +1,6 @@ add_library(pch pch.h pch.cpp) set(PCH_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set(PCH_NAME ${PCH.pch}) -target_compile_options(pch PUBLIC /Ycpch.h /Fp${PCH_DIRECTORY}/${PCH_NAME}) \ No newline at end of file +target_compile_options(pch PUBLIC /Ycpch.h /Fp${PCH_DIRECTORY}/${PCH_NAME}) +# fmt/format.h is included in the PCH +target_link_libraries(pch PUBLIC fmt::fmt)