feat(ios): consistent iOS detection in cmake

Signed-off-by: rooot <hey@rooot.gay>
This commit is contained in:
rooot 2025-03-31 19:47:41 +02:00
parent fbc3bae790
commit f74d3d5b53
No known key found for this signature in database
GPG key ID: 3582D7B034FF964F
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
if (NOT DEFINED GEODE_TARGET_PLATFORM)
if(APPLE)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
set(GEODE_TARGET_PLATFORM "iOS")
else()
set(GEODE_TARGET_PLATFORM "MacOS")

View file

@ -88,7 +88,7 @@ file(GLOB SOURCES CONFIGURE_DEPENDS
)
# Obj-c sources
if (${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
file(GLOB OBJC_SOURCES CONFIGURE_DEPENDS
src/platform/ios/*.mm
src/load.mm
@ -118,7 +118,7 @@ if (WIN32)
)
list(APPEND SOURCES ${WIN_SOURCES})
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
file(GLOB IOS_SOURCES CONFIGURE_DEPENDS
src/platform/ios/*.cpp
src/platform/mac/Cocos2d.cpp # identical on ios, so we just use the mac one
@ -326,7 +326,7 @@ endif()
# Create launcher
if (APPLE)
if(GEODE_TARGET_PLATFORM STREQUAL "iOS")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
# Used for File Picker API
find_library(UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK UniformTypeIdentifiers)
target_link_libraries(${PROJECT_NAME} ${UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK})