[CMake] Problem of CPack install folder

David Cole david.cole at kitware.com
Fri Mar 30 09:36:22 EDT 2012


Does:

  set(CPACK_NSIS_INSTALL_ROOT "D:\\")

work?


On Fri, Mar 30, 2012 at 8:14 AM, Huang, Deqing <deqing.huang at intel.com> wrote:
> 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
>
>
>
> --
>
> 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


More information about the CMake mailing list