diff --git a/src/pugixml.cppm b/src/pugixml.cppm index c314f2b2..6cdce354 100644 --- a/src/pugixml.cppm +++ b/src/pugixml.cppm @@ -67,5 +67,7 @@ import std.compat; module :private; -#define PUGIXML_SOURCE "pugixml.cpp" -#include PUGIXML_SOURCE +#if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE) +# define PUGIXML_SOURCE "pugixml.cpp" +# include PUGIXML_SOURCE +#endif