# How to import from build tree? (Answered)

**URL:** <https://discourse.cmake.org/t/how-to-import-from-build-tree-answered/392>\
**Category:** Code\
**Created:** [December 17, 2019, 10:53am UTC](https://discourse.cmake.org/t/how-to-import-from-build-tree-answered/392 "2019-12-17T10:53:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_Gutierrez](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/57b2e6/32.png) [@Javier\_Gutierrez](https://discourse.cmake.org/u/Javier_Gutierrez)\
**Post date:** [December 17, 2019, 10:53am UTC](https://discourse.cmake.org/t/how-to-import-from-build-tree-answered/392/1 "2019-12-17T10:53:23Z")

</div>

Hello there,

It took me more time than expected to find out how to “import” an export file that I created with the export from a build tree approach. That is using the [export()](https://cmake.org/cmake/help/latest/command/export.html) command.

I learned how to export from a build tree from following links:

[https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/Exporting-and-Importing-Targets](https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/Exporting-and-Importing-Targets)

[https://cmake.org/cmake/help/latest/command/export.html](https://cmake.org/cmake/help/latest/command/export.html)

So the answer is: you import such files using the [include()](https://cmake.org/cmake/help/latest/command/include.html?highlight=include) command.

Maybe this information can be added to the above links ?

Thanks in advance or a great tool…

---

<div class="post-metadata">

**Author:** ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)\
**Post date:** [December 17, 2019, 3:00pm UTC](https://discourse.cmake.org/t/how-to-import-from-build-tree-answered/392/2 "2019-12-17T15:00:52Z")

</div>

See the [cmake-packages(7)](https://cmake.org/cmake/help/v3.16/manual/cmake-packages.7.html) manual.
