From 0b57d904db700fd0bd35550ab2e8f545b54db334 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Thu, 14 Jul 2011 07:44:33 +0000 Subject: [PATCH] Fixed Android compilation on Windows --- android/android.toolchain.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/android.toolchain.cmake b/android/android.toolchain.cmake index 480c8c7b9e..4539216435 100644 --- a/android/android.toolchain.cmake +++ b/android/android.toolchain.cmake @@ -320,8 +320,8 @@ endif() if( BUILD_WITH_ANDROID_NDK ) set( CMAKE_CXX_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_CXX_FLAGS}" ) set( CMAKE_C_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_C_FLAGS}" ) - if (ANDROID_NDK_SYSROOT MATCHES "[ ]") - # workaround for ugly cmake bug - compiler identification replaces all spaces in compiler flags with ; symbol + if (WIN32 OR ANDROID_NDK_SYSROOT MATCHES "[ ]") + # workaround for ugly cmake bug - compiler identification replaces all spaces (and somethimes " !!!) in compiler flags with ; symbol # as result identification fails if ANDROID_NDK_SYSROOT contain spaces include(CMakeForceCompiler) CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)