[CMake] Module FindTCL behaves differently on Linux and Mac OS X

Clark J. Wang dearvoid at gmail.com
Thu May 17 23:27:31 EDT 2007


On 5/18/07, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
>
> On 2007-05-18 11:00+0800 Clark J. Wang wrote:
>
> > In my Ubuntu Linux box, after INCLUDE(FindTCL) I get the following
> result:
> >
> > TCL_INCLUDE_PATH = /usr/include/tcl8.4
> > TCL_LIBRARY      = /usr/lib/libtcl8.4.so
> >
> >
> > But in my Mac OS X 10.4 the result is:
> >
> > TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
> > TCL_LIBRARY      = /System/Library/Frameworks/tcl.framework
> >
> > Actaully I want to use `/usr/include/tcl.h' and `/usr/lib/libtcl.dylib'
> in
> > my makefile. So how can I ask FindTCL to do that?
>
> Set the environment variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH
> appropriately (see http://www.cmake.org/Wiki/CMake_Useful_Variables).


Seems like the ENV vars does not work:

$ cat CMakeLists.txt
INCLUDE(FindTCL)
MESSAGE("TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}")
MESSAGE("TCL_LIBRARY      = ${TCL_LIBRARY}")
$ cmake .
TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY      = /System/Library/Frameworks/tcl.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clark/tmp
$ CMAKE_LIBRARY_PATH=/usr/lib CMAKE_INCLUDE_PATH=/usr/include cmake .
TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY      = /System/Library/Frameworks/tcl.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clark/tmp
$

And I tried SET(CMAKE_FIND_FRAMEWORK "NEVER") and SET(CMAKE_FIND_APPBUNDLE
"NEVER") before INCLUDE(FindTCL) but it did not work either.

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
> __________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070518/7a703309/attachment.html


More information about the CMake mailing list