I have a third-party cmake project that depends on the gnu readline library. So I installed readline on brew install readline . The problem is that readline is keg-only , and cmake tries to link it to libedit , which shadows libreadline , but it lacks some functions.
My question is, how can I make cmake prefer the brew version of this library through the system library?
In addition, since this will be a problem only for osx, it would be great if the solution could be applied via the command line (instead of changing CMakeList.txt).
c ++ homebrew readline cmake
Pouya
source share