[CMake] CPack and windows maximum path legth

Jakub Zakrzewski jzakrzewski at e2e.ch
Tue Mar 12 11:08:27 EDT 2013


-----Original Message-----
From: Eric Noulard [mailto:eric.noulard at gmail.com] 
Sent: Dienstag, 12. März 2013 15:39
To: Jakub Zakrzewski
Cc: cmake at cmake.org
Subject: Re: [CMake] CPack and windows maximum path legth

2013/3/12 Jakub Zakrzewski <jzakrzewski at e2e.ch>:
> Hi All!
>
> I have recently reached the maximum path length using CPack on windows. The problem is that the project I'm working on has a directory hierarchy that cannot be changed. Somebody some time ago decided on concrete paths and if I try to change it, I got into real trouble. All our tools have hardcoded paths, many things have dependecies on source or build directory location.
>
> Is there any way, to make CPack use other temporary directory than ${BUILD_DIR)/_CPack_Packages ? I'd rather avoid having two build trees and having to compile again only to produce a package.

Yes there is.

CPACK_PACKAGE_DIRECTORY is what you are looking for.
see: cpack  --help-variable CPACK_PACKAGE_DIRECTORY

You can set this variable in your CMakeLists.txt or CPack project config file or from the cpack command line using the "-B" command line option.

see: cpack  --help

--
Erk
Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org

Aaaaaa.... 
Missed that one. Lifesaver.
Thanks.

--
Gruesse,
Jakub





More information about the CMake mailing list