Skip to content

Add iOS platform detection in CMake#11

Merged
danielraffel merged 1 commit intomainfrom
ios/1-cmake-platform-detection
Mar 3, 2026
Merged

Add iOS platform detection in CMake#11
danielraffel merged 1 commit intomainfrom
ios/1-cmake-platform-detection

Conversation

@danielraffel
Copy link
Owner

Series overview

This is the first in a series of 7 small, incremental PRs that add iOS
support to Visage, including multi-touch. Each builds on the previous one:

  1. CMake iOS platform detection (this PR) — 2 lines
  2. Shared Apple code guards — ~18 lines
  3. iOS CMake source routing — ~10 lines
  4. iOS windowing implementation + tests — ~570 lines (all new files + Catch2 tests)
  5. pointer_id API — ~126 lines (adds int pointer_id = 0 to MouseEvent/Window)
  6. Multi-pointer dispatch — ~300 lines (per-pointer tracking in WindowEventHandler)
  7. iOS multi-touch wiring + tests — ~385 lines (connect touch IDs to pointer_id + 6 Catch2 test cases)

All changes are backward compatible — desktop platforms are completely
unaffected. These PRs are on my fork for now; happy to adjust the structure
or ordering before submitting upstream.

Summary

Add VISAGE_IOS compile definition when building for iOS, detected before the
existing APPLE check so iOS is distinguished from macOS.

  • Adds VISAGE_IOS=1 when CMAKE_SYSTEM_NAME is iOS
  • Foundation for subsequent iOS support PRs

Test plan

  • Build for macOS: VISAGE_IOS not defined, VISAGE_MAC still set
  • Build for iOS: VISAGE_IOS=1 defined, VISAGE_MAC not set
  • All existing platforms unaffected

Add VISAGE_IOS=1 compile definition when building for iOS, detected
before the existing APPLE check so iOS is distinguished from macOS.
@danielraffel danielraffel merged commit 6b16460 into main Mar 3, 2026
5 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.

1 participant