Browse Source

Enable link stage response files on Windows when building for Android. Otherwise building a shared Urho3D library could fail.

Lasse Öörni 11 years ago
parent
commit
e4fab0f5ab
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Source/CMake/Toolchains/android.toolchain.cmake

+ 6 - 0
Source/CMake/Toolchains/android.toolchain.cmake

@@ -309,6 +309,12 @@
 
 cmake_minimum_required( VERSION 2.6.3 )
 
+# Urho3D: on Windows Cygwin-based NDK tools may fail in the linking phase with too long command line. Turn on response files to avoid this
+if( CMAKE_HOST_WIN32 )
+ set( CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
+ set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
+endif()
+
 if( DEFINED CMAKE_CROSSCOMPILING )
  # subsequent toolchain loading is not really needed
  return()