Add command line options to my installer (CPack + NSIS)

Hello,

I would like to add some command line options to my installer that I create using CPack and NSIS.
Example: instead of running “myinstaller.exe”, I would like to run “myinstaller.exe --noshortcut” which then omits the creation of a desktop shortcut. Possibly also add some other options. How should I proceed? All suggestions are welcome.

Thanks!

CPack uses teo template files for the NSIS setup. You can just copy that to a directory that you set in CMAKE_MODULE_PATH. I think this is mentioned in the documentation or in the wiki.

Where exactly in the documentation or the wiki is this mentioned? I was unable to find it. A google search for “teo template files” or “teo template files cpack” did also not give me any information. I really don’t know where to find this info.

I think “teo” is a typo of some kind. Or it’s the name for the NSIS “language”. CMake has its template files here. I don’t know of a way to replace its usage off-hand though.