From 6b5ee57718f1c8b1ae1886f9ad05be8a6949ad22 Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Fri, 8 Apr 2016 21:17:24 +0300 Subject: [PATCH] rXml: use pugixml in header-only mode (#1665) Fixes compilation in VS --- Utilities/rXml.cpp | 4 ---- Utilities/rXml.h | 6 +++++- rpcs3/CMakeLists.txt | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Utilities/rXml.cpp b/Utilities/rXml.cpp index 1e0dfff1b5..aab1a84aa0 100644 --- a/Utilities/rXml.cpp +++ b/Utilities/rXml.cpp @@ -1,9 +1,5 @@ #include "stdafx.h" #include "Utilities/rXml.h" -#pragma warning(push) -#pragma warning(disable : 4996) -#include -#pragma warning(pop) rXmlNode::rXmlNode() { diff --git a/Utilities/rXml.h b/Utilities/rXml.h index 08edf5f934..3c369a09cd 100644 --- a/Utilities/rXml.h +++ b/Utilities/rXml.h @@ -1,6 +1,10 @@ #pragma once -#include +#ifndef PUGIXML_HEADER_ONLY +#define PUGIXML_HEADER_ONLY 1 +#endif // !PUGIXML_HEADER_ONLY +#include "pugixml.hpp" +#undef PUGIXML_HEADER_ONLY struct rXmlNode { diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index cae5fdd3d5..acb109e08e 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -165,7 +165,6 @@ endforeach() file( GLOB_RECURSE RPCS3_SRC -"${RPCS3_SRC_DIR}/../3rdparty/pugixml/src/pugixml.cpp" "${RPCS3_SRC_DIR}/rpcs3.cpp" "${RPCS3_SRC_DIR}/config.cpp" "${RPCS3_SRC_DIR}/stb_image.cpp"