Agalin / pidgin_macos_integration

Pidgin plugin adding macOS shell integration
BSD 2-Clause "Simplified" License
8 stars 2 forks source link

Use pkg-config to get dependencies #14

Open snowkat opened 2 years ago

snowkat commented 2 years ago

With this change, a pre-build script will get the library and header flags needed for dependencies from pkg-config instead of having them hardcoded. This has allowed for building on my system (ARCH=arm64) with xcodebuild and in Xcode.app.

Xcode seems to have a version of pkg-config in its $PATH that doesn't check Homebrew pkgconfig directories. To get around that, the build takes an argument HOMEBREW_ROOT which defaults to /opt/homebrew (the current default path) and can be overrode in xcodebuild or by modifying the scheme's arguments.

For some reason the pre-build script doesn't run by default on xcodebuild, and I had to explicitly define the scheme to get it to kick off consistently:

xcodebuild \
    -project PidginMacOSIntegration.xcodeproj \
    -scheme PidginMacOSIntegration \
    build
Agalin commented 2 years ago

Hi Thanks, will check it next week, can't do it right now.