[CMake] Change cpack install folder

David Cole david.cole at kitware.com
Sat Dec 17 12:44:33 EST 2011


On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2011/12/17 Totte Karlsson <totte at dunescientific.com>:
>>
>> But I found this NSIS specific setting
>> CPACK_NSIS_INSTALL_ROOT
>> But setting that as C:\\ still create the error: "Function missing ending
>> ")" ".
>>
>> Not sure how to get this one right..
>
> set(CPACK_NSIS_INSTALL_ROOT "C:")
>
> should work.
>
> It is awkward but since the template contains:
>
> InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
>
> you cannot remove middle "\", thus the unexpected "C:" (not back
> slashes whatsoever)
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

I disagree that "C:" is awkward compared to "C:\\" -- it follows the
unwritten rule of "thou shalt never end a directory name with a
trailing slash when using it as a variable value when the variable is
meant to be composed into a longer full path name".

(But I understand why you say it's awkward...)

That variable was added as a bug fix in this commit last January:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.


HTH,
David


More information about the CMake mailing list