Skip to content

How would people feel about overhauling the iOS support to remove polly magic? #625

@hjmallon

Description

@hjmallon

Building with Hunter for iOS involves a bit of Polly magic variable mangling.

IOS_SDK_VERSION -> set to the current SDK version used with Xcode
IOS_DEPLOYMENT_SDK_VERSION -> set to the deployment target for iOS
IPHONEOS_ARCHS -> requested architectures for the iOS device part of the output
IPHONESIMULATOR_ARCHS -> requested architectures for the iOS simulator part of the output
IPHONEOS_ROOT / IPHONEOS_SDK_ROOT / IPHONESIMULATOR_SDK_ROOT
There are probably others

Also various parts of Hunter use the variable IOS to determine things.

  • A lot of this infrastructure was built before CMake had decent iOS support, and some of that has been linked back in
  • Pretty much all of it can be persuaded to work for iOS, but will need changes for tvOS or watchOS (where IOS is not defined by default etc).
  • A lot of it assumes things like arm64 -> device, which are not true any more.

I'm looking at all this stuff and it seems like it might need overhauling, but to do so without breaking existing workflows might be quite difficult, and probably requires more time than I have to devote to it. The only way I can think of to do it bit by bit would be to add slimmed down, modernised, toolchains to polly for the following (which do not set any of the hunter/polly specific magic variables), then gradually fix all the schemes to work correctly (using as much cmake as we can, and increasing the minimum cmake version where required).

  • iOS device, arm64, CMAKE_OSX_DEPLOYMENT_TARGET set
  • iOS simulator, arm64 + x86_64, CMAKE_OSX_DEPLOYMENT_TARGET set
  • iOS combined, arm64 device + x86_64 simulator, CMAKE_OSX_DEPLOYMENT_TARGET set
  • tvOS device, tvOS simulator as above
  • watchOS device, watchOS simulator (we may need to alter the architectures for this as I think there are more device archs)

Does anyone have any better ideas for how to address this stuff?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions