# Support forced link in homebrew addon

**URL:** <https://travis-ci.community/t/support-forced-link-in-homebrew-addon/1722>\
**Category:** macOS\
**Created:** [January 8, 2019, 9:02am UTC](https://travis-ci.community/t/support-forced-link-in-homebrew-addon/1722 "2019-01-08T09:02:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [July 19, 2019, 8:23am UTC](https://travis-ci.community/t/support-forced-link-in-homebrew-addon/1722/2 "2019-07-19T08:23:04Z")

</div>

This is not the way you do it.

Homebrew’s `gettext` formula [is intentionally keg-only because it would otherwise conflict with stock MacOS software](https://github.com/Homebrew/homebrew-core/blob/master/Formula/gettext.rb#L14-L15):

> ```
> $ brew info gettext
> <...>
> ==> Caveats
> gettext is keg-only, which means it was not symlinked into /usr/local,
> because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
> 
> If you need to have gettext first in your PATH run:
> echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
> 
> For compilers to find gettext you may need to set:
> export LDFLAGS="-L/usr/local/opt/gettext/lib"
> export CPPFLAGS="-I/usr/local/opt/gettext/include"
> 
> ```

CMake honors these envvars when configuring the compiler.

---

_[View the full topic](https://travis-ci.community/t/support-forced-link-in-homebrew-addon/1722)._
