On 2007-01-11 03:10-0600 Maurice LeBrun wrote:

> Alan W. Irwin writes:
> > On 2007-01-09 06:27-0600 Maurice LeBrun wrote:
> > > I'm trying my
> > > first cmake build (ok feel free to rag on me for being such a laggard :), 
> > > and
> > > those two were inexplicably not detected in my "usual" prefix area that
> > > contains all my tcl/tk/itcl/itk builds.
> >
> > Try setting CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH appropriately.
>
> That worked, thanks.  But I'm surprised that:
>
> $(CMAKE_INSTALL_PREFIX)/include
>   and
> $(CMAKE_INSTALL_PREFIX)/lib
>
> are not automatically at the front of CMAKE_INCLUDE_PATH & CMAKE_LIBRARY_PATH
> by default.  Our build systems have had that property for an eternity.  Would
> it be hard to add?

I was unaware that our previous build system had that capability. I
certainly have no objection to adding that capability to our cmake build
system, but it will take some experiments to see whether it is possible to
do that from inside a cmake environment.

According to the documentation you can get with the "cmake --help-full"
command there is a -D option equivalent of CMAKE_INCLUDE_PATH and 
CMAKE_LIBRARY_PATH that is used as a second choice if the environment
variable form is not set.  The -D option form implies that 
CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH are variables that can be re-set
from within cmake.  But you should check that.

The way you do that is inside cmake/modules/plplot.cmake try

message("original CMAKE_INCLUDE_PATH = ${CMAKE_INCLUDE_PATH}")
if(CMAKE_INCLUDE_PATH)
   set(CMAKE_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}:${CMAKE_INCLUDE_PATH}")
else(CMAKE_INCLUDE_PATH)
   set(CMAKE_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}")
endif(CMAKE_INCLUDE_PATH)
message("revised CMAKE_INCLUDE_PATH = ${CMAKE_INCLUDE_PATH}")

and similarly for CMAKE_LIBRARY_PATH

Even if the revised CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH output by the
second message command are what you want, you should also check whether
resetting them this way has the desired effect on the various find commands.

If your experiments with the variable forms work out, then you should add
additional stanzas to do the equivalent for the environment variable forms.
For example, I notice in the documentation you can set environment variables
from within cmake using

SET(ENV{CMAKE_INCLUDE_PATH} ....

and you can read environment variables using, e.g., ENV CMAKE_INCLUDE_PATH.

If your experiments don't work, then we won't be able to supply this feature
in general, but the individual can always use a shell script to set
CMAKE_INSTALL_PREFIX, CMAKE_INCLUDE_PATH, and CMAKE_LIBRARY_PATH in the way
that they like.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to