Re: Incorporating cmake dir into configure.ac, but it depends on a autconf-managed in-tree library
On Thursday, February 11, 2016 13:11:29 Ron wrote:
> I am working on a project that requires libevent and libevhtp.
> The latter is cmake managed, my project and libevent are autoconf managed.
> (Note that libevhtp depends on libevent, both depend on openssl, which I
> on the system to provide.)
> The problem is that I run cmake during the configure step, but during that
> time libevent has not been built yet, so libevhtp complains about not
> the libevent library.
> I have to use in-tree libevent and libevhtp due to features I need, and
> not being distributed by the linux distro I use.
> What is the best way to approach this?
you should have a look how libevhtp searches for libevent.
If it does a bunch of find_library()/find_path() calls, those set cmake cacge
variables, but only if they are not set yet.
So if you know where libevent will put its stuff, you can preset those cmake
cache variables (e.g. using cmake -D ...)