1# Example using Intel HEXL in an external application
2
3To use Intel HEXL in an external application, you can use one of the three provided ways.
4
5* Install Intel HEXL. Then, in your external application, add the following lines to your `CMakeLists.txt`:
6
7```bash
8find_package(HEXL 1.2.3
9    HINTS ${HEXL_HINT_DIR}
10    REQUIRED)
11target_link_libraries(<your target> HEXL::hexl)
12```
13If Intel HEXL is installed globally, `HEXL_HINT_DIR` is not needed. Otherwise, `HEXL_HINT_DIR` should be the directory containing  `HEXLConfig.cmake`, e.g. `${CMAKE_INSTALL_PREFIX}/lib/cmake/hexl-1.2.2/`
14
15* Install Intel HEXL. Then, in your external application, add the following lines to your `CMakeLists.txt`:
16
17```bash
18include(FindPkgConfig)
19pkg_check_modules(HEXL REQUIRED IMPORTED_TARGET hexl)
20target_link_libraries(<your target> PkgConfig::HEXL)
21```
22
23* Install Intel HEXL from vcpkg. Then, in your external application, add the following lines to your `CMakeLists.txt`:
24
25```bash
26find_package(HEXL CONFIG REQUIRED)
27target_link_libraries(<your target> HEXL::hexl)
28```
29