FindOpenSP
Added in version 3.25.
Finds the OpenSP library:
find_package(OpenSP [<version>] [...])
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 theOpenSP::OpenSPimported 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
osplibrary. -
OpenSP_MULTI_BYTE -
True if
SP_MULTI_BYTEwas found to be defined in OpenSP'sconfig.hheader file, which indicates that the OpenSP library was compiled with support for multi-byte characters. The consuming target needs to define theSP_MULTI_BYTEpreprocessor 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)
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindOpenSP.html