[CMake] CPACK_NSIS_DEFINES

Mark Stijnman mark.stijnman at gmail.com
Tue Oct 29 12:16:12 EDT 2013


On Mon, Oct 28, 2013 at 9:03 AM, Mark Stijnman <mark.stijnman at gmail.com> wrote:
> Dear all,
>
> I need to add some options to my NSIS installer, and noticed in the
> NSIS.template.in there is a variable CPACK_NSIS_DEFINES that looked
> suitable. Even though it doesn't appear to be documented, I've found
> mentions online of users who have used this variable for similar purposes
> (for example http://www.cmake.org/pipermail/cmake/2009-April/028592.html and
> http://public.kitware.com/Bug/view.php?id=5939). However, for me it doesn't
> work, its contents don't make it into the project.nsi file at all. If I
> check the source code in cmCPackNSISGenerator.cxx, I see that its value is
> overwritten in function PackageFiles. Anyone here who has used it in the
> past? And when did it stop working? Is this supposed to work at all?
>
> regards Mark

On further investigation, when trying to create a minimal example,
I've found that CPACK_NSIS_DEFINES actually works fine for
non-component based installs. Seems to me it is intended to work after
all. However, when you use components, CPACK_NSIS_DEFINES gets
overwritten, instead of appended to. Therefore, I've filed a bug
report (http://public.kitware.com/Bug/view.php?id=14522) and submitted
a patch.

regards Mark


More information about the CMake mailing list