MantisBT - CMake
View Issue Details
0015246CMakeCMakepublic2014-11-11 20:572015-04-06 09:07
Jessica Hamilton 
Brad King 
normaltextalways
closedfixed 
HaikuHaikuR1
CMake 3.0 
CMake 3.1CMake 3.1 
0015246: Make GNUInstallDirs more discoverable in the documentation
CMake basically only supports the --prefix option found in configure/autotools based scripts, which leads to users of CMake to hardcode a bunch of paths that are configurable under traditional configure/autotools based projects.

This is a big problem for porting projects using CMake to Haiku, as the paths are different to what is required on Haiku.

For example, pretty much every CMake based project hardcodes @CMAKE_INSTALL_PREFIX@/include all over the place. This location does not exist on Haiku, nor is it searched for.

For autotools based projects, it is a simple matter of specifying --includedir=/boot/system/develop/headers, just as we do for the other locations.

Can CMake please introduce the needed variables to be able to define these locations, so that projects can be updated to use them as they should.

Having to patch/workaround EVERY CMake based project is a nightmare, when the build system should take care of this automatically.
Introduce variables along the lines of CMAKE_INSTALL_PREFIX:

- CMAKE_INSTALL_BINDIR
- CMAKE_INSTALL_LIBDIR
- CMAKE_INSTALL_INCLUDEDIR
No tags attached.
Issue History
2014-11-11 20:57Jessica HamiltonNew Issue
2014-11-11 23:14Orion PoplawskiNote Added: 0037187
2014-11-11 23:50Jessica HamiltonNote Added: 0037188
2014-11-12 03:00Domen VrankarNote Added: 0037190
2014-11-12 08:35Brad KingNote Added: 0037193
2014-11-12 08:36Brad KingAssigned To => Brad King
2014-11-12 08:36Brad KingSeverityfeature => text
2014-11-12 08:36Brad KingStatusnew => assigned
2014-11-12 08:36Brad KingTarget Version => CMake 3.1
2014-11-12 08:36Brad KingSummaryBetter support for autotools directory paths => Make GNUInstallDirs more discoverable in the documentation
2014-11-12 09:40Brad KingNote Added: 0037195
2014-11-12 09:40Brad KingResolutionopen => fixed
2014-11-12 09:40Brad KingFixed in Version => CMake 3.1
2014-11-12 09:40Brad KingStatusassigned => resolved
2015-04-06 09:07Robert MaynardNote Added: 0038442
2015-04-06 09:07Robert MaynardStatusresolved => closed

Notes
(0037187)
Orion Poplawski   
2014-11-11 23:14   
Have you tried using the GNUInstallDirs module?
(0037188)
Jessica Hamilton   
2014-11-11 23:50   
Hmm, thanks, that seems like it will do the right thing. Shame it's not more integral though, since these doesn't get listed under the cmake variables documentation. So projects may not realise the support exists for doing the correct thing.

E.g. documentation should perhaps mention GNUInstallDirs here: http://www.cmake.org/cmake/help/v3.1/manual/cmake-variables.7.html [^]
(0037190)
Domen Vrankar   
2014-11-12 03:00   
+1 for extending the documentation (e.g. adding link http://www.cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html [^] on this page http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_INSTALL_PREFIX.html [^])

I was searching for such functionality there yesterday and did not even know GNUInstallDirs module exists and was intending to write a feature request today - funny coincidence.
(0037193)
Brad King   
2014-11-12 08:35   
Re 0015246:0037190: I've updated the documentation sources accordingly:

 Help: Link to GNUInstallDirs from CMAKE_INSTALL_PREFIX
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00d4cdc9 [^]
(0037195)
Brad King   
2014-11-12 09:40   
Re 0015246:0037193: I've merged this to the 'release' branch for inclusion in the next 3.1 release candidate. That will cause the 3.1 docs linked in
0015246:0037190 to get this link once they are updated for the release.
(0038442)
Robert Maynard   
2015-04-06 09:07   
Closing resolved issues that have not been updated in more than 4 months.