C++ – eclipse cdt: add include path from pkg-config

ceclipseeclipse-3.6eclipse-cdtpkg-config

i want to add a dynamic configuration path (generated from pkg-config) to my project. (this is basically for third-party dependencies like boost, so workspace includes is not appropiate, and filesystem include neither because that would be hardcoded and every developer would have to change that manually)

i am on project properties->c++ general->paths and symbols->includes tab->add…->add directory path->variables but i can only select among existing variables, how do i create a new variable dynamically generated from a command line program? like pkg-config --cflags boost-1.43?

this is easy to do in netbeans; you just add the pkg-config commandline with the backquotes in the build additional options and it resolves the build include and even in theory it should update the indexer (although truth be said, last time the indexer was correctly updating from pkg-config was on netbeans 6.8, it has been broken on 6.9 and 6.9.1)

i read this StackOverflow post but i still not sure how it helps this specific case

i read somewhere that you can use $(shell pkg-config…) to generate environment variables but not sure where to place the command

if there is no easy out of the box solution i'll try the script in this blog post

btw, i'm using eclipse helios -cdt 7

thanks!

Best Answer

Pkg-config support is finally coming to CDT and will be finished on August.

http://code.google.com/p/pkg-config-support-for-eclipse-cdt/

Related Topic