Philip,
Okay, that fixed half of it. I had to move the .lib from the bin folder to the lib folder. I also had to rename it because it was libgnutls-26.lib and the FindGnuTLS looks for libgnutls.lib. So FindGnuTLS.cmake finds the two paths automatically, but the header path is wrong. All the GnuTLS provided headers use the format "gnutls/gnutls.h". Everything is prefixed with "gnutls", but what I get from CMake is: -- GNUTLS_LIBRARY C:/Program Files/GnuTLS-2.9.7/lib/libgnutls.lib -- GNUTLS_INCLUDE_DIR C:/Program Files/GnuTLS-2.9.7/include/gnutls Is this an error that it looks in the wrong directory? It would have to be set to "C:/Program Files/GnuTLS-2.9.7/include/" to work correctly. I can fix my source to just include "gnutls.h", but the gnutls.h has several references to files in "gnutls/*.h". Is this a bug? I had to modify the FindGnuTLS.cmake file to fix this: FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h HINTS ${PC_GNUTLS_INCLUDEDIR} ${PC_GNUTLS_INCLUDE_DIRS} #PATH_SUFFIXES gnutls ) Should this be modified in the distributed FindGnuTLS.cmake file? -- Shane ________________________________ From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Philip Lowman Sent: Wednesday, October 07, 2009 7:40 PM To: Dixon, Shane Cc: cmake@cmake.org Subject: Re: [CMake] FindGnuTLS in 2.8rc2 On Wed, Oct 7, 2009 at 6:38 PM, Dixon, Shane <shane.di...@atmel.com> wrote: One note is that I'm using the MSVC compiler not gnu so I had to run this in the GnuTLS folder: C:\Program Files\GnuTLS-2.9.7\bin>lib /def:libgnutls-26.def /nologo Per the instructions in GnuTLS. It generates a MSVC compatible .lib in the /bin folder. Is that going to hose things having it in the bin folder? Yes, it needs to be put in the lib/ folder for CMAKE_PREFIX_PATH to help find it. You could send a note/patch to the GnuTLS people to fix their documentation to have the user move the import library (.lib file) to "../lib" when done, or just run the lib tool from the lib directory. The GnuTLS installer does put all of the MinGW libraries in lib/ where they belong so no problems there... Also, in case you don't know, you can always show "advanced variables" in the cache editor and set the location of GNUTLS_LIBRARY manually, should CMake fail to auto-detect it. -- Philip Lowman
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake