# How to set policy version globally for \`cmake\_install.cmake\`

**URL:** https://discourse.cmake.org/t/how-to-set-policy-version-globally-for-cmake-install-cmake/15528
**Category:** Code
**Created:** [February 24, 2026, 5:21pm UTC](https://discourse.cmake.org/t/how-to-set-policy-version-globally-for-cmake-install-cmake/15528 "2026-02-24T17:21:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![huangqinjin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/f0a364/32.png) [@huangqinjin](https://discourse.cmake.org/u/huangqinjin)
#### Post date: [February 24, 2026, 5:21pm UTC](https://discourse.cmake.org/t/how-to-set-policy-version-globally-for-cmake-install-cmake/15528/1 "2026-02-24T17:21:03Z")

</div>

I use `if(PATH_EQUAL)` inside `install(CODE)` for custom install logic. But it trigger the error about `Policy CMP0139 is not set`.

How the enable it globally for `cmake_install.cmake`? Why does `cmake_install.cmake` not use same policy version as `CMakeLists.txt`?
