[CMake] Problem of CPack install folder

Huang, Deqing deqing.huang at intel.com
Fri Mar 30 09:53:53 EDT 2012


Thanks for the reply.

With
     set(CPACK_NSIS_INSTALL_ROOT "D:\\")

the PACKAGE failed to build:

5>------ Build started: Project: PACKAGE, Configuration: Debug Win32 ------
5>Build started 3/30/2012 21:51:15.
5>InitializeBuildStatus:
5>  Creating "Win32\Debug\PACKAGE\PACKAGE.unsuccessfulbuild" because "AlwaysCreate" was specified.
5>EXEC : CMake error : Error in cmake code at
5>  D:/ComponentExample/ComponentExample/Source/build/CPackConfig.cmake:101:
5>  Parse error.  Function missing ending ")".  Instead found unterminated string with text ")
5>  ".
5>EXEC : CPack error : Problem reading CPack config file: "D:/ComponentExample/ComponentExample/Source/build/CPackConfig.cmake"
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "setlocal
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: cd D:\ComponentExample\ComponentExample\Source\build
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: D:
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: "C:\Users\dhuang7\Documents\CMake 2.8\bin\cpack.exe" -C Debug --config ./CPackConfig.cmake
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmErrorLevel
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: exit /b %1
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmDone
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.
5>
5>Build FAILED.


> -----Original Message-----
> From: David Cole [mailto:david.cole at kitware.com]
> Sent: Friday, March 30, 2012 21:36
> To: Huang, Deqing
> Cc: cmake at cmake.org
> Subject: Re: [CMake] Problem of CPack install folder
> 
> 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