From 6934b123d472f8074ac7aea7e1c099b2c5201e7f Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 21 Sep 2019 09:19:11 -0700 Subject: [PATCH] Move pugixml.rc to scripts/ This keeps src/ folder clean of auxiliary files only required for special builds; note that CMakeLists.txt already depends on scripts/ (specifically for pkgconfig setup). --- CMakeLists.txt | 3 ++- src/win32/pugixml.rc => scripts/pugixml_dll.rc | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) rename src/win32/pugixml.rc => scripts/pugixml_dll.rc (79%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3489298..927dcbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,8 +31,9 @@ mark_as_advanced(CLEAR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR) set(HEADERS src/pugixml.hpp src/pugiconfig.hpp) set(SOURCES src/pugixml.cpp) + if(BUILD_SHARED_LIBS AND MSVC) - set(PUGIXML_WINDLL_SRCS src/win32/pugixml.rc) + set(PUGIXML_WINDLL_SRCS scripts/pugixml_dll.rc) endif() if(DEFINED BUILD_DEFINES) diff --git a/src/win32/pugixml.rc b/scripts/pugixml_dll.rc similarity index 79% rename from src/win32/pugixml.rc rename to scripts/pugixml_dll.rc index 3bfff7d..d71a65d 100644 --- a/src/win32/pugixml.rc +++ b/scripts/pugixml_dll.rc @@ -1,11 +1,9 @@ #include -//#include "../pugixml.hpp" -// TODO these defines should be moved to ../pugixml.hpp -// but when included pugixml.hpp(131): error RC2104: undefined keyword or key name: typedef -# define PUGIXML_VERSION_MAJOR 1 -# define PUGIXML_VERSION_MINOR 10 -# define PUGIXML_VERSION_PATCH 0 -# define PUGIXML_VERSION_NUMBER "1.10.0\0" + +#define PUGIXML_VERSION_MAJOR 1 +#define PUGIXML_VERSION_MINOR 10 +#define PUGIXML_VERSION_PATCH 0 +#define PUGIXML_VERSION_NUMBER "1.10.0\0" #ifdef GCC_WINDRES VS_VERSION_INFO VERSIONINFO