[CMake] Cygwin drive paths are killing me

J Decker d3ck0r at gmail.com
Wed Jun 11 09:40:58 EDT 2014


MinGW is a better platform to use with NDK (of which you sort of only need
make, the rest of the tools come from the android directory)
The problem is the tools you're using from the NDK are not cygwin based so
they are confused.... so really I wouldn't think cygwin would even be a
viable option; on the android NDK page
https://developer.android.com/tools/sdk/ndk/index.html  there's only a few
mentions of cygwin; and it's in the case of exceptions ... like on this use
this other script, and use 1.7 not 1.5...




On Wed, Jun 11, 2014 at 6:25 AM, Eric Wing <ewmailing at gmail.com> wrote:

> I am currently in this unholy trinity of needing to use Android on
> Windows through Cygwin.
> Basically, the Android NDK requires Cygwin if you want to run it on
> Windows. I'm using my fork of the Android-CMake toolchain originally
> from OpenCV and trying to generate "Unix Makefiles" with CMake. I
> provide a -C initial_cache list to try to pre-populate my dependency
> list since this is a cross-compile.
>
> This is really ugly stuff. I thought I was on the verge of finally
> getting it working, but I keep bouncing back and forth between file
> path problems:
>
> - Cygwin returns absolute paths like /cygdrive/c/Program Files (x86)
> - But CMake can't seem to resolve the /cygdrive/c part and when trying
> to access files in this form, it fails with 'file not found'
>
> If I change the representation to:
> C:\Program Files (x86), then a lot of CMake functions seem to get
> confused by the backslashes because they are escape sequences in
> strings.
>
> I figured out I can use forward slashes,
> C:/Program Files (x86)
> which helps the problem a little bit.
>
> But sometimes when I change strings to make CMake happy, then if it
> gets passed back to Cygwin to invoke some process, Cygwin dies.
>
> I've been slowly going case by case to use one or the other. I finally
> got my Makefiles generated. But now I gave the problem that the
> Makefiles contain the C:\ form to get past CMake's problems. But when
> I invoke make, Cygwin chokes with
> *** target pattern contains no `%'
> I think this is because of the colon characters in the make file from
> the drive letters.
>
>
> Also, I think there is a bug. CMake thinks strings like C:/Program
> Files (x86) are relative paths, not absolute. Calling file(string ...)
> keeps turning the path I pass into a relative path and prepends a full
> relative path which makes the string turn into complete nonsense (I
> get to drive letter markers in the string).
>
>
> Anyway, am I overlooking something? I know Cygwin is supposed to work.
> How am I supposed to deal with the /cygdrive/c vs C:\ and colon issue?
>
> Thanks,
> Eric
> --
> Beginning iPhone Games Development
> http://playcontrol.net/iphonegamebook/
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140611/f23cf6fc/attachment-0001.html>


More information about the CMake mailing list