Skip to content

Commit 5aea3e2

Browse files
warmenhovenicculus
authored andcommitted
libretro: add ios/tvos builds
1 parent a5b0ebc commit 5aea3e2

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

.gitlab-ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,19 @@ include:
3030
- project: 'libretro-infrastructure/ci-templates'
3131
file: 'osx-cmake-x86.yml'
3232

33-
################################## CELLULAR ################################
33+
################################## CELLULAR ################################
3434
# Android
3535
- project: 'libretro-infrastructure/ci-templates'
3636
file: '/android-cmake.yml'
37-

37+
38+
# iOS
39+
- project: 'libretro-infrastructure/ci-templates'
40+
file: '/ios-cmake.yml'
41+
42+
# tvOS
43+
- project: 'libretro-infrastructure/ci-templates'
44+
file: '/tvos-cmake.yml'
45+
3846
################################## CONSOLES ################################
3947
# Nintendo 3DS
4048
#- project: 'libretro-infrastructure/ci-templates'
@@ -111,7 +119,19 @@ android-x86:
111119
extends:
112120
- .libretro-android-cmake-x86
113121
- .core-defs
114-

122+
123+
# iOS arm64
124+
libretro-build-ios-arm64:
125+
extends:
126+
- .libretro-ios-cmake-arm64
127+
- .core-defs
128+
129+
# tvOS arm64
130+
libretro-build-tvos-arm64:
131+
extends:
132+
- .libretro-tvos-cmake-arm64
133+
- .core-defs
134+
115135
################################### CONSOLES #################################
116136
# Nintendo 3DS
117137
#libretro-build-ctr:

CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ add_library(dirksimple-lodepng STATIC
133133
)
134134
set_target_properties(dirksimple-lodepng PROPERTIES POSITION_INDEPENDENT_CODE ON)
135135

136-
add_library(dirksimple-lua STATIC
136+
set(LUA_SOURCES
137137
thirdparty/lua/src/lapi.c
138138
thirdparty/lua/src/ldebug.c
139139
thirdparty/lua/src/ldo.c
@@ -161,12 +161,18 @@ add_library(dirksimple-lua STATIC
161161
thirdparty/lua/src/linit.c
162162
thirdparty/lua/src/lctype.c
163163
thirdparty/lua/src/ldblib.c
164-
thirdparty/lua/src/liolib.c
165164
thirdparty/lua/src/lmathlib.c
166-
thirdparty/lua/src/loslib.c
167165
thirdparty/lua/src/lcorolib.c
168166
thirdparty/lua/src/loadlib.c
169167
)
168+
# loslib.c and liolib.c use system()/popen() which are unavailable on iOS/tvOS
169+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS" AND NOT CMAKE_SYSTEM_NAME STREQUAL "tvOS")
170+
list(APPEND LUA_SOURCES
171+
thirdparty/lua/src/loslib.c
172+
thirdparty/lua/src/liolib.c
173+
)
174+
endif()
175+
add_library(dirksimple-lua STATIC ${LUA_SOURCES})
170176
set_target_properties(dirksimple-lua PROPERTIES POSITION_INDEPENDENT_CODE ON)
171177
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
172178
target_compile_definitions(dirksimple-lua PRIVATE "-DLUA_USE_POSIX=1")

0 commit comments

Comments
 (0)