From 94f37767749a602d3471e7a1ee2772357a444385 Mon Sep 17 00:00:00 2001 From: hhb Date: Thu, 16 Sep 2021 04:11:48 -0400 Subject: Android: Restore searching PATH for executables Since commit a7f41a7ee4 (Android: Fix find_* search order within NDK for unified toolchains, 2020-10-13, v3.20.0-rc1~610^2), we turn off `CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`. This breaks `find_program` searching `PATH` for host executables. Fortunately, the setting turns out not to be necessary, perhaps since commit cbc51a8be3 (Android: restructure android search paths, 2020-11-06, v3.20.0-rc1~509^2). Without it, none of NDK tests fail, so remove it to restore pre-3.20 behavior. Fixes: #22634 --- Modules/Platform/Android-Initialize.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Modules/Platform/Android-Initialize.cmake b/Modules/Platform/Android-Initialize.cmake index 50f0620..63bc949 100644 --- a/Modules/Platform/Android-Initialize.cmake +++ b/Modules/Platform/Android-Initialize.cmake @@ -56,11 +56,6 @@ if(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) endif() - # Don't search paths in PATH environment variable. - if(NOT DEFINED CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH) - set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF) - endif() - # Allows CMake to find headers in the architecture-specific include directories. set(CMAKE_LIBRARY_ARCHITECTURE "${CMAKE_ANDROID_ARCH_TRIPLE}") -- cgit v0.12