SFML community forums
Help => General => Topic started by: Hydro on February 26, 2016, 07:53:14 pm
-
Hello!
I'm trying to generate the makefile for SFML 2.3.2 with CMake, but I got this error:
CMake Error at CMakeLists.txt:6 (set):
Syntax error in cmake code at
C:/Users/MyUser/Downloads/SFML-2.3.2-sources/SFML-2.3.2/CMakeLists.txt:6
when parsing string
C:\Tools\Android\AndroidNDK\android-ndk-r9c
Invalid escape sequence \T
Call Stack (most recent call first):
CMakeLists.txt:24 (sfml_set_option)
What is wrong? And how do I fix this?
Thank you.
-
What's your CMake version? What compiler are you trying to use?
-
CMake 3.4.3 and I use MinGW (I also have clang installed)
-
Did you enter C:\Tools\Android\AndroidNDK\android-ndk-r9c yourself?
CMake seems to fail parsing things, because of the backslashes which get interpreted as escape character or similar, i.e. don't use backslashes.
-
No, I didn't. It happens when I click in Generate.
-
CMake is pulling the NDK path from the environment settings which most likely has it set with backslashes and then CMake fails to parse them properly.
As a work around you might be able to set the ANDROID_NDK option yourself with forward slashes which in turn should get rid of the error.
-
CMake doesn't like backslashes in paths, even on Windows. Provide the path in "ANDROID_NDK" with forward slashes, simply edit the variable in the CMake GUI.
-
CMake doesn't like backslashes in paths, even on Windows. Provide the path in "ANDROID_NDK" with forward slashes, simply edit the variable in the CMake GUI.
Since CMake gets the path on its own, shouldn't we make sure the path will always be accepted, i.e. conver backslashes to slahed on our own?
-
It's done! I used the "ANDROID_NDK"and it worked. Thank you very much!