cmake: Further tweaks for Android libretro core

This commit is contained in:
Connor McLaughlin 2020-07-07 20:33:15 +10:00
parent 83b409c32a
commit fe867edefb

View file

@ -30,21 +30,21 @@ if(LINUX OR ANDROID)
endif()
# When we're building for libretro, everything else is invalid because of PIC.
if(BUILD_LIBRETRO_CORE)
if(ANDROID OR BUILD_LIBRETRO_CORE)
if(BUILD_SDL_FRONTEND)
message(WARNING "Building libretro core, disabling SDL frontend")
message(WARNING "Building for Android or libretro core, disabling SDL frontend")
set(BUILD_SDL_FRONTEND OFF)
endif()
if(BUILD_QT_FRONTEND)
message(WARNING "Building libretro core, disabling Qt frontend")
message(WARNING "Building for Android or libretro core, disabling Qt frontend")
set(BUILD_QT_FRONTEND OFF)
endif()
if(ENABLE_DISCORD_PRESENCE)
message("Building libretro core, disabling Discord Presence support")
message("Building for Android or libretro core, disabling Discord Presence support")
set(ENABLE_DISCORD_PRESENCE OFF)
endif()
if(USE_SDL2)
message("Building libretro core, disabling SDL2 support")
message("Building for Android or libretro core, disabling SDL2 support")
set(USE_SDL2 OFF)
endif()
if(USE_X11)
@ -55,8 +55,10 @@ if(BUILD_LIBRETRO_CORE)
endif()
# Force PIC when compiling a libretro core.
if(BUILD_LIBRETRO_CORE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
endif()
# Common include/library directories on Windows.