[CMake] error while stage install of crosscompiled binaries

Claus Klein claus.klein at arcormail.de
Fri Jan 8 16:26:27 EST 2010


Hi David,

Yes, this works fine when I change the CMAKE_INSTALL_PREFIX at  
CMakeCache.txt, sure.

There is only one fault: the config files will be rebuild with the  
wrong path before install :-((


At least, I know 2 packages, NetSnmp and LibSmi, they has to be  
compiled with fix absolute paths,
including the device name on Windows, that is not my idea! It would be  
better to use a ConfigFile and
the program can be install at any place. But they is a history and  
they needs there MIB's.
(What is the current drive to find this config file when I start c:/ 
usr/bin/smilint from d:/workdir?)

When I add the string replace command to the cmake_install.cmake file,  
it works as a quick hack.
This should only remove the drive string in the middle, not the  
beginning of the PREFIX path:

STRING(REGEX REPLACE "/[A-Za-z]:/" "/" CMAKE_INSTALL_PREFIX "$ 
{CMAKE_INSTALL_PREFIX}")

But I know that this can't be the general solution.


I did not see any DESTDIR in this file, so I think it will be set as  
parameter or in environment?
Only if DESTDIR is given, this drive name has to be replace.

Where is the DESTDIR prepended to the PREFIX?
Is there a template for this generated cmake_install.cmake?

Claus

On 08.01.2010, at 17:49, David Cole wrote:

> On Fri, Jan 8, 2010 at 12:37 AM, Claus Klein  
> <claus.klein at arcormail.de> wrote:
>
> On 08.01.2010, at 02:25, Alexander Neundorf wrote:
>
> On Thursday 07 January 2010, Claus Klein wrote:
> Hi
>
> i want to install a cross compiled (build host is a MAC OS X) project
> to a temporary state dir to get an archive to distribute the binaries.
> The target is win32 (mingw), compiled to be installed at c:/usr as
> CMAKE_INSTALL_PREFIX.
> This prefix is used while compile the binaries, so I can't change it.
>
> I think, that when I use DESTDIR while "make DESTDIR=/tmp/cmake
> install", the device (C:) should be removed before to use it as part
> of a path like this:
>
> STRING(REGEX REPLACE "[A-Za-z:/]" "" CMAKE_INSTALL_PREFIX "$
> {CMAKE_INSTALL_PREFIX}")
>
> head cmake_install.cmake
> # Install script for directory: /Users/clausklein/Workspace/c/libsmi/
> trunk
> #
> # Set the install prefix
> IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
>  SET(CMAKE_INSTALL_PREFIX "C:/usr")
> ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
> STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "$
> {CMAKE_INSTALL_PREFIX}")
> . . . .
>
> As you can see,  PREFIX is appended to DESDIR without modification.
> which is wrong in this special case.
>
> Yes. So you would suggest to remove the drive letter from  
> CMAKE_INSTALL_PREFIX
> when installing with DESTDIR set ?
>
> Alex
>
> Yes
>
> I think it is never a valid path in this case to on Windows itself:
>
> i.e. C:/tmp/cmake/C:/usr/lib/pkgconfig
>
> I want to create a zip archive at /tmp/cmake to install it on  
> Windows under C:/
>
> Claus
>
>
> _______________________________________________
> 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
>
>
> Can you try setting CMAKE_INSTALL_PREFIX to just "/usr" instead of  
> "C:/usr" to see if you can get what you want in that manner...?
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100108/c88e1a0c/attachment.htm>


More information about the CMake mailing list