Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Require CMake 3.16+, Fix for recent iOS SDK #4274

Closed
wants to merge 1 commit into from

Conversation

okuoku
Copy link
Contributor

@okuoku okuoku commented Apr 3, 2021

Build SDL library for iOS and its friends with stock CMake, without external toolchain file (ie. ios-cmake)

Description

  • Require CMake 3.16+ on APPLE to use OBJC language
  • enable_language(OBJC) and don't override them to C
  • Don't use find_library for frameworks as official cmake-toolchains(7) sugguests
  • Add CoreHaptics framework along with GameController because SDL_mfijoystick.m now require it
  • Include CheckOBJCSourceCompiles for Apple platforms
  • Add a semicolon to feed correct source to check_objc_source_compiles
  • Add include path to khronos headers to ObjC sources

As adding CoreHaptics to build dependency, now stock CMakeLists.txt require iOS 13+ and tvOS 14+ SDKs.

@okuoku
Copy link
Contributor Author

okuoku commented Apr 4, 2021

It seems VIDEO_OPENGLES detection needs to be fixed non-Xcode generators...

Support CMake build with Xcode generator with:

- Require CMake 3.16+ on APPLE to use OBJC language
- enable_language(OBJC) and don't override them to C
- Don't use find_library for frameworks as official
  cmake-toolchains(7) sugguests
- Include `CheckOBJCSourceCompiles` for Apple platforms
- Add a semicolon to feed correct source to `check_objc_source_compiles`
- Add include path to khronos headers to ObjC sources
@okuoku
Copy link
Contributor Author

okuoku commented Apr 6, 2021

Hmm, consulting CMake source,

Add a semicolon to feed correct source to check_objc_source_compiles

should not be needed and perhaps something wrong on my end.. Sorry for the noise and pull this for now.

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