-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFindRapidXML.cmake
44 lines (40 loc) · 1.46 KB
/
FindRapidXML.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ---------------------------------------------------------------------------
#
# Find RapidXML headers library
#
# ---------------------------------------------------------------------------
#
# Variables defined by this module:
#
# RapidXML_FOUND - True if RapidXML was found
# RapidXML_INCLUDE_DIR - RapidXML include directories
#
# ---------------------------------------------------------------------------
#
# Use this module by invoking find_package with the form:
#
# find_package(RapidXML
# [version] [EXACT] # Minimum or EXACT version e.g. 1.1.0
# [REQUIRED] # Fail with error if RapidXML is not found
# )
#
#
# Ideas for this module were picked up from various places, including github repositories.
#
# Copyright (c) 2016 Roal Zanazzi
# Distributed under the MIT License (see LICENSE file)
# ---------------------------------------------------------------------------
find_path(RapidXML_INCLUDE_DIR
rapidxml.hpp
HINTS ENV RAPIDXML_ROOT
PATH_SUFFIXES rapidxml)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set RAPIDXML_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(RapidXML DEFAULT_MSG RapidXML_INCLUDE_DIR)
mark_as_advanced(RapidXML_INCLUDE_DIR)
if(RAPIDXML_FOUND)
# provide import target:
add_library(RapidXML::RapidXML INTERFACE IMPORTED)
set_target_properties(RapidXML::RapidXML PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${RapidXML_INCLUDE_DIR})
endif()