[CMake] Collecting libraries for NSIS installer

Richard Shaw hobbes1069 at gmail.com
Mon Aug 25 17:43:38 EDT 2014


On Mon, Aug 25, 2014 at 4:10 PM, Jean-Christophe Fillion-Robin <
jchris.fillionr at kitware.com> wrote:

> Hi Richard,
>
> Generator expression won't work in install rules. Instead, I suggest you
> simply use "install(TARGET ...") for regular targets.
>

That explains that problem. I'm not sure if you followed the whole thread
but what I'm trying to do is collect all the dependent DLL's for packaging
into the NSIS installer. I don't think install(TARGET... will work here.

I'm using the GetPrerequisites module which needs the absolute path to the
binary/library to scan. I tried to use get_target_property but it
complained that generator expressions should be used instead, which as you
mention don't work for install rules.

I use find_program to get the full location to the generated binary which I
then pass to get_prerequisites(...) to get the required dll's.

Then I used find_library to get the location to the library for
installation purposes (win32 only).

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140825/74c1eba1/attachment.html>


More information about the CMake mailing list