Propagate install/strip target to external project

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.

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).