Skip to content

Commit

Permalink
build: Untested attempt at enabling Android libretro support.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Dec 12, 2022
1 parent 0e1dab1 commit a8e0ec6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .gitlab-ci.yml
Expand Up @@ -28,9 +28,9 @@ include:

################################## CELLULAR ################################
# Android
#- project: 'libretro-infrastructure/ci-templates'
# file: '/android-cmake.yml'

- project: 'libretro-infrastructure/ci-templates'
file: '/android-cmake.yml'

################################## CONSOLES ################################
# Nintendo 3DS
#- project: 'libretro-infrastructure/ci-templates'
Expand Down Expand Up @@ -79,29 +79,29 @@ libretro-build-osx-x64:

################################### CELLULAR #################################
# Android ARMv7a
#android-armeabi-v7a:
#extends:
#- .libretro-android-cmake-armeabi-v7a
#- .core-defs

android-armeabi-v7a:
extends:
- .libretro-android-cmake-armeabi-v7a
- .core-defs

# Android ARMv8a
#android-arm64-v8a:
#extends:
#- .libretro-android-cmake-arm64-v8a
#- .core-defs

android-arm64-v8a:
extends:
- .libretro-android-cmake-arm64-v8a
- .core-defs

# Android 64-bit x86
#android-x86_64:
#extends:
#- .libretro-android-cmake-x86_64
#- .core-defs

android-x86_64:
extends:
- .libretro-android-cmake-x86_64
- .core-defs

# Android 32-bit x86
#android-x86:
#extends:
#- .libretro-android-cmake-x86
#- .core-defs

android-x86:
extends:
- .libretro-android-cmake-x86
- .core-defs

################################### CONSOLES #################################
# Nintendo 3DS
#libretro-build-ctr:
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Expand Up @@ -9,6 +9,10 @@ if(MSVC) # the daemon is pretty Unixy.
set(MOJOZORK_MULTIZORK_DEFAULT OFF)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Android")
set(ANDROID TRUE
endif()

# Building as part of RetroArch? Turn off everything but the libretro plugin by default.
if(LIBRETRO)
set(MOJOZORK_STANDALONE_DEFAULT OFF)
Expand Down Expand Up @@ -38,6 +42,9 @@ endif()

if(MOJOZORK_LIBRETRO)
add_library(mojozork_libretro SHARED mojozork-libretro.c)
if(ANDROID) # Android builds of libretro cores need specific names.
set_target_properties(mojozork_libretro PROPERTIES LIBRARY_OUTPUT_NAME mojozork_libretro_android)
endif()
set_target_properties(mojozork_libretro PROPERTIES PREFIX "")
endif()

Expand Down

0 comments on commit a8e0ec6

Please sign in to comment.