diff --git a/CMakeLists.txt b/CMakeLists.txt index 19693ea93..c1488cc26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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,7 +55,9 @@ if(BUILD_LIBRETRO_CORE) endif() # Force PIC when compiling a libretro core. - set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(BUILD_LIBRETRO_CORE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() endif()