title: g++ not finding library in /usr/local/lib
body: <p>I'm trying to get g++ to find <code>glog</code> on its own (OS X 10.11.5). I installed glog (tried with both cmake from a github pull as well as brew install - same result in both cases). Then I tried to compile this file:</p>
  
  <pre><code>#include &lt;glog/logging.h&gt;
  
  int main(int argc, char** argv) {
    int* x = nullptr;
    CHECK_NOTNULL(x);
    return 0;
  }
  </code></pre>
  
  <p>by running <code>g++ -lglog -I/usr/local/include test.cpp</code></p>
  
  <p>This fails with the following error:</p>
  
  <pre><code>ld: library not found for -lglog
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>However, when I compile with <code>g++ -L/usr/local/lib -lglog -I/usr/local/include test.cpp</code> it works fine.</p>
  
  <p>I tried adding <code>/usr/local/lib</code> into my LD_LIBRARY_PATH to no avail.</p>
  
  <p>Normally, I wouldn't mind, but I'm using CMake (which finds glog just fine), and I don't want to "hardcode" library paths in there so that it's portable. I tried this before on another Mac and it worked fine, so I'm not sure what's going on. Any advice on fixing this?</p>