2013/1/21 Ian Monroe <[email protected]>

> On Sun, Jan 20, 2013 at 1:03 PM, Eric Noulard <[email protected]>
> wrote:
> >
> > "It will only affect the files that were make installed
> >   not the files used by CPack" ?
> >
> > CPack does call "cmake -P cmake_install.cmake" so
> > **all files** packaged by CPack are somehow **installed** previously.
> >
> > CMAKE_INSTALL_PREFIX has a CPack-time value which is set by CPack
> > when installing file on the CPack-private location so you should escape
> it
> > in order to prevent its evaluation at CMake-time, i.e.
>
> It doesn't seem to work. CMAKE_INSTALL_PREFIX during CPack/RPM time is
> apparently being set to CPACK_PACKAGING_INSTALL_PREFIX, ie a directory
> that doesn't exist since it's just for the resulting RPM. (Unless
> CPack is running inside a chroot of it's own making at that point??)
>
>
> So with something like this in the strip-all-installed-files.cmake
> script being executed via install(SCRIPT...):
> execute_process(COMMAND ls ${CMAKE_INSTALL_PREFIX} OUTPUT_VARIABLE
> lsresults)
>
> I get an error that the directory doesn't exist.
>

Right I forgot one important bit, CPack plays with CMAKE_INSTALL_PREFIX and
DESTDIR

could you try that:

execute_process(COMMAND ls $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}
OUTPUT_VARIABLE lsresults)

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

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

Reply via email to