Browse Source

cmake: remove unneeded Android patches and disable GHS generator

master
Butta 5 years ago
committed by Leonid Plyushch
parent
commit
61e2f15fb5
  1. 17
      packages/cmake/Modules-Platform-Android-Clang.cmake.patch
  2. 15
      packages/cmake/Modules-Platform-Android-Determine.cmake.patch
  3. 15
      packages/cmake/Modules-Platform-Android-Initialize.cmake.patch
  4. 15
      packages/cmake/Modules-Platform-Android.cmake.patch
  5. 12
      packages/cmake/Source-CMakeLists.txt.patch
  6. 22
      packages/cmake/Source-cmake.cxx.patch

17
packages/cmake/Modules-Platform-Android-Clang.cmake.patch

@ -1,17 +0,0 @@
diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake
index 9ed1e01f9..6443512ee 100644
--- a/Modules/Platform/Android-Clang.cmake
+++ b/Modules/Platform/Android-Clang.cmake
@@ -24,6 +24,12 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
return()
endif()
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
+ macro(__android_compiler_clang lang)
+ endmacro()
+ return()
+endif()
+
include(Platform/Android-Common)
# The NDK toolchain configuration files at:

15
packages/cmake/Modules-Platform-Android-Determine.cmake.patch

@ -1,15 +0,0 @@
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index bb42eedde..0e8229d5e 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -18,6 +18,10 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
return()
endif()
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
+ return()
+endif()
+
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST

15
packages/cmake/Modules-Platform-Android-Initialize.cmake.patch

@ -1,15 +0,0 @@
diff --git a/Modules/Platform/Android-Initialize.cmake b/Modules/Platform/Android-Initialize.cmake
index a434f90ea..407ed3358 100644
--- a/Modules/Platform/Android-Initialize.cmake
+++ b/Modules/Platform/Android-Initialize.cmake
@@ -17,6 +17,10 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
return()
endif()
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
+ return()
+endif()
+
if(NOT CMAKE_SYSROOT)
if(CMAKE_ANDROID_NDK)
set(CMAKE_SYSROOT "${CMAKE_ANDROID_NDK}/platforms/android-${CMAKE_SYSTEM_VERSION}/arch-${CMAKE_ANDROID_ARCH}")

15
packages/cmake/Modules-Platform-Android.cmake.patch

@ -1,15 +0,0 @@
diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake
index f08f84176..9e719df39 100644
--- a/Modules/Platform/Android.cmake
+++ b/Modules/Platform/Android.cmake
@@ -2,6 +2,10 @@ include(Platform/Linux)
set(ANDROID 1)
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
+ return()
+endif()
+
# Conventionally Android does not use versioned soname
# But in modern versions it is acceptable
if(NOT DEFINED CMAKE_PLATFORM_NO_VERSIONED_SONAME)

12
packages/cmake/Source-CMakeLists.txt.patch

@ -1,12 +0,0 @@
diff -u -r ../cmake-3.15.2/Source/CMakeLists.txt ./Source/CMakeLists.txt
--- ../cmake-3.15.2/Source/CMakeLists.txt 2019-08-07 16:58:29.000000000 +0000
+++ ./Source/CMakeLists.txt 2019-08-21 10:42:07.237355685 +0000
@@ -759,7 +759,7 @@
# GHS support
# Works only for windows and linux
-if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
+if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
set(SRCS ${SRCS}
cmGlobalGhsMultiGenerator.cxx
cmGlobalGhsMultiGenerator.h

22
packages/cmake/Source-cmake.cxx.patch

@ -0,0 +1,22 @@
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a99d9a633..55ae9d254 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -109,7 +109,7 @@
# include "cmExtraEclipseCDT4Generator.h"
#endif
-#if defined(__linux__) || defined(_WIN32)
+#if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32)
# include "cmGlobalGhsMultiGenerator.h"
#endif
@@ -1982,7 +1982,7 @@ void cmake::AddDefaultGenerators()
#endif
this->Generators.push_back(cmGlobalUnixMakefileGenerator3::NewFactory());
#if !defined(CMAKE_BOOTSTRAP)
-# if defined(__linux__) || defined(_WIN32)
+# if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32)
this->Generators.push_back(cmGlobalGhsMultiGenerator::NewFactory());
# endif
this->Generators.push_back(cmGlobalNinjaGenerator::NewFactory());
Loading…
Cancel
Save