# how to only be windows or unix path in the \`Makefile\`?

**URL:** https://discourse.cmake.org/t/how-to-only-be-windows-or-unix-path-in-the-makefile/10883
**Category:** Development
**Tags:** os:windows, gen:makefiles
**Created:** [May 22, 2024, 8:03am UTC](https://discourse.cmake.org/t/how-to-only-be-windows-or-unix-path-in-the-makefile/10883 "2024-05-22T08:03:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anlexN](https://discourse.cmake.org/user_avatar/discourse.cmake.org/anlexn/32/853_2.png) [@anlexN](https://discourse.cmake.org/u/anlexN)
#### Post date: [May 22, 2024, 8:03am UTC](https://discourse.cmake.org/t/how-to-only-be-windows-or-unix-path-in-the-makefile/10883/1 "2024-05-22T08:03:01Z")

</div>

```shell
`MSYS2_ARG_CONV_EXCL=$MY_INSTALL_DIR2 cmake -G"MinGW Makefiles"\
      -DgRPC_INSTALL=ON \
      -DgRPC_BUILD_TESTS=OFF \
      -DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR2 \
      ../..`

```

cmake generate “MinGW Makefiles” that contains windows and unix path, how to force those paths to be only unix path or windows path?

**official cmake docs, official msys2 docs, google search, AI can not give me answers**

 ![](https://discourse.cmake.org/uploads/default/original/2X/3/3ada027550981259306d18d92e0e507eecdc69b1.png)  
 ![](https://discourse.cmake.org/uploads/default/original/2X/b/beff27bee2bbfe877166f1d1a701979bbc852689.png)

---

<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: [March 4, 2025, 9:26am UTC](https://discourse.cmake.org/t/how-to-only-be-windows-or-unix-path-in-the-makefile/10883/2 "2025-03-04T09:26:06Z")

</div>

What is the issue with having mixed paths?
