@@ -34,7 +34,7 @@ CMAKE_DEPENDENT_OPTION(USE_SYSTEM_SQUISH "Use system Squish library instead of t
3434CMAKE_DEPENDENT_OPTION(USE_WIIUSE "Support for wiimote input devices" ON
3535 "NOT SERVER_ONLY;NOT MINGW;NOT CYGWIN" OFF )
3636
37- if (APPLE )
37+ if (APPLE AND NOT IOS )
3838 list (APPEND CMAKE_PREFIX_PATH /usr/local/opt)
3939 include_directories (/usr/local/opt/fribidi/include /)
4040 include_directories (/usr/local/opt/openssl@1.1/include /)
@@ -43,6 +43,12 @@ if(APPLE)
4343 include_directories (/usr/local/opt/harfbuzz/include /harfbuzz/)
4444endif ()
4545
46+ if (IOS)
47+ ADD_DEFINITIONS (-DMOBILE_STK)
48+ ADD_DEFINITIONS (-DIOS_STK)
49+ option (USE_GLES2 "Use OpenGL ES2 renderer" ON )
50+ endif ()
51+
4652if ((UNIX AND NOT APPLE ) AND NOT SERVER_ONLY)
4753 option (ENABLE_WAYLAND_DEVICE "Enable Wayland device for linux build" ON )
4854
@@ -166,7 +172,7 @@ else()
166172endif ()
167173
168174# Find system GLEW library or build it if missing
169- if (APPLE )
175+ if (APPLE AND NOT IOS )
170176 find_package (glew)
171177
172178 if (GLEW_FOUND)
@@ -264,7 +270,7 @@ endif()
264270# Set include paths
265271include_directories (${STK_SOURCE_DIR} )
266272
267- if (APPLE )
273+ if (APPLE AND NOT IOS )
268274 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64" )
269275 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks" )
270276elseif (MSVC )
@@ -430,7 +436,7 @@ include(cmake/SourceGroupFunctions.cmake)
430436source_group_hierarchy(STK_SOURCES STK_HEADERS)
431437
432438
433- if (APPLE )
439+ if (APPLE AND NOT IOS )
434440 # icon files to copy in the bundle
435441 set (OSX_ICON_FILES ${PROJECT_SOURCE_DIR} /data/supertuxkart.icns)
436442 set_source_files_properties (${OSX_ICON_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
0 commit comments