# How can I preserve paths if importing one CMakePresets.json into another?

**URL:** https://discourse.cmake.org/t/how-can-i-preserve-paths-if-importing-one-cmakepresets-json-into-another/15380
**Category:** Usage
**Created:** [December 9, 2025, 11:47pm UTC](https://discourse.cmake.org/t/how-can-i-preserve-paths-if-importing-one-cmakepresets-json-into-another/15380 "2025-12-09T23:47:57Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Chardrazle](https://discourse.cmake.org/user_avatar/discourse.cmake.org/chardrazle/32/4362_2.png) [@Chardrazle](https://discourse.cmake.org/u/Chardrazle)
#### Post date: [December 22, 2025, 8:01am UTC](https://discourse.cmake.org/t/how-can-i-preserve-paths-if-importing-one-cmakepresets-json-into-another/15380/7 "2025-12-22T08:01:40Z")

</div>

We found a workaround was to set and use env-vars during the processing of the presets files.

See: [CMake presets: `inherit` makes it hard to include toolchain file - #6 by Chardrazle](https://discourse.cmake.org/t/cmake-presets-inherit-makes-it-hard-to-include-toolchain-file/7784/6)

---

_[View the full topic](https://discourse.cmake.org/t/how-can-i-preserve-paths-if-importing-one-cmakepresets-json-into-another/15380)._
