Modules installed in CMAKE_ROOT

Bug #1563573 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cmake-extras (Ubuntu)
Fix Released
High
Pete Woods

Bug Description

Every time cmake is upgraded, we need to rebuild cmake-extras to put the modules in the correct place, even though it's just about the paths.

I believe the installation in CMAKE_ROOT is wrong (only cmake-data installs there), we should instead install in /usr/lib/cmake/ (or /usr/lib/<arch>/cmake/ when files are arch-dependent).

Otherwise, we'd need versioned dependencies to prevent broken cmake + cmake-extras installations.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: cmake-extras 0.6+16.04.20160215-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-15.31-generic 4.4.6
Uname: Linux 4.4.0-15-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Mar 29 23:42:12 2016
Dependencies:

PackageArchitecture: all
SourcePackage: cmake-extras
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Michi Henning (michihenning) wrote :

We can install in /usr/lib/cmake/cmake-extras, but that is not backward compatible.

cmake looks in CMAKE_MODULE_PATH for additional modules but, by default, CMAKE_MODULE_PATH is empty, so the extra modules are not found. The only place cmake looks at by default appears to be ${CMAKE_ROOT}/Modules, unfortunately.

We can make this change, but all projects using cmake-extras will have to set CMAKE_MODULE_PATH explicitly:

set(CMAKE_MODULE_PATH /usr/lib/cmake/cmake-extras)

Revision history for this message
Michał Sawicz (saviq) wrote :

I just looked at other projects that install cmake bits, and the two locations common between them are those:

$ dpkg -S /usr/lib/cmake
libjsoncpp-dev:amd64: /usr/lib/cmake

$ dpkg -S /usr/lib/x86_64-linux-gnu/cmake/Qt5
qtbase5-dev:amd64: /usr/lib/x86_64-linux-gnu/cmake/Qt5

While nothing else than cmake itself and cmake-extras installs in the versioned directory:

$ dpkg -S /usr/share/cmake-3.5
cmake-data, cmake-extras: /usr/share/cmake-3.5

By "not backwards compatible", what do you mean? I don't think we need to be compatible further back than... our current cmake TBH.

Pete Woods (pete-woods)
Changed in cmake-extras (Ubuntu):
importance: Undecided → High
assignee: nobody → Pete Woods (pete-woods)
status: New → In Progress
Pete Woods (pete-woods)
Changed in cmake-extras (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.