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::OpenSPTarget encapsulating the OpenSP library usage requirements, available only if the OpenSP is found.
Result Variables¶
This module defines the following variables:
OpenSP_FOUNDBoolean indicating whether (the requested version of) OpenSP is available.
OpenSP_VERSIONThe version of found OpenSP.
OpenSP_VERSION_MAJORThe major version of OpenSP.
OpenSP_VERSION_MINORThe minor version of OpenSP.
OpenSP_VERSION_PATCHThe patch version of OpenSP.
OpenSP_INCLUDE_DIRSThe include directories containing headers needed to use the OpenSP library.
OpenSP_LIBRARIESLibraries 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_DIRThe OpenSP include directory.
OpenSP_LIBRARYThe absolute path of the
osplibrary.OpenSP_MULTI_BYTETrue 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)