On 2010-05-12 23:20+0200 Werner Smekal wrote: > FIND_LIBRARY(TCL_LIBRARY > NAMES > tcl > tcl${TK_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION} > tcl86 tcl8.6 > tcl85 tcl8.5 > tcl84 tcl8.4 > tcl83 tcl8.3 > tcl82 tcl8.2 > tcl80 tcl8.0 > PATHS ${TCLTK_POSSIBLE_LIB_PATHS} > ) > > It tries to find libraries with that names in that order, where > TCLTK_POSSIBLE_LIB_PATHS are paths found with the help of tclsh and > system paths are always there. From a former email it seems, that you > don't have libtcl.so in your devel path, only libtcl8.4.so. But cmake > finds libtcl.so in a system path, this may be the reason for the mixup. > Could you try to add a symlink to libtcl8.4.so (same with tk)? Does this > work?
But if you look in the documentation of find_library, PATHS is about the last thing looked at (#6 as opposed to #1 CMAKE_LIBRARY_PATH set with cmake option and #2 CMAKE_LIBRARY_PATH set with environment variable). So I believe the net result should be it looks for each of the names in turn, e.g., libtcl.so, ..., libtcl8.4.so,... etc., in Geoffrey's CMAKE_LIBRARY_PATH that he specified on the command line, and only if that fails, would the other alternative search areas (including PATHS as #6) be searched for. Just from an efficiency perspective, makes sense to go through the complete list of names for each search location rather than searching in a lot of different locations for each name. But in any case, I assume the names are traversed for each search location in turn since CMAKE_LIBRARY_PATH is supposed to be all about giving user's control of the search. If instead, the list of possible locations were searched for each name, than a configuration like above would not allow users to control what is found in some cases, and I think there would be huge complaints on the CMake list about that if it were possible. Once Geoffrey responds to my further suggestions about expanding $HOME and/or using the environment variable approach, we will likely know for sure whether my above assumption is correct. 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 libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel