Am Sonntag 02 August 2009 schrieb Abdelrazak Younes:
> On 02/08/2009 12:44, Kornel Benko wrote:
> > Am Sonntag 02 August 2009 schrieb Abdelrazak Younes:
> > > On 02/08/2009 12:35, Kornel Benko wrote:
> > > > +if (HUNSPELL_FOUND)
> > > > + target_link_libraries(${_lyx} hunspell)
> > >
> > > On Windows, I need libhunspell instead of hunspell and then it links!
> >
> > Try again :(
>
> Doesn't seem to work:
>
> CMake Error: The following variables are used in this project, but they
> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
> CMake files:
> HUNSPELL_LIBRARY
>
> On my system, I have a lyx-deps directory with the following subdir:
> include/   fon GnuWin32 stuff (iconv, aspell, etc)
> include/hunspell  for hunspell
> bin/ for the needed executables and dlls
> lib/ for the library interface (iconv.lib, aspell.lib, libhunspell.lib,
> etc)
>
> libhunspell.lib is I guess the name chosen by the hunspell developers,
> if I rename that to huspell.lib, cmake won't error out!
> So that's OK as far as I am concerned on Windows.

Ok, I will change it. (Looks very unportable now)
Could you try the attached?

> Thanks.
> Abdel.

        Kornel


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 30826)
+++ CMakeLists.txt	(working copy)
@@ -194,7 +194,11 @@
 	add_definitions(-DHAVE_GETTEXT)
 endif()
 
-find_library(HUNSPELL_LIBRARY "hunspell")
+if(WIN32)
+    find_library(HUNSPELL_LIBRARY "libhunspell")
+else()
+    find_library(HUNSPELL_LIBRARY "hunspell")
+endif()
 if (HUNSPELL_LIBRARY)
     find_file(HUNSPELL_FOUND "hunspell/hunspell.hxx")
 endif()

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to