MantisBT - CMake
View Issue Details
0012374CMakeCMakepublic2011-08-01 00:572013-01-09 14:05
John Bowler 
Eric NOULARD 
highmajoralways
closedfixed 
allallall
CMake-2-8 
CMake 2.8.10 
0012374: DESTDIR is not documented
The summary says it all.
Read the documentation.
Without DESTDIR (or equivalent) support cmake is basically a waste of time, so failing to document it is, well...
No tags attached.
Issue History
2011-08-01 00:57John BowlerNew Issue
2011-08-01 03:38Eric NOULARDNote Added: 0027134
2011-08-01 10:30John BowlerNote Added: 0027135
2011-08-01 10:38John BowlerNote Added: 0027136
2011-08-01 10:45John BowlerNote Added: 0027137
2012-08-11 11:38David ColeStatusnew => backlog
2012-08-11 11:38David ColeNote Added: 0030289
2012-08-12 23:26John BowlerNote Added: 0030462
2012-08-13 11:06David ColeNote Added: 0030567
2012-08-14 13:54Eric NOULARDNote Added: 0030647
2012-08-14 14:18Eric NOULARDAssigned To => Eric NOULARD
2012-08-14 14:18Eric NOULARDStatusbacklog => assigned
2012-08-14 14:19Eric NOULARDTarget Version => CMake 2.8.10
2012-08-14 14:22Eric NOULARDNote Added: 0030649
2012-08-14 14:22Eric NOULARDStatusassigned => resolved
2012-08-14 14:22Eric NOULARDResolutionopen => fixed
2013-01-09 14:05Robert MaynardNote Added: 0032063
2013-01-09 14:05Robert MaynardStatusresolved => closed

Notes
(0027134)
Eric NOULARD   
2011-08-01 03:38   
Could you be more specific,
It is documented here:
http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F [^]

Where do you want to document it?
(0027135)
John Bowler   
2011-08-01 10:30   
Yes, that's how I found out that it was supported on all platforms, the problem is that the cmake release itself, in particular the documentation, here:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html [^]

Doesn't mention it (not a single instance of "DESTDIR"). It should be mentioned, particularly here:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#section_VariablesthatControltheBuild [^]

under 'CMAKE_INSTALL_PREFIX', along with pointing out that because it is invoked with $ENV(DESTDIR) it presumably can't be set in the cache.

I guess I could have reported the bug as "it isn't documented how to build a package with cmake", but by the time I reported it I'd already found out that DESTDIR can be set. (This did not occur to me at all, until I trawled through the gentoo cmake-utils.eclass, couldn't find anything, built an existing cmake package with gentoo and eventually worked out it was DESTDIR...)

Think what happens if a Windows user has DESTDIR set in her environment (there's no history to DESTDIR on Windows) and uses the INSTALL target under VS10...
(0027136)
John Bowler   
2011-08-01 10:38   
And here:

http://www.cmake.org/cmake/help/cmake_tutorial.html [^]

in step (3), "installing and testing". And in the FAQ under "installation questions" there should be a section "How do I install to an intermediate (non-final) directory, e.g. when building a package for later installation?" Since many people probably don't know about DESTDIR and what it has traditionally been used for in UNIX build systems.
(0027137)
John Bowler   
2011-08-01 10:45   
I'll do the FAQ, since I can change that.
(0030289)
David Cole   
2012-08-11 11:38   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0030462)
John Bowler   
2012-08-12 23:26   
So far as I am concerned the issue is moot. cmake support is not sufficiently important for libpng, so far as I can see, to worry about it.
(0030567)
David Cole   
2012-08-13 11:06   
For what it's worth, DESTDIR is covered in the CPack chapter of the Mastering CMake text. It's noted in there that DESTDIR is useless on Windows anyhow because you can't prefix a C:/some/path with a C:/some/other/path and end up with a valid path name. So, since there's no default "/" as the root of the filesystem for typical Windows users, DESTDIR is not useful to recommend as a generalized cross-platform technique.

Although, on Mac and Linux and other *nix, DESTDIR support is there, and works quite nicely.

We should probably still mention it somewhere in the online/built-in documentation, but still: where? In the INSTALL command? In some CPack help? It's unclear to me where a user would look for such help if they were seeking information about DESTDIR support.
(0030647)
Eric NOULARD   
2012-08-14 13:54   
I would say that INSTALL command help is already long enough so I'd rather
refer to CMAKE_INSTALL_PREFIX var documentation in INSTALL command.

Then we can extend/enhance CMAKE_INSTALL_PREFIX documentation
speaking of DESTDIR usage.

Note that concerning CPack and DESTDIR there is some documentation already
concerning the CPACK_SET_DESTDIR:

cpack --help-variable CPACK_SET_DESTDIR

What do you think?
(0030649)
Eric NOULARD   
2012-08-14 14:22   
I think this should fix the issue.
I didn't speak about the $ENV(DESTDIR) thing because I think
it should be already be clear enough that DESTDIR is an
"installation-time" mechanism.

Merge topic 'DESTDIR-documentation-enhancement' into next

d593cef Enhance DESTDIR documentation. Fixes 0012374.
(0032063)
Robert Maynard   
2013-01-09 14:05   
Closing resolved issues that have not been updated in more than 4 months.