Hi Eric, Thanks. That's the idea it worked.
Alin -----Original Message----- From: Eric Noulard [mailto:[EMAIL PROTECTED] Sent: 08 April 2008 19:57 To: [EMAIL PROTECTED] Cc: CMake ML Subject: Re: [CMake] CMake-CPack-NSIS 2008/4/8, Alin M Elena <[EMAIL PROTECTED]>: > 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 _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake