title: How can I use CMake to install a script?
body: <p>I have a project that builds several executables and also installs them.  For the executables the relevant CMake code is:</p>
  
  <pre><code>add_executable(foo "foo.cpp")
  add_executable(bar "bar.cpp;qux.cpp")
  install(TARGETS foo bar "/usr/bin")
  </code></pre>
  
  <p>Then I create a .deb package and when it installs I can run <code>foo</code> and <code>bar</code> from the command line.  I want to do something like this:</p>
  
  <pre><code>add_executable(foo "foo.cpp")
  add_executable(bar "bar.cpp;qux.cpp")
  add_script(hello "hello.sh")
  install(TARGETS foo bar hello)
  </code></pre>
  
  <p>...so that <code>hello</code> is executable from the command line.  But there isn't actually a CMake command called <code>add_script</code>.  How can I achieve this?</p>