[CMake] CMake-CPack-NSIS
Alin M Elena
alin.elena at qub.ac.uk
Tue Apr 8 18:50:38 EDT 2008
Hi Eric,
Thanks. That's the idea it worked.
Alin
-----Original Message-----
From: Eric Noulard [mailto:eric.noulard at gmail.com]
Sent: 08 April 2008 19:57
To: alin.elena at qub.ac.uk
Cc: CMake ML
Subject: Re: [CMake] CMake-CPack-NSIS
2008/4/8, Alin M Elena <alin.elena at qub.ac.uk>:
> Thanks Eric,
>
>
> I reformulate the problem.
>
> >> I want to setup a variable(TestVar) on windows when I use
> NSIS
> >> using cmake/cpack.
>
> >> A small example is presented here
> >> http://nsis.sourceforge.net/Setting_Environment_Variables
>
> I suspected that the solution will be a combination of the info given
above
> and
>
> CPACK_NSIS_EXTRA_(UN)INSTALL_COMMANDS
>
>
> This model does not work because the extra commands get added in their
> sections
> And adding defining a function can be done only outside the section
> environment.
OK I see.
>
> Any ideas?
NSIS CPack generator use the following templates:
<CMAKE>/share/cmake-2.<x>/Modules/NSIS.InstallOptions.ini.in
<CMAKE>/share/cmake-2.<x>/Modules/NSIS.template.in
You may replace those template using you own template
which may contains more user-defined CMake variables
(in the appropriate section) which may be replaced by CMake.
If you add your template in your custom module Path
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
it should work (not tested though :-)
--
Erk
More information about the CMake
mailing list