title: CMake Error: Could NOT find SWIG (missing: SWIG_DIR)
body: <p>I wanted to test out <a href="https://github.com/cmusphinx/node-pocketsphinx" rel="nofollow noreferrer">Pocketsphinx in Node.JS</a>. It says I need to install Swig version 3.0.7 or above.</p>
  <p>I think I installed all the other dependencies correctly. I can even type Swig commands in the Terminal now, but I keep getting this error whenever I run <code>npm install pocketsphinx</code>:</p>
  <pre><code>CMake Error at /usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
    Could NOT find SWIG (missing: SWIG_DIR) (Required is at least version
    &quot;3.0.7&quot;)
  Call Stack (most recent call first):
    /usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
    /usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    CMakeLists.txt:4 (find_package)
  </code></pre>
  <p>I tried <code>brew install swig</code>, <code>npm install swig</code>, and <code>npm install -g swig</code>. I tried going to <a href="http://www.swig.org/download.html" rel="nofollow noreferrer">the swig download page</a> and following the installation instructions, but nothing I seem to do stops the error from happening. I'm trying this on a Macbook by the way.</p>
  <p>I really have no clue what I'm doing here. I just wanted to test out Pocketsphinx and now I've installed Swig in 4 different places, and CMake can't seem to recognise any of them.</p>
  <p>Any help would be wonderful!</p>