# Portable way to set filepaths in presets

**URL:** https://discourse.cmake.org/t/portable-way-to-set-filepaths-in-presets/7892
**Category:** Usage
**Created:** [April 12, 2023, 2:56pm UTC](https://discourse.cmake.org/t/portable-way-to-set-filepaths-in-presets/7892 "2023-04-12T14:56:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![abdelmaged](https://discourse.cmake.org/user_avatar/discourse.cmake.org/abdelmaged/32/3176_2.png) [@abdelmaged](https://discourse.cmake.org/u/abdelmaged)
#### Post date: [April 12, 2023, 2:56pm UTC](https://discourse.cmake.org/t/portable-way-to-set-filepaths-in-presets/7892/1 "2023-04-12T14:56:38Z")

</div>

Is there a portable way to set filepath variables in presets ?

Intention is to have one preset common between Linux & Windows platforms with the same name, the only difference is in some of the specified file paths, i.e. setting toolchain filepath:  
Linux path → “/home/vcpkg”  
Windows path → “H:/vcpkg”

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 24, 2023, 5:05am UTC](https://discourse.cmake.org/t/portable-way-to-set-filepaths-in-presets/7892/2 "2023-04-24T05:05:37Z")

</div>

Cc: @kyle.edwards

---

<div class="post-metadata">

### Author: ![abdelmaged](https://discourse.cmake.org/user_avatar/discourse.cmake.org/abdelmaged/32/3176_2.png) [@abdelmaged](https://discourse.cmake.org/u/abdelmaged)
#### Post date: [June 6, 2023, 1:05pm UTC](https://discourse.cmake.org/t/portable-way-to-set-filepaths-in-presets/7892/3 "2023-06-06T13:05:06Z")

</div>

I’ve filed this issue:  
[https://gitlab.kitware.com/cmake/cmake/-/issues/24976](https://gitlab.kitware.com/cmake/cmake/-/issues/24976)
