# FindOpenSP

Added in version 3.25.

Finds the OpenSP library. OpenSP is an open-source implementation of the SGML (Standard Generalized Markup Language) parser.

## Imported Targets

This module provides the following Imported Targets:

`OpenSP::OpenSP`

  Target encapsulating the OpenSP library usage requirements, available only if the OpenSP is found.

## Result Variables

This module defines the following variables:

`OpenSP_FOUND`

  Boolean indicating whether the (requested version of) OpenSP is available.

`OpenSP_VERSION`

  The version of found OpenSP.

`OpenSP_VERSION_MAJOR`

  The major version of OpenSP.

`OpenSP_VERSION_MINOR`

  The minor version of OpenSP.

`OpenSP_VERSION_PATCH`

  The patch version of OpenSP.

`OpenSP_INCLUDE_DIRS`

  The include directories containing headers needed to use the OpenSP library.

`OpenSP_LIBRARIES`

  Libraries required to link against to use OpenSP. These can be passed to the `target_link_libraries()` command when not using the `OpenSP::OpenSP` imported target.

## Cache Variables

The following cache variables may also be set:

`OpenSP_INCLUDE_DIR`

  The OpenSP include directory.

`OpenSP_LIBRARY`

  The absolute path of the `osp` library.

`OpenSP_MULTI_BYTE`

  True if `SP_MULTI_BYTE` was found to be defined in OpenSP's `config.h` header file, which indicates that the OpenSP library was compiled with support for multi-byte characters. The consuming target needs to define the `SP_MULTI_BYTE` preprocessor macro to match this value in order to avoid issues with character decoding.

## Examples

Finding the OpenSP library and linking it to a project target:

    find_package(OpenSP)
    target_link_libraries(project_target PRIVATE OpenSP::OpenSP)