summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-09 19:29:23 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-09 23:22:57 -0800
commitf3e42969a5118247de548c059e9bed69cdf208bb (patch)
tree03542349d42842d76d0f6f67bdd113c72d921b33 /src/pugixml.hpp
parentff16dbdd4c63fa46cc1f38eda4cfb66f38047657 (diff)
Simplify header-only mode usage
It's sufficient to define PUGIXML_HEADER_ONLY anywhere now, source is included automatically. This is a second attempt; this time it includes a workaround for QMake bug that caused it to generate incorrect Makefile.
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 917ef4a..2432a3f 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -1329,6 +1329,13 @@ namespace std
#endif
+// Make sure implementation is included in header-only mode
+// Use macro expansion in #include to work around QMake (QTBUG-11923)
+#if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)
+# define PUGIXML_SOURCE "pugixml.cpp"
+# include PUGIXML_SOURCE
+#endif
+
/**
* Copyright (c) 2006-2014 Arseny Kapoulkine
*