[CMake] Include path Tcl under Cygwin

marco atzeri marco.atzeri at gmail.com
Thu Jul 4 02:43:29 EDT 2013


Il 7/4/2013 7:50 AM, Alan W. Irwin ha scritto:
> 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?

using cygwin tcl, he should not need at all the change
as "C:" will not appear.
The header is "/usr/include/tcl.h"

Mixing cygwin and not cygwin library should be avoided.


>
> Alan
>
Marco




More information about the CMake mailing list