Skip to content

zsh script that updates pkg-config's path to include your homebrew keg-only libraries

Notifications You must be signed in to change notification settings

harrygallagher4/homebrew-pkgconfig-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

homebrew-pkgconfig-path

This is a zsh script to generate a PKG_CONFIG_PATH string that includes your Homebrew kegs. I ran into trouble compiling something recently and didn't realize that libffi installed by homebrew wasn't recognized by pkg-config. I really prefer to just use a nice package manager for everything so I wanted pkg-config to automatically recognize my homebrew kegs. This does that.

My .zshrc automatically reads from a file called ~/.pc_path which I update via this script.

~/.zshrc

export PKG_CONFIG_PATH=$(cat "$HOME/.pc_path")

~/.pc_path

/usr/local/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libf
fi/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/li
b/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/readline/lib/pk
gconfig:/usr/local/opt/ruby/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig

Then anytime I install a new library with homebrew just run...

harry@mac:~$ homebrew-pkgconfig-path > ~/.pc_path

About

zsh script that updates pkg-config's path to include your homebrew keg-only libraries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages