FindXercesC — CMake 4.1.4 Documentation

# FindXercesC

Added in version 3.1.

Finds the Apache Xerces-C++ validating XML parser headers and libraries.

## Imported Targets

This module defines 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 Xerces-C++ is 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)