[CMake] smarter shortcuts with NSIS
Andrea Crotti
andrea.crotti.0 at gmail.com
Mon Feb 27 10:34:05 EST 2012
My brain is almost going to explode, so before it does maybe someone can
help..
I have a cpack with NSIS working installer, which just copies a directory.
In that directory there is a file run.exe, which needs to take an
argument to run correctly.
Now that argument is a path which is only known at install-time, via
asking to the user.
So what I would like to do is to:
1. get that path into a variable
2. stick it into the arguments of a shortcut file on the windows machine
I found something like this on stackoverflow:
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
CreateShortCut \\\"$DESKTOP\\\\${PROJECT_NAME}.lnk\\\"
\\\"$INSTDIR\\\\built_egg\\\\run.exe\\\" \"c:\python25\pythonw.exe\"
")
But I have some trouble understand in general, how is this command
processed?
First the cmake variables are substituted and then it's simply run?
And any advice on how to get the variable with the path?
Thanks,
Andrea
More information about the CMake
mailing list