<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I have a CMake project that builds and installs several external libraries and tools using the ExternalProject_Add. Works very well, however I would like to add the capability to
 install the external projects in a directory that requires sudo without forcing the user to also build, config, etc. as sudo. I discovered that if I have the INSTALL_DIR parameter in the ExternalProject_Add command set to a directory that requires sudo to
 create, cmake fails because it attempts to &nbsp;create the directory and of course it can't without 'sudo cmake ... '&nbsp;
<div><br>
</div>
<div>Has anyone done this? I'm not sure where to start. I have set the EP_STEP_TARGETS property to define targets for each step and I wanted to do something like this, 'make eproj-download eproj-config eproj-build; sudo make eproj-install', but the error with
 INSTALL_DIR has prevented that solution. I could remove the INSTALL_DIR definition and rely on the INSTALL_COMMAND to create these directories, but I'm reluctant to do that.</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">Lori A. Pritchett-Sheats
<div>Los Alamos National Laboratory</div>
<div>CCS-2, Computational Physics</div>
<div>505-665-6675</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>