<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr"> The below example build "App" and copies it to EXECUTABLE_OUTPUT_PATH.<br>ADD_EXECUTABLE(App ${source})<br>TARGET_LINK_LIBRARIES(App ${lib1} ${lib2})<br>INSTALL(TARGETS App ..)</div><div dir="ltr"><br>The top level CMakeLists.txt has install directives for lib1 and lib2<br>INSTALL(FILES ${lib1}/bin/lib1.dll DESTINATION ...)<br>INSTALL(FILES ${lib2}/bin/lib2.dll DESTINATION ...)<br></div><div dir="ltr">Later in the build process we would like to use "App"<br>ADD_CUSTOM_COMMAND(OUTPUT "${src} COMMAND App ...)</div><div dir="ltr"><br>The ADD_CUSTOM_COMMAND command currently fails because lib1 and lib2 are not present in EXECUTABLE_OUTPUT_PATH.</div><div dir="ltr"><br>The following solutions work but are not desirable approaches:<br> - Copying the necessary files to EXECUTABLE_OUTPUT_PATH via ADD_CUSTOM_COMMAND. This would be repeating top level install directives at target level.<br> - Update "path" environment variable to include paths to lib1 and lib2 libraries.<br></div><div dir="ltr">What other options are available using CMake? Does ADD_CUSTOM_COMMAND have a way to update path environment prior to executing a command?<br> <br></div>
                                          </div></body>
</html>