[CMake] Changing directory layout with Cpack ?

Eric Noulard eric.noulard at gmail.com
Thu Nov 29 02:15:03 EST 2007


2007/11/28, Stephen Collyer <scollyer at netspinner.co.uk>:
> I have a build tree set up like this:
>
> src/<subdirs>
> builds/linux
> builds/win32
> install/linux/bin
> install/linux/lib
> install/win32
>
> where all the source code lives under src, I do out-of-source
> builds under builds, and I install built objects into install/linux
> and install/win32.

How do you do that?

1) make install in each build tree?
    or do you use
2) make DESTDIR=/path/to/install install ?
3) or did you SET
     LIBRARY_OUTPUT_PATH
     EXECUTABLE_OUTPUT_PATH


> Now I want to package this up using Cpack, but I want the linux
> package to end up with top level dirs
>
> <project>/bin/<executable files>
> <project>/lib/<libraries>
>
> and the win32 builds to end up with
>
> <project>/<executable files and libraries>
>
> i.e. I want to remove the install/linux and install/win32
> parts of the tree. Is this possible using some combination
> of INSTALL and Cpack ? I can't see how at the moment.

CPack package all the thing you install using INSTALL
concerning path prefix you may use
CMAKE_INSTALL_PREFIX in order to influence
INSTALL command using __RELATIVE__ PATH
if you use absolute path "CMAKE_INSTALL_PREFIX" will not
be used.

Could you send us some of your INSTALL command usage
for linux and win32 case?

-- 
Erk


More information about the CMake mailing list