title: Customizing NSIS installer using CPACK
body: <p>I am trying to customize an NSIS installer using CMAKE and CPACK.
  In particular I would like to include in the generated project.nsi an external script.</p>
  
  <p>Something like:</p>
  
  <pre><code>!include "@SCRIPT_PATH@\@SCRIPT_NAME@.nsh"
  </code></pre>
  
  <p>To do so I am following the example shown here: <a href="https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/NSISAdvancedTips" rel="nofollow noreferrer">https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/NSISAdvancedTips</a></p>
  
  <p>I have copied the template script file (NSIS.template.in) and added the required commands.
  I now need to configure the two variables "@SCRIPT_PATH@ and @SCRIPT_NAME@ accordingly.</p>
  
  <p>I tried to set them like standard CMAKE variables</p>
  
  <pre><code>SET(SCRIPT_PATH "somePath")
  SET(SCRIPT_NAME "someName")
  </code></pre>
  
  <p>but the template variables are simply left blank by CPACK</p>
  
  <p>Any clue?</p>