<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi Erik</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This is a simplified view of my project:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Root CMakeList:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<div>PROJECT (Foo)</div><div><br></div><div>FOREACH( mysubdirs </div><div> Apps</div><div> Data</div><div>)</div><div><br></div><div>SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Foo")</div><div><div>SET(CPACK_NSIS_COMPONENT_INSTALL ON)</div>
<div>include(CPACK)</div><div><br></div><div><br></div><div>Apps CMakeList:</div><div><br></div><div><div>set(TARGET_NAME Apps)</div><div><br></div><div># Build some stuff ... </div><div><br></div><div>install(TARGETS Apps</div>
<div> RUNTIME DESTINATION Apps</div><div>)</div><div><br></div><div><br></div><div><br></div><div>Data CMakeList:</div><div><br></div></div><div><div>set(TARGET_NAME Data)</div><div><br></div><div># Build some stuff to OUTPUT_FILES</div>
<div><br></div><div>install(FILES ${OUTPUT_FILES}<br></div><div> DESTINATION Data</div><div>)</div></div></div><div><br></div><div><br></div><div>On Win7, Data should be on ProgramData\Foo and Apps should be on ProgramFiles\Foo</div>
<div><br></div><div>Is there a way to set the install directory (as CPACK_PACKAGE_INSTALL_DIRECTORY does) by component to achieve this.</div><div><br></div><div>I wish i can do this without breaking into <a href="http://nsis.template.in/" target="_blank">NSIS.template.in</a>.</div>
<div><br></div><div>Thanks</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/23 Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013/4/23 Romuald Delmont <<a href="mailto:romualddelmont@gmail.com">romualddelmont@gmail.com</a>>:<br>
<div class="im">> Hi All<br>
><br>
> I'm packaging an application with CMake/Cpack/NSIS and it's going pretty<br>
> well except for one point.<br>
><br>
> I have a core component with executables and a data component. Both are<br>
> built by CMake and have an INSTALL command.<br>
> Install target gives me 2 directories (Apps and Data) in the<br>
> CMAKE_INSTALL_PREFIX directory which is fine.<br>
><br>
> With CPack/Nsis, I try to install them in 2 different locations like<br>
> ProgramFiles for Core and ProgramData for Data, but I cannot find a way to<br>
> do this.<br>
<br>
</div>Do you mean that it works when building INSTALL target but it doesn't<br>
when building NSIS installer with CPack?<br>
<br>
Could you give us the **exact**<br>
install(TARGET ...)<br>
<br>
statement you use for each target.<br>
<div class="im"><br>
> Is there a way to specify an install destination by component?<br>
<br>
</div>DESTINATTION is attached to an install(...) statement<br>
such as COMPONENT.<br>
<br>
If you have two different components then each of them<br>
should appear in separate install(...), each one having<br>
its DESTINATION argument as well.<br>
<br>
Dis you try to build a componentized ZIP and see what happen?<br>
--<br>
Erk<br>
Le gouvernement représentatif n'est pas la démocratie --<br>
<a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>
</blockquote></div><br></div>