Bug 294494

Summary: shapelib not found by CMake under Archlinux
Product: [Applications] marble Reporter: Bernhard Beschow <shentey>
Component: generalAssignee: marble-bugs
Status: RESOLVED FIXED    
Severity: normal CC: nienhueser
Priority: NOR    
Version: unspecified   
Target Milestone: 1.3 (KDE 4.8)   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

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