0

I'm trying to build an app which (sort of) requires libhunspell-dev. I'm not root, so I downloaded hunspell:

$ wget -c http://downloads.sourceforge.net/hunspell/hunspell-1.3.3.tar.gz

built and installed it under $HOME/opt/hunspell. I also set:

export HUNSPELL_DIR=$HOME/opt/hunspell
export HUNSPELL_LIBRARIES=$HUNSPELL_DIR/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HUNSPELL_DIR/lib
export PATH=$PATH:$HUNSPELL_DIR/bin

And still, cmake tells me:

**
** NOTICE ** Could not locate libhunspell. SpellChecker plugin will not be build
** NOTICE ** Try installing libhunspell-dev package
**

What do I do?

einpoklum
  • 118,144
  • 57
  • 340
  • 684

1 Answers1

2

You should set CMake variable CMAKE_PREFIX_PATH to /your/home/opt/hunspell. For command line it is -D flag (cmake -D CMAKE_PREFIX_PATH=/path .) and for GUI use Add entry button.

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • So, if I have a bunch of stuff under `$HOME/opt`, should I have multiple entries in that variables like in $PATH? i.e. `$HOME/opt/pkg1:$HOME/opt/hunspell` etc? – einpoklum Oct 24 '15 at 12:20
  • You can set it to multiple paths - just separate them with ";". – arrowd Oct 24 '15 at 17:26
  • Are you sure it's a semicolon rather than a colon? – einpoklum Oct 24 '15 at 18:54
  • Yes, it's the syntax for CMake lists. Note that if you are setting this variable from code, you should use either `set(VAR a b c)` or `set(VAR "a;b;c")`. – arrowd Oct 24 '15 at 18:58