https://github.com/OpenImageIO/oiio/issues/2732

diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 1240f22..5cc5a2e 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -227,6 +227,14 @@ endif ()
 # allow this to be overridden to use the distro-provided package if desired.
 option (USE_EXTERNAL_PUGIXML "Use an externally built shared library version of the pugixml library" OFF)
 if (USE_EXTERNAL_PUGIXML)
+    find_path (PUGIXML_INCLUDE_DIR NAMES pugixml.hpp)
+    find_library (PUGIXML_LIBRARIES NAMES pugixml)
+
+    set (PUGIXML_INCLUDE_DIR ${PUGIXML_INCLUDE_DIR})
+    set (PUGIXML_INCLUDE_DIRS ${PUGIXML_INCLUDE_DIR})
+    set (PUGIXML_LIBRARIES ${PUGIXML_LIBRARIES})
+    set (PUGIXML_INCLUDES ${PUGIXML_INCLUDE_DIR})
+
     checked_find_package (pugixml REQUIRED
                           DEFINITIONS -DUSE_EXTERNAL_PUGIXML=1)
 endif()
