From 652481f6a1a47728743c5830382b84ab4bb768ff Mon Sep 17 00:00:00 2001 From: Sven Eberhardt Date: Mon, 4 Jan 2010 03:15:50 +0100 Subject: [PATCH] MSVC: exclude precompiled headers from tinyxml sources --- CMakeLists.txt | 3 ++- src/platform/StdMesh.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 691d4333c..9a6c58458 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -692,7 +692,8 @@ if(HAVE_PRECOMPILED_HEADERS) get_property(OC_SOURCES TARGET clonk PROPERTY SOURCES) foreach(FILE ${OC_SOURCES}) get_filename_component(FILE_EXT ${FILE} EXT) - if(FILE_EXT STREQUAL ".cpp") + get_filename_component(FILE_NAME_WE ${FILE} NAME_WE) + if(FILE_EXT STREQUAL ".cpp" AND NOT FILE_NAME_WE MATCHES "tiny.*") # This check is necessary since gzio.c gets compiled as C # code, which can't use C++ PCH. set_property(SOURCE ${FILE} PROPERTY COMPILE_FLAGS /YuC4Include.h) diff --git a/src/platform/StdMesh.cpp b/src/platform/StdMesh.cpp index 106567faf..c03310f62 100644 --- a/src/platform/StdMesh.cpp +++ b/src/platform/StdMesh.cpp @@ -16,6 +16,7 @@ * See clonk_trademark_license.txt for full license. */ +#include "C4Include.h" #include #ifdef _MSC_VER