[CMake] CPack/NSIS multiple component intall location

Eric Noulard eric.noulard at gmail.com
Tue Apr 23 13:48:48 EDT 2013


2013/4/23 Romuald Delmont <romualddelmont at gmail.com>:
> Hi All
>
> I'm packaging an application with CMake/Cpack/NSIS and it's going pretty
> well except for one point.
>
> I have a core component with executables and a data component. Both are
> built by CMake and have an INSTALL command.
> Install target gives me 2 directories (Apps and Data) in the
> CMAKE_INSTALL_PREFIX directory which is fine.
>
> With CPack/Nsis, I try to install them in 2 different locations like
> ProgramFiles for Core and ProgramData for Data, but I cannot find a way to
> do this.

Do you mean that it works when building INSTALL target but it doesn't
when building NSIS installer with CPack?

Could you give us the **exact**
install(TARGET ...)

statement you use for each target.

> Is there a way to specify an install destination by component?

DESTINATTION is attached to an install(...) statement
such as COMPONENT.

If you have two different components then each of them
should appear in separate install(...), each one having
its DESTINATION argument as well.

Dis you try to build a componentized ZIP and see what happen?
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list