title: CMake cannot find include libpq-fe.h
body: <p>I'm trying to build a program which requieres <code>libpq-fe.h</code> include file.</p>
  
  <p>This file is in <code>E:\MinGW\msys\1.0\local\pgsql\include</code></p>
  
  <p>In my CMakeLists.txt I have:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.0)
  # declare project
  PROJECT(localscp)
  
  set(pg_SOURCE_DIR /usr/local/pgsql)
  
  INCLUDE_DIRECTORIES(
    "E:/MinGW/msys/1.0/local/psql/include"
  )
  
  # declare executables
  ADD_EXECUTABLE(localscp localscp.cc)
  TARGET_LINK_LIBRARIES(localscp 
    dl pthread z pq)
  </code></pre>
  
  <p>When I do <code>cmake .</code> I get:</p>
  
  <pre><code>-- Configuring done
  -- Generating done
  -- Build files have been written to: E:/informemedico/localscp
  </code></pre>
  
  <p>When I do <code>mingw32-make</code> I get:</p>
  
  <pre><code>[ 50%] Building CXX object CMakeFiles/localscp.dir/localscp.cc.obj
  E:\informemedico\localscp\localscp.cc:24:22: fatal error: libpq-fe.h: No such file or directory compilation terminated.
  CMakeFiles\localscp.dir\build.make:62: recipe for target 'CMakeFiles/localscp.dir/localscp.cc.obj' failed
  mingw32-make[6]: *** [CMakeFiles/localscp.dir/localscp.cc.obj] Error 1
  CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/localscp.dir/all' failed
  mingw32-make[5]: *** [CMakeFiles/localscp.dir/all] Error 2
  makefile:82: recipe for target 'all' failed
  mingw32-make[4]: *** [all] Error 2
  </code></pre>
  
  <p>Why the compiler can't find that include file?.</p>