MantisBT - CMake
View Issue Details
0009685CMakeModulespublic2009-10-08 16:392010-09-01 00:13
Shane Dixon 
Philip Lowman 
normalminoralways
closedfixed 
CMake-2-8 
 
0009685: FindGnuTLS.cmake returns wront library path
When searching for GnuTLS on windows, the path gets returned wrong for the headers:

-- GNUTLS_LIBRARY C:/Program Files/GnuTLS-2.9.7/lib/libgnutls.lib
-- GNUTLS_INCLUDE_DIR C:/Program Files/GnuTLS-2.9.7/include/gnutls

It looks for gnutls.h but if you look in gnutls.h, all the other includes are framed as "gnutls/*.h". The correct include path should be "C:/Program Files/GnuTLS-2.9.7/include". I fixed this by modifying the find_path call to:

FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
   HINTS
   ${PC_GNUTLS_INCLUDEDIR}
   ${PC_GNUTLS_INCLUDE_DIRS}
   )

This finds the right path so now in the source you can include using "gnutls/gnutls.h" and it works.
Attached is my modified version that works correctly.
No tags attached.
? FindGnuTLS.cmake (2,333) 2009-10-08 16:39
https://public.kitware.com/Bug/file/2545/FindGnuTLS.cmake
Issue History
2009-10-08 16:39Shane DixonNew Issue
2009-10-08 16:39Shane DixonFile Added: FindGnuTLS.cmake
2009-10-08 16:41Shane DixonNote Added: 0018048
2009-10-08 22:08Philip LowmanStatusnew => assigned
2009-10-08 22:08Philip LowmanAssigned To => Philip Lowman
2009-10-08 22:52Philip LowmanNote Added: 0018049
2009-10-08 22:52Philip LowmanStatusassigned => resolved
2009-10-08 22:52Philip LowmanResolutionopen => fixed
2010-09-01 00:13Philip LowmanStatusresolved => closed

Notes
(0018048)
Shane Dixon   
2009-10-08 16:41   
Oops. title should read that it sets the wrong Include directory, not library path. Although the library path does have issues to if using MSVC. One has to run

C:\Program Files\GnuTLS-2.9.7\bin>lib /def:libgnutls-26.def /nologo

and move the resulting file to C:\Program Files\GnuTLS-2.9.7\lib and rename it from libgnutls-26.lib to libgnutls.lib for that to work. That's only when using MSVC (per the gnutls instructions).
(0018049)
Philip Lowman   
2009-10-08 22:52   
Fixed in CVS, thanks for reporting the issue and the patch.