Skip to content

tvOS CMake erroneously links to IOKit  #82

Description

@Ravbug

When compiling SDL3 for tvOS using CMake, the configure script links to IOKit, causing this link error because IOKit is not present on tvOS:

ld: framework 'IOKit' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)

IOKit is not available when building for tvOS.

I made this quick-and-dirty patch in my own copy:

set(OTHER_LDFLAGS ${OTHER_LDFLAGS} "-framework IOKit -framework Foundation")

if(APPLE)
    if (NOT (CMAKE_SYSTEM_NAME MATCHES "tvOS"))
        set(iokit_lib "-framework IOKit")
    endif()
    set(OTHER_LDFLAGS ${OTHER_LDFLAGS} ${iokit_lib} "-framework Foundation")
    list(APPEND PHYSFS_M_SRCS src/physfs_platform_apple.m)
endif()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions