title: Using pkg-config with Qt Creator/qmake on Mac OSX
body: <p>pkg-config doesn't come stantdard with Mac OSX (10.8.4). For my Qt project I wanted to use pkg-config to link in protocol-buffer, so that it would be portable. The very point of choosing Qt was to have a portable app in the first place.</p>
  
  <p>However, qmake would not let me use pkg-config. <a href="https://stackoverflow.com/questions/3517694/linking-libraries-to-a-qt-project-using-pkg-config-output">Linking libraries to a QT project using pkg-config output</a> gives a simple recipe that should work. But it doesn't</p>
  
  <p>with <code>CONFIG += link_pkgconfig
  PKGCONFIG += protobuf
  </code> I'm getting the error <code>Project ERROR: Package protobuf not found</code></p>
  
  <p>Eventhough pkg-config and protobuf are installed using homebrew and in path. And the problem is with all pkg-config packages.</p>
  
  <pre><code>qmaketest$which pkg-config
  /usr/local/bin//pkg-config
  qmaketest$pkg-config --cflags --libs libssl
  -lssl -lcrypto -lz 
  qmaketest$cat project.proj 
  QT       += core gui
  
  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  
  TARGET = project
  TEMPLATE = app
  
  
  SOURCES += 
  
  HEADERS  += 
  
  FORMS    += 
  
  OTHER_FILES += 
  
  CONFIG += link_pkgconfig
  PKGCONFIG += libssl
  
  qmaketest$/Applications/Other/Qt5.0.2/5.0.2/clang_64/bin/qmake project.proj 
  Project ERROR: Package libssl not found
  </code></pre>
  
  <p>When I dug deeper I found a solution.</p>