From a7ae4ac1bd2a5a9aca91df8a0b38ca8be99339f6 Mon Sep 17 00:00:00 2001 From: Denis Klychkov Date: Wed, 5 Jan 2022 05:05:11 -0800 Subject: [PATCH] (#8592) Fix libjpeg-turbo build for Android It didn't work for Android/armv7 because the recipe specifies CMAKE_SYSTEM_PROCESSOR=armv7 which is not known to Android NDK CMake scripts. However the NDK toolchain does not require this variable (it sets the variable itself), so it does not need to be specified at all. --- recipes/libjpeg-turbo/all/CMakeLists.txt | 5 +++++ recipes/libjpeg-turbo/all/conanfile.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/libjpeg-turbo/all/CMakeLists.txt b/recipes/libjpeg-turbo/all/CMakeLists.txt index 761fb2a328ab12..09495a3ab6e928 100644 --- a/recipes/libjpeg-turbo/all/CMakeLists.txt +++ b/recipes/libjpeg-turbo/all/CMakeLists.txt @@ -5,4 +5,9 @@ project(cmake_wrapper) include(conanbuildinfo.cmake) conan_basic_setup(NO_OUTPUT_DIRS) +if(NOT CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR ${CONAN_LIBJPEG_SYSTEM_PROCESSOR}) +endif() + + add_subdirectory("source_subfolder") diff --git a/recipes/libjpeg-turbo/all/conanfile.py b/recipes/libjpeg-turbo/all/conanfile.py index d04fd808b14089..f535241d3f7f8d 100644 --- a/recipes/libjpeg-turbo/all/conanfile.py +++ b/recipes/libjpeg-turbo/all/conanfile.py @@ -123,7 +123,7 @@ def _configure_cmake(self): "armv8": "aarch64", "armv8.3": "aarch64", }.get(str(self.settings.arch), str(self.settings.arch)) - self._cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = cmake_system_processor + self._cmake.definitions["CONAN_LIBJPEG_SYSTEM_PROCESSOR"] = cmake_system_processor self._cmake.configure() return self._cmake