[CMake] Searching once

Al Niessner Albert.F.Niessner at jpl.nasa.gov
Tue Jan 14 18:47:14 EST 2014


I am fairly new to cmake but have been through the documentation a dozen
or more times and found answers to all of my previous questions. I have
googled for another small batch of questions. Now I am stuck, mostly
because I am not sure what keywords to use in my search, and would like
a little help.

Is it possible to have a dependent project use configuration information
from a previously installed project?

I have the parent project A that searches my compute node and finds all
kinds of fun packages like HDF, boost, xerces, etc. It then compiles
into a shared library and deployed to /my/product/{lib,doc,include,...}.

Now, I have project B that depends on what was generated in project A.
So, it now searches my compute node and finds an older version of HDF,
boost, and/or xerces. Old enough that there is an API change. Well, that
does not work so well and can even be pathological enough to go
unnoticed for a long time.

So, what I want is project B to look into /my/product/cmake and get all
of the search paths from there instead of project B searching my compute
node like project A did.

In other words, when I do a 'make install' for project A, I want a
subdirectory or file that has information in it that CMake can
automatically ingest rather than search using Find*.cmake. Thus, my
dependencies remain consistent.

Is it possible to have a dependent project use configuration from a
previously installed project?

-- 
Al Niessner
818.354.0859

--------
|  dS  | >= 0
--------



More information about the CMake mailing list