[CMake] Include path Tcl under Cygwin

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jul 4 01:50:52 EDT 2013


On 2013-06-26 14:23+0200 Arjen Markus wrote:

> Hello,
>
> for the PLplot project I am looking for the solution of a
> problem that occurs under Cygwin:
> The FindTcl module returns the path for the include files
> as "c:/tcl/include".
>
> This is fine under Windows and MinGW/MSYS, but it causes a
> problem under Cygwin: the colon interfers with the syntax
> of a Makefile. My guess is that this problem will occur
> with other packages too.
>
> So I am looking for a way to turn the path "c:/xxx" to
> "/cygdrive/c/xxx", but since the prefix "/cygdrive/" may be
> installation dependent, a mere replacement seems risky.
>
> Any suggestions?

Hi Arjen:

Sorry I didn't respond sooner.  Somehow this got lost in my e-mail INBOX
until now.

I solve almost exactly this problem with a CMake function called
determine_msys_path.  Look for the definition of that function in
cmake/build_projects/CMakeList.txt. There, I basically do all the
normal changes you would expect, and for the drive I just do a
straight translation to replace "whatever:" by "/whatever/". So it
would transform c:/xxx (or c:\xxx) into /c/xxx.

Until your post I thought that determine_msys_path was perfect.  Why do
you want to transform c: to /cygdrive/ for the case of interest to
you? For that case since the FindTcl module returns the form
c:/tcl/include isn't /c/tcl/include exactly what the subsequent logic
should be using?

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________


More information about the CMake mailing list