MantisBT - CMake
View Issue Details
0007445CMakeModulespublic2008-08-02 04:012009-02-23 22:39
Antonio Valentino 
Philip Lowman 
normalminoralways
closedfixed 
CMake-2-6 
CMake-2-6 
0007445: Wrong link flags for GDAL on ubuntu/debian
cmake seems to fail in setting up link flags for the GDAL library in ubuntu/debian.
In this systems the GDAL shared library is named libgdalX.Y.Z.so but cmake always try to link against libgdal.so ---> -lgdal.
In my opinion this is due to the facts that FindGDAL.cmake doesn't use gdal-config to set up link flags.
The implementation of FindGDAL.cmake provided by the qgis project (https://svn.osgeo.org/qgis/trunk/qgis/cmake/FindGDAL.cmake [^]) seems to fix the problem.
No tags attached.
Issue History
2008-08-02 04:01Antonio ValentinoNew Issue
2008-08-19 14:14Bill HoffmanStatusnew => assigned
2008-08-19 14:14Bill HoffmanAssigned To => Eric Wing
2009-01-23 00:56Philip LowmanCategoryCMake => Modules
2009-01-31 01:52Philip LowmanNote Added: 0014745
2009-01-31 01:52Philip LowmanAssigned ToEric Wing => Philip Lowman
2009-01-31 01:52Philip LowmanStatusassigned => resolved
2009-01-31 01:52Philip LowmanResolutionopen => fixed
2009-02-23 22:39Philip LowmanNote Added: 0015302
2009-02-23 22:39Philip LowmanStatusresolved => closed
2009-02-23 22:39Philip LowmanFixed in Version => CMake-2-6

Notes
(0014745)
Philip Lowman   
2009-01-31 01:52   
Thanks for the suggestion, I've committed code which uses the output from gdal-config. I've also added several guesses as per the libGDAL version should this code fail for some reason (gdal1.5.0 for example).

Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindGDAL.cmake,v <-- FindGDAL.cmake
new revision: 1.4; previous revision: 1.3
(0015302)
Philip Lowman   
2009-02-23 22:39   
Fix available in 2.6.3