Skip to content

Comments

Fix Apple CMAKE_SYSTEM_PROCESSOR not set when crosscompiling#4503

Merged
zdenop merged 1 commit intotesseract-ocr:mainfrom
ppavacic:fix/apple-crosscompilation
Feb 8, 2026
Merged

Fix Apple CMAKE_SYSTEM_PROCESSOR not set when crosscompiling#4503
zdenop merged 1 commit intotesseract-ocr:mainfrom
ppavacic:fix/apple-crosscompilation

Conversation

@ppavacic
Copy link
Contributor

@ppavacic ppavacic commented Feb 5, 2026

When CMAKE_SYSTEM_PROCESSOR isn't set, crosscompilation for iOS fails because required .cpp files are not found.
CMAKE_SYSTEM_PROCESSOR isn't used by Apple as their toolchains use only CMAKE_OSX_ARCHITECTURES which is a list of architectures.

It doesn't look like this CMake supports Apple's universal builds, so I've made logic that if we are building only for one architecture we set CMAKE_SYSTEM_PROCESSOR to CMAKE_OSX_ARCHITECTURES, and if its trying to build universal build we fail with a message.

@ppavacic ppavacic marked this pull request as ready for review February 6, 2026 00:53
@zdenop zdenop merged commit 95cd730 into tesseract-ocr:main Feb 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants