Werner Smekal writes:
 > Hi Geoffrey,
 > 
 > On 5/12/10 10:30 PM, Geoffrey Furnish wrote:
 > > Alan W. Irwin writes:
 > >> On 2010-05-12 11:22-0500 Geoffrey Furnish wrote:
 > >>> BTW, taking a cue from the wiki, I added some options on the 
 > >>> cmake line like this:
 > >>> 
 > >>> % cmake -DCMAKE_INSTALL_PREFIX=$HOME/devel/8.4/prefix
 > >> -DCMAKE_INCLUDE_PATH=$HOME/devel/8.4/prefix/include 
 > >> -DCMAKE_LIBRARY_PATH=$HOME/devel/8.4/prefix/lib ..
 > >> 
 > >> That CMAKE_INCLUDE_PATH is incorrect; you should append /tcl8.4 to 
 > >> it.
 > > 
 > > Just to be clear, the named directory did hold the Tcl headers:
 > > 
 > > [furn...@ziffy]~% ls $HOME/devel/8.4/prefix/include tclDecls.h tcl.h 
 > > tclPlatDecls.h  tkDecls.h  tk.h  tkPlatDecls.h
 > > 
 > > So, I don't really agree this was wrong.  It is unarguable,
 > > however,> that it was insufficient, which I guess is the part that
 > > mystifies me.
 > > 
 > > In the end, what I stumbled my way into, which did "work", was this:>
 > > cmake -DCMAKE_INSTALL_PREFIX=$HOME/devel/8.4/prefix 
 > > -DCMAKE_INCLUDE_PATH=$HOME/devel/8.4/prefix/include 
 > > -DCMAKE_LIBRARY_PATH=$HOME/devel/8.4/prefix/lib 
 > > -DTCL_LIBRARY=$HOME/devel/8.4/prefix/lib/libtcl8.4.so 
 > > -DTK_LIBRARY=$HOME/devel/8.4/prefix/lib/libtk8.4.so -DBUILD_TEST=on 
 > > ..
 > 
 > I think there is a misunderstanding. CMAKE_INSTALL_PREFIX is the prefix
 > used to install the program you're configuring, this doesn't set the
 > path, where cmake looks for libraries:
 > 
 > pico:examples smekal$ cmake --help-variable CMAKE_INSTALL_PREFIX
 > cmake version 2.8.1
 >   CMAKE_INSTALL_PREFIX
 >        Install directory used by install.
 > 
 >        If "make install" is invoked or INSTALL is built, this directory is
 >        pre-pended onto all install directories.  This variable defaults to
 >        /usr/local on UNIX and c:/Program Files on Windows.
 > 
 > 
 > What you are looking for is CMAKE_PREFIX_PATH:
 > 
 > 
 > pico:examples smekal$ cmake --help-variable CMAKE_PREFIX_PATH
 > cmake version 2.8.1
 >   CMAKE_PREFIX_PATH
 >        Path used for searching by FIND_XXX(), with appropriate suffixes
 >        added.
 > 
 >        Specifies a path which will be used by the FIND_XXX() commands.  It
 >        contains the "base" directories, the FIND_XXX() commands append
 >        appropriate subdirectories to the base directories.  So
 > FIND_PROGRAM()
 >        adds /bin to each of the directories in the path, FIND_LIBRARY()
 >        appends /lib to each of the directories, and FIND_PATH() and
 >        FIND_FILE() append /include .  By default it is empty, it is intended
 >        to be set by the project.  See also CMAKE_SYSTEM_PREFIX_PATH,
 >        CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH.
 > 
 > 
 > This option is what you described below, what you would like cmake can
 > do. I can do that already. Please try it.

Okay, thanks.  I just tried this:

% cmake -DCMAKE_INSTALL_PREFIX=$HOME/devel/8.4/prefix 
-DCMAKE_PREFIX_PATH=$HOME/devel/8.4/prefix .. |& tee cmake.out
...
-- Looking for include paths and libraries for Tcl/Tk
-- Found Tclsh: /home/furnish/devel/8.4/prefix/bin/tclsh
-- Found TCL: /usr/lib64/libtcl.so
-- Found TCLTK: /usr/lib64/libtcl.so
-- Found TK: /usr/lib64/libtk.so
-- Looking for include paths and libraries for Tcl/Tk - found
-- Looking for tclsh
-- Looking for tclsh - found
-- TCL_TCLSH = /home/furnish/devel/8.4/prefix/bin/tclsh
-- TCL_INCLUDE_PATH = /home/furnish/devel/8.4/prefix/include
-- TCL_LIBRARY = /usr/lib64/libtcl.so
-- Itcl not available or not compatible with current Tcl shell
-- TK_INCLUDE_PATH = /home/furnish/devel/8.4/prefix/include;/usr/include
-- TK_LIBRARY = 
/usr/lib64/libtk.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so

I would say that did not work right.  Notice that it again is chosing the
libs in /usr/lib64, which are the system libs, not the ones in the custom
prefix.  Or, maybe I did the cmake invocation wrong (again, argh).

-Geoff

------------------------------------------------------------------------------

_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to