Skip to content

Commit

Permalink
(conan-io#8592) Fix libjpeg-turbo build for Android
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kdsx authored and miklelappo committed Feb 9, 2022
1 parent b70d8ec commit a7ae4ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions recipes/libjpeg-turbo/all/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion recipes/libjpeg-turbo/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7ae4ac

Please sign in to comment.