-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

Regards,
Werner




> 
> When I forcibly set the Tcl/Tk libraries in this way, I got what I 
> needed to debug the problem.
> 
> I really don't want to sound tooooo curmudgeonly here.  I know the 
> CBS has done us a lot of good by incorporating so many platforms
> into one system, which were not previously served by a single build 
> system.  And I know people have put a huge amount of work into
> making it what it is today.
> 
> But I do wish it behaved more, well, I suppose any adjective here 
> would sound inflamatory.  Maybe best to just say, ... more ... 
> according to my own expectations.
> 
> And what would that mean?  Well, as I showed at the start of this 
> post, all I wanted to do was build PLplot against a different Tcl/Tk 
> than what was installed on my system.  So what did I do?  I compiled 
> Tcl and Tk and installed them to a custom, non-default prefix.  Then 
> I ran PLplot's cmake configuration, and told it the prefix I wanted 
> it to install to.  I *expect* it to undesrstand that the named prefix
> is the one it's supposed to play with.  But what it did, was ignored
> (mostly) my prefix, and continued to use system components. I find
> this behavior to be many things, including at least, surprising, 
> perplexing, annoying and exasperating.  It is also different than
> how PLplot's old configuration system used to work.
> 
> Over the last three years, my experience with the CBS has been that 
> it is so hard to configure, that I normally record my configurations 
> in shell scripts, and then run those scripts whenever I want to 
> compile up a new PLplot.  My personal opinion is that the CBS is 
> almost unusable in a manual mode.  Okay, I used it manually today, 
> with numerous errors and missteps along the way. For debugging, I 
> guess it's good enough.  But the point is, look at how long the 
> command line had to become, before it finally did the simple thing I
>  wanted, of using the components found in a named prefix
> construction zone.
> 
> I will keep writing my multi-line cmake invocation scripts, and I'm 
> sure I can get by that way.  But I do think PLplot would be more 
> accessible to more people, if a shorter/simpler command line would 
> get it to do the simple things that developers want.
> 
> In my opinion, anything found in the installation prefix, should be 
> the default.  Package specific overides are okay, but shouldn't be 
> required to find things in the installation prefix.  And having it 
> use the system installed packages for things it doesn't find in the 
> installation prefix zone is okay, but it should be possible to turn 
> that off.  So, to me, a cmake invocation line should look like:
> 
> % cmake --prefix=/where/I/put/my/stuff
> 
> or maybe
> 
> % cmake --prefix=/where/I/put/my/stuff --prefix-only
> 
> to say that I don't want it to use anything not found in my prefix.
> 
> Then, developers could get *exactly* what they want, for any given 
> application, by simply constructing their prefix (of which most 
> things going in there will be autoconf based, and use "configure 
> --prefix=/some/where"), and then configuring PLplot against that. 
> This proposed --prefix-only flag would control whether it would add 
> in capabilities found from elsewhere on the system, or not.  Mostly
> I would want not, but I could see that maybe more people would want
> so than not, so that not should not be the default for that switch.
> 
> If cmake can't be made to use autoconf-like command line switches 
> like "--prefix=", well, okay, but it still shouldn't take more than 
> one token to tell PLplot's cmake where you want it to find stuff
> that is all located in the same prefix into which PLplot is being
> told to install itself.
> 
> -Geoff
> 
> ------------------------------------------------------------------------------
>
>
>
>
> 
_______________________________________________ Plplot-devel mailing
> list Plplot-devel@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/plplot-devel


- -- 
Dr. Werner Smekal
Institut fuer Angewandte Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10/134
A-1040 Wien
Austria
DVR-Nr: 0005886

email: sme...@iap.tuwien.ac.at  (GPG: EDCAF4A79)
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
       +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJL6xOzAAoJEG1QQcXtyvSnNk0H/jcO9V+Pc2cOmhX9DAsitTgR
Sab5fSTouUrOhhNXjgz+LNH4+RI3xFMjJV0ByGv/6ttGcdiQKfrs8k0eGWqLeaZS
th4O4qj7Ig6TZ0PabQqYrnDVTTU/dgVAom6pB5mTj+VmFFF/cpdbb5HqPF4OPHyT
IgaOO23EUEF2m94aBwfMzZo67EwKA3n3dwlflOXXIhFg2bbENf+aNqaoRHGS7cR4
RgRJYvaRXS4nfF67iV/z/vQmxmsn09SO7Vht2F60oVYTTZX9hzmBBYzKkui0KiqF
H9y5+M11ZCf1iPCvcdwdox94inrMo7d/4G4GqunN1Ae0fmCtfVsbsG+/AhzEM6g=
=Zl7k
-----END PGP SIGNATURE-----

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

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

Reply via email to