GeographicLib cmake file in wrong place

Bug #1805173 reported by Ian Vaughn
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
geographiclib (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The geographiclib-dev installer puts the FindGeographicLib.cmake file in:
/usr/share/cmake/geographiclib/FindGeographicLib.cmake

The correct location is:
/usr/share/cmake-3.5/Modules

The first location is not in the cmake path, so it never gets found by cmake and is more or less completely useless by default. The file itself seems fine once I add it to the cmake path, so it looks like a simple install script bug.

This bug was originally discovered with libgeographiclib-dev 1.45-2 in xenial, but it appears to still be present in package 1.49 in bionic.

Ian Vaughn (ivaughn)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in geographiclib (Ubuntu):
status: New → Confirmed
Revision history for this message
Ian Colwell (iancol) wrote :

Somewhat related issue as well:
https://stackoverflow.com/a/48524106/8008576

Revision history for this message
Martin Pecka (peci1) wrote :

Workaround for downstream projects:

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake/geographiclib")

Revision history for this message
Ryan Friedman (ryanf55) wrote (last edit ):

For portability, this at least does that change only on Linux:

if(CMAKE_SYSTEM_NAME STREQUAL Linux)
  list(APPEND CMAKE_MODULE_PATH /usr/share/cmake/geographiclib)
endif()

This is a potential patch that fixes Ubuntu 22.04.

Revision history for this message
Ryan Friedman (ryanf55) wrote :

Hello,

If I found a backwards-compatible fix, is there any possibility it could be backported to Ubuntu Jammy? If so, I am happy to contribute one.

Revision history for this message
Naël (nathanael-naeri) wrote :

Can confirm that Ryan's CMake code in comment #4 works around this issue in Ubuntu 20.04.

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.