0

I am using pkg-config 0.26 on OS X Lion.

When I echo $PKG_CONFIG_PATH, it seems that the variable is blank.

When I assign into it, e.g. PKG_CONFIG_PATH=/path/to/my/folder/containing/pc/files, and then run pkg-config --list-all, the .pc files in the directory that I ostensibly just added are not found.

I have been side-stepping this issue by soft linking to individual .pc files from /opt/local/share/pkgconfig, but I would prefer to figure out what the right way is.

casperOne
  • 73,706
  • 19
  • 184
  • 253
AlcubierreDrive
  • 3,654
  • 2
  • 29
  • 45

1 Answers1

1

Aha! This works:

export PKG_CONFIG_PATH=/path/to/my/folder/containing/pc/files

This makes total sense, it's just that I wrote the question before I knew the meaning of the command export.

Quoting from Defining a variable with or without export :

export makes the variable available to subprocesses

And pkgconfig is a subprocess of the shell when it is run.

Community
  • 1
  • 1
AlcubierreDrive
  • 3,654
  • 2
  • 29
  • 45