[CMake] Path to installed target

David Cole david.cole at kitware.com
Wed Jan 12 08:47:17 EST 2011


On Wed, Jan 12, 2011 at 8:34 AM, Alexey Livshits <livchits at web.de> wrote:

> > Well, if you don't want any help fixing the real problem, then the
> > answer is simple: CMake can't possibly give you that information because
> > of DESTDIR.
>
> Thank you.
>
> > So, go and fix your project.
>
> I wish I could, but its not so simple. If you have an idea, just let me
> know.
>
> --
> BG,
> Alexey
> _______________________________________________
> 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
>



Why can't you just set CMAKE_INSTALL_PREFIX to some path that you know and
then reference that from your tests that run the installed version?


DESTDIR will never work on Windows with drive letters in the way:
(for example, if DESTDIR=D:\, and your install rules install some component
to an absolute path, say C:\Program Files\Whatever, then the resulting
attempt would go to "D:\C:\Pro..." which is obviously non-sensical.)

DESTDIR simply does not mix with Windows drive letters, so there always has
to be another way to attack the problem when Windows is a consideration.

Since Windows is always a consideration for the vast majority of CMake-based
projects, DESTDIR is typically avoided as a general technique (except as
guarded by appropriate if(NOT WIN32) usage...)


Does that help?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110112/70b71498/attachment.htm>


More information about the CMake mailing list