feat: iOS configuration build

This commit is contained in:
vsaint1 2026-05-23 04:36:50 -03:00
parent 025b86b226
commit c80e0c4733
2 changed files with 22 additions and 0 deletions

View File

@ -29,6 +29,10 @@ include(CompilerFlags)
# Registers build options that are exposed to cmake
include(CMakeOptions.txt)
if ("${PLATFORM}" STREQUAL "iOS")
enable_language(OBJC)
endif()
if (UNIX AND NOT APPLE AND NOT "${PLATFORM}" MATCHES "DRM" AND NOT "${PLATFORM}" MATCHES "Web" AND NOT "${PLATFORM}" MATCHES "SDL")
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
message(FATAL_ERROR "Cannot disable both Wayland and X11")

View File

@ -133,6 +133,24 @@ elseif (${PLATFORM} STREQUAL "Android")
set(LIBS_PRIVATE log android EGL GLESv2 OpenSLES atomic c)
set(LIBS_PUBLIC m)
elseif (${PLATFORM} STREQUAL "iOS")
set(PLATFORM_CPP "PLATFORM_IOS")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES3")
find_library(UIKIT_LIBRARY UIKit)
find_library(QUARTZCORE_LIBRARY QuartzCore)
find_library(OPENGL_ES_LIBRARY OpenGLES)
find_library(COREMOTION_LIBRARY CoreMotion)
find_library(FOUNDATION_LIBRARY Foundation)
set(LIBS_PRIVATE
${UIKIT_LIBRARY}
${QUARTZCORE_LIBRARY}
${OPENGL_ES_LIBRARY}
${COREMOTION_LIBRARY}
${FOUNDATION_LIBRARY}
)
elseif ("${PLATFORM}" STREQUAL "DRM")
set(PLATFORM_CPP "PLATFORM_DRM")