Merge branch 'master' into wii-network
Conflicts: Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp Source/Core/Core/Src/ConfigManager.cpp Source/Core/Core/Src/HLE/HLE_OS.h Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.h Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h
This commit is contained in:
+59
-14
@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
option(ANDROID "Enables a build for Android" OFF)
|
||||
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
||||
option(USE_X11 "Enables X11 Support" ON)
|
||||
option(USE_WAYLAND "Enables Wayland Support" OFF)
|
||||
option(USE_GLES "Enables GLES And EGL, disables OGL" OFF)
|
||||
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
|
||||
|
||||
@@ -278,16 +280,28 @@ if(USE_GLES)
|
||||
add_definitions(-DUSE_EGL=1)
|
||||
set(USE_EGL True)
|
||||
endif()
|
||||
# For now Wayland and EGL are tied to each other.
|
||||
# The alternative would be an shm path
|
||||
if(USE_WAYLAND)
|
||||
add_definitions(-DUSE_EGL)
|
||||
set(USE_EGL 1)
|
||||
endif()
|
||||
|
||||
if(USE_EGL)
|
||||
message("EGL OpenGL interface enabled")
|
||||
add_definitions(-DUSE_EGL=1)
|
||||
else()
|
||||
# Using GLX
|
||||
set(USE_X11 1)
|
||||
set(USE_WAYLAND 0)
|
||||
endif()
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)
|
||||
|
||||
if(ANDROID)
|
||||
message("Building for Android")
|
||||
add_definitions(-DANDROID)
|
||||
set(USE_X11 0)
|
||||
set(USE_WAYLAND 0)
|
||||
endif()
|
||||
########################################
|
||||
# Dependency checking
|
||||
@@ -363,29 +377,53 @@ if(NOT ANDROID)
|
||||
message("OpenAL NOT found, disabling OpenAL sound backend")
|
||||
endif(OPENAL_FOUND)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Note: The convention is to check USE_X11 or USE_WAYLAND where needed.
|
||||
# This is where we detect platforms and set the variables accordingly.
|
||||
pkg_check_modules(WAYLAND wayland-egl wayland-client wayland-cursor)
|
||||
if(USE_WAYLAND AND WAYLAND_FOUND)
|
||||
pkg_check_modules(XKBCOMMON xkbcommon)
|
||||
if(XKBCOMMON_FOUND)
|
||||
set(USE_WAYLAND 1)
|
||||
add_definitions(-DHAVE_WAYLAND)
|
||||
include_directories(${WAYLAND_INCLUDE_DIR})
|
||||
message("Wayland support enabled")
|
||||
endif(XKBCOMMON_FOUND)
|
||||
else()
|
||||
set(USE_WAYLAND 0)
|
||||
message("Wayland support disabled")
|
||||
add_definitions(-DHAVE_WAYLAND=0)
|
||||
endif(USE_WAYLAND AND WAYLAND_FOUND)
|
||||
|
||||
# Note: We do not need to explicitly check for X11 as it is done in the cmake
|
||||
# FindOpenGL module on linux.
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(X11_FOUND)
|
||||
if(USE_X11 AND X11_FOUND)
|
||||
set(USE_X11 1)
|
||||
add_definitions(-DHAVE_X11=1)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
message("X11 found")
|
||||
message("X11 support enabled")
|
||||
else()
|
||||
message(FATAL_ERROR "X11 is required but not found")
|
||||
endif(X11_FOUND)
|
||||
else()
|
||||
add_definitions(-DHAVE_X11=0)
|
||||
set(USE_X11 0)
|
||||
SET(X11_FOUND "")
|
||||
message("X11 support disabled")
|
||||
add_definitions(-DHAVE_X11=0)
|
||||
endif(USE_X11 AND X11_FOUND)
|
||||
|
||||
if (NOT USE_WAYLAND AND NOT USE_X11)
|
||||
message(FATAL_ERROR "\n"
|
||||
"No suitable display platform found\n"
|
||||
"Requires wayland or x11 to run")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(X11_FOUND)
|
||||
if(USE_X11)
|
||||
check_lib(XRANDR Xrandr)
|
||||
if(XRANDR_FOUND)
|
||||
add_definitions(-DHAVE_XRANDR=1)
|
||||
else()
|
||||
add_definitions(-DHAVE_XRANDR=0)
|
||||
endif(XRANDR_FOUND)
|
||||
endif()
|
||||
if(XRANDR_FOUND)
|
||||
add_definitions(-DHAVE_XRANDR=1)
|
||||
else()
|
||||
add_definitions(-DHAVE_XRANDR=0)
|
||||
endif(XRANDR_FOUND)
|
||||
|
||||
if(ENCODE_FRAMEDUMPS)
|
||||
check_libav()
|
||||
endif()
|
||||
@@ -458,6 +496,13 @@ else()
|
||||
set(LZO lzo2)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
message("Using static libpng from Externals")
|
||||
add_subdirectory(Externals/libpng)
|
||||
include_directories(Externals/libpng)
|
||||
set(PNG libpng)
|
||||
endif()
|
||||
|
||||
if(OPENAL_FOUND)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
check_lib(SOUNDTOUCH SoundTouch soundtouch/soundtouch.h QUIET)
|
||||
|
||||
Reference in New Issue
Block a user