Bug 294494 - shapelib not found by CMake under Archlinux
Summary: shapelib not found by CMake under Archlinux
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.3 (KDE 4.8)
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-20 12:14 UTC by Bernhard Beschow
Modified: 2012-02-20 15:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2012-02-20 12:14:32 UTC
Version:           unspecified
OS:                Linux

Even though shapelib-1.2.10 is installed, the library is not found by CMake. See [1] for the package details.

[1] http://www.archlinux.org/packages/community/i686/shapelib/

Reproducible: Always

Steps to Reproduce:
1) install Archlinux ;-)
2) make sure shapelib is installed
3) run cmake in the Marble sources

Actual Results:  
shapelib is not found

Expected Results:  
shapelib should be found:
* libshp.* under /usr/lib
* shapefil.h under /usr/include/libshp

I'm not a CMake guru so I'm filing this bug report.
Comment 1 Dennis Nienhüser 2012-02-20 12:35:53 UTC
No cmake guru status needed for that ;-)
The difference seems to be that ArchLinux installs the header as usr/include/libshp/shapefil.h, but Debian uses usr/include/shapefil.h. Replacing 

find_path(LIBSHP_INCLUDE_DIR NAMES shapefil.h)

with

find_path(LIBSHP_INCLUDE_DIR NAMES shapefil.h PATH_SUFFIXES libshp)

possibly does the trick (in Findlibshp.cmake). See also 
cmake --help-command find_path
Comment 2 Bernhard Beschow 2012-02-20 15:36:09 UTC
Git commit 74e658af2f218e9f21e246245ead4a88a1af2fbb by Bernhard Beschow.
Committed on 20/02/2012 at 16:35.
Pushed by beschow into branch 'master'.

find shapelib also under Archlinux

Thanks to CMake guru Dennis!

M  +1    -1    Findlibshp.cmake

http://commits.kde.org/marble/74e658af2f218e9f21e246245ead4a88a1af2fbb