1# Import Third-Party CMake Library Example
2
3This example demonstrates how to import third-party CMake libraries.
4
5## Example Flow
6
7[tinyxml2](https://github.com/leethomason/tinyxml2) is a
8a small C++ XML parser. It is imported, without modification, for use in the project's `main` component (see the `main` component's [CMakeLists.txt](main/CMakeLists.txt)). To demonstrate the library being used, a sample XML is embedded into the project.
9This sample XML is then read and parsed later on using `tinyxml2`.
10
11### Output
12
13```
14I (317) example: Setting up...
15I (317) example: Copying sample XML to filesystem...
16I (647) example: Reading XML file
17I (657) example: Read XML data:
18<?xml version="1.0" encoding="UTF-8"?>
19<note>
20    <to>Tove</to>
21    <from>Jani</from>
22    <heading>Reminder</heading>
23    <body>Don't forget me this weekend!</body>
24</note>
25
26I (667) example: Parsed XML data:
27
28To: Tove
29From: Jani
30Heading: Reminder
31Body: Don't forget me this weekend!
32I (677) example: Example end
33```
34---
35
36There is a discussion on importing third-party CMake libraries in the programming guide under `API Guides` -> `Build System` -> `Using Third-Party CMake Projects with Components`
37