# Propagate install/strip target to external project

**URL:** https://discourse.cmake.org/t/propagate-install-strip-target-to-external-project/6537
**Category:** Code
**Created:** [September 21, 2022, 6:25am UTC](https://discourse.cmake.org/t/propagate-install-strip-target-to-external-project/6537 "2022-09-21T06:25:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cmak](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/eb8c5e/32.png) [@cmak](https://discourse.cmake.org/u/cmak)
#### Post date: [September 21, 2022, 6:25am UTC](https://discourse.cmake.org/t/propagate-install-strip-target-to-external-project/6537/1 "2022-09-21T06:25:34Z")

</div>

Is there a way to propagate the install/strip target also to external projects? My external project has an install step (without strip), but if the main project is invoked with install/strip I want to pass that strip instruction also to the external project.

---

<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: [September 21, 2022, 1:22pm UTC](https://discourse.cmake.org/t/propagate-install-strip-target-to-external-project/6537/2 "2022-09-21T13:22:18Z")

</div>

There seems to be a `CMAKE_INSTALL_DO_STRIP` variable that indicates this. You can use `install(CODE)` to look at this variable and do what you want with it.

Note that only `cmake_install.cmake` gets this variable, so I’m not sure how you expect the ExternalProject to get this (since it typically runs during the build, not install script).
