FindXercesC
Added in version 3.1.
Finds the Apache Xerces-C++ validating XML parser headers and libraries:
find_package(XercesC [<version>] [...])
Imported Targets
This module provides the following Imported Targets:
-
XercesC::XercesC -
Added in version 3.5.
Target encapsulating the Xerces-C++ library (
xerces-c) usage requirements, available only if Xerces-C++ is found.
Result Variables
This module defines the following variables:
-
XercesC_FOUND -
Boolean indicating whether (the requested version of) Xerces-C++ was found.
-
XercesC_VERSION -
The version of the found Xerces-C++ library.
-
XercesC_INCLUDE_DIRS -
Include directories needed to use Xerces-C++.
-
XercesC_LIBRARIES -
Libraries needed to link for using Xerces-C++.
-
XercesC_LIBRARY -
The path to the Xerces-C++ library (
xerces-c), either release or debug variant.
Cache Variables
The following cache variables may also be set:
-
XercesC_INCLUDE_DIR -
The directory containing the Xerces-C++ headers.
-
XercesC_LIBRARY_RELEASE -
Added in version 3.4.
The path to a release (optimized) variant of the Xerces-C++ library.
-
XercesC_LIBRARY_DEBUG -
Added in version 3.4.
The path to a debug variant of the Xerces-C++ library.
Examples
Finding the Xerces-C++ library and linking it to a project target:
find_package(XercesC) target_link_libraries(project_target PRIVATE XercesC::XercesC)
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindXercesC.html