[CMake] Problem of CPack install folder

Huang, Deqing deqing.huang at intel.com
Fri Mar 30 08:14:30 EDT 2012


Hi,

I am trying to set up a customized installation directory via CPack on Windows.

It should be pretty straightforward by setting something like:
    set(CPACK_NSIS_INSTALL_ROOT "D:")
    set(CPACK_PACKAGE_INSTALL_DIRECTORY "mylib")
should get a path of "D:\mylib" , but surprisingly it doesn't work.

I added that two lines based on the example in http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack
then got this path: "C:\Users\myname\Documents\mylib\", apparently CPACK_NSIS_INSTALL_ROOT is not set.

Then I tried many options and found that the CPACK_NSIS_INSTALL_ROOT must contains a '/' to make it working:
By adding following:
    set(CPACK_NSIS_INSTALL_ROOT "D:/")
    set(CPACK_PACKAGE_INSTALL_DIRECTORY "mylib")
will get path: "D:/\mylib\"

This is weird because this path is absolutely not a valid path.

How can I get a path of "D:\mylib" ?

Thanks,
Deqing


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120330/b3f5042e/attachment.htm>


More information about the CMake mailing list