[CMake] Path to installed target

Alexey Livshits livchits at web.de
Wed Jan 12 08:59:08 EST 2011


> 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?

I thought about it, but I'd like to keep it independent of some known
path. If you mean, there is no other way, I should give them a try.

> 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?

This is sick :( I use DESTDIR to keep on disk multiple versions of the software.
Thank you for your help.

-- 
BG,
Alexey


More information about the CMake mailing list