Add subset of headers from libretro-common

This commit is contained in:
Connor McLaughlin
2020-05-23 17:44:43 +10:00
parent f5fd37c4c4
commit 5dedd8707b
6 changed files with 3372 additions and 0 deletions

View File

@ -15,6 +15,7 @@ endif()
if(NOT ANDROID)
option(BUILD_SDL_FRONTEND "Build the SDL frontend" ON)
option(BUILD_QT_FRONTEND "Build the Qt frontend" ON)
option(BUILD_LIBRETRO_CORE "Build a libretro core" OFF)
option(ENABLE_DISCORD_PRESENCE "Build with Discord Rich Presence support" ON)
option(USE_SDL2 "Link with SDL2 for controller support" ON)
endif()
@ -28,6 +29,35 @@ if(LINUX OR ANDROID)
option(USE_EGL "Support EGL OpenGL context creation" ON)
endif()
# When we're building for libretro, everything else is invalid because of PIC.
if(BUILD_LIBRETRO_CORE)
if(BUILD_SDL_FRONTEND)
message(WARNING "Building libretro core, disabling SDL frontend")
set(BUILD_SDL_FRONTEND OFF)
endif()
if(BUILD_QT_FRONTEND)
message(WARNING "Building libretro core, disabling Qt frontend")
set(BUILD_QT_FRONTEND OFF)
endif()
if(ENABLE_DISCORD_PRESENCE)
message("Building libretro core, disabling Discord Presence support")
set(ENABLE_DISCORD_PRESENCE OFF)
endif()
if(USE_SDL2)
message("Building libretro core, disabling SDL2 support")
set(USE_SDL2 OFF)
endif()
if(USE_X11)
set(USE_X11 OFF)
endif()
if(USE_EGL)
set(USE_EGL OFF)
endif()
# Force PIC when compiling a libretro core.
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
# Common include/library directories on Windows.
if(WIN32)