Fix compilation on Linux with SFML_OPENGL_ES option
This commit is contained in:
parent
6d1e428640
commit
faaec51666
@ -91,18 +91,9 @@ if(SFML_OS_WINDOWS)
|
|||||||
# make sure that we use the Unicode version of the Win API functions
|
# make sure that we use the Unicode version of the Win API functions
|
||||||
add_definitions(-DUNICODE -D_UNICODE)
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
||||||
if(SFML_OPENGL_ES)
|
if(SFML_USE_DRM)
|
||||||
set(PLATFORM_SRC
|
|
||||||
${PLATFORM_SRC}
|
|
||||||
${SRCROOT}/EGLCheck.cpp
|
|
||||||
${SRCROOT}/EGLCheck.hpp
|
|
||||||
${SRCROOT}/EglContext.cpp
|
|
||||||
${SRCROOT}/EglContext.hpp
|
|
||||||
)
|
|
||||||
elseif(SFML_USE_DRM)
|
|
||||||
add_definitions(-DSFML_USE_DRM)
|
add_definitions(-DSFML_USE_DRM)
|
||||||
set(PLATFORM_SRC
|
set(PLATFORM_SRC
|
||||||
${PLATFORM_SRC}
|
|
||||||
${SRCROOT}/EGLCheck.cpp
|
${SRCROOT}/EGLCheck.cpp
|
||||||
${SRCROOT}/EGLCheck.hpp
|
${SRCROOT}/EGLCheck.hpp
|
||||||
${SRCROOT}/DRM/CursorImpl.hpp
|
${SRCROOT}/DRM/CursorImpl.hpp
|
||||||
@ -121,7 +112,6 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
|||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(PLATFORM_SRC
|
set(PLATFORM_SRC
|
||||||
${PLATFORM_SRC}
|
|
||||||
${SRCROOT}/Unix/CursorImpl.hpp
|
${SRCROOT}/Unix/CursorImpl.hpp
|
||||||
${SRCROOT}/Unix/CursorImpl.cpp
|
${SRCROOT}/Unix/CursorImpl.cpp
|
||||||
${SRCROOT}/Unix/ClipboardImpl.hpp
|
${SRCROOT}/Unix/ClipboardImpl.hpp
|
||||||
@ -132,14 +122,27 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
|||||||
${SRCROOT}/Unix/SensorImpl.hpp
|
${SRCROOT}/Unix/SensorImpl.hpp
|
||||||
${SRCROOT}/Unix/Display.cpp
|
${SRCROOT}/Unix/Display.cpp
|
||||||
${SRCROOT}/Unix/Display.hpp
|
${SRCROOT}/Unix/Display.hpp
|
||||||
${SRCROOT}/Unix/GlxContext.cpp
|
|
||||||
${SRCROOT}/Unix/GlxContext.hpp
|
|
||||||
${SRCROOT}/Unix/VideoModeImpl.cpp
|
${SRCROOT}/Unix/VideoModeImpl.cpp
|
||||||
${SRCROOT}/Unix/VulkanImplX11.cpp
|
${SRCROOT}/Unix/VulkanImplX11.cpp
|
||||||
${SRCROOT}/Unix/VulkanImplX11.hpp
|
${SRCROOT}/Unix/VulkanImplX11.hpp
|
||||||
${SRCROOT}/Unix/WindowImplX11.cpp
|
${SRCROOT}/Unix/WindowImplX11.cpp
|
||||||
${SRCROOT}/Unix/WindowImplX11.hpp
|
${SRCROOT}/Unix/WindowImplX11.hpp
|
||||||
)
|
)
|
||||||
|
if(SFML_OPENGL_ES)
|
||||||
|
set(PLATFORM_SRC
|
||||||
|
${PLATFORM_SRC}
|
||||||
|
${SRCROOT}/EGLCheck.cpp
|
||||||
|
${SRCROOT}/EGLCheck.hpp
|
||||||
|
${SRCROOT}/EglContext.cpp
|
||||||
|
${SRCROOT}/EglContext.hpp
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(PLATFORM_SRC
|
||||||
|
${PLATFORM_SRC}
|
||||||
|
${SRCROOT}/Unix/GlxContext.cpp
|
||||||
|
${SRCROOT}/Unix/GlxContext.hpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(SFML_OS_LINUX)
|
if(SFML_OS_LINUX)
|
||||||
set(PLATFORM_SRC
|
set(PLATFORM_SRC
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Window/DRM/DRMContext.hpp>
|
#include <SFML/Window/DRM/DRMContext.hpp>
|
||||||
#include <SFML/Window/DRM/WindowImplDRM.hpp>
|
#include <SFML/Window/DRM/WindowImplDRM.hpp>
|
||||||
#include <SFML/OpenGL.hpp>
|
|
||||||
#include <SFML/System/Err.hpp>
|
#include <SFML/System/Err.hpp>
|
||||||
#include <SFML/System/Sleep.hpp>
|
#include <SFML/System/Sleep.hpp>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include <SFML/Window/EGLCheck.hpp>
|
#include <SFML/Window/EGLCheck.hpp>
|
||||||
#include <SFML/Window/GlContext.hpp>
|
#include <SFML/Window/GlContext.hpp>
|
||||||
#include <SFML/Window/VideoMode.hpp>
|
#include <SFML/Window/VideoMode.hpp>
|
||||||
#include <SFML/OpenGL.hpp>
|
|
||||||
#include <drm-common.h>
|
#include <drm-common.h>
|
||||||
#include <glad/egl.h>
|
#include <glad/egl.h>
|
||||||
#include <gbm.h>
|
#include <gbm.h>
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <glad/egl.h>
|
#include <glad/egl.h>
|
||||||
#if defined(SFML_SYSTEM_LINUX) && !defined(SFML_USE_DRM)
|
#if defined(SFML_SYSTEM_LINUX) && !defined(SFML_USE_DRM)
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
|
@ -59,16 +59,16 @@
|
|||||||
|
|
||||||
#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) || defined(SFML_SYSTEM_NETBSD)
|
#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) || defined(SFML_SYSTEM_NETBSD)
|
||||||
|
|
||||||
#if defined(SFML_OPENGL_ES)
|
#if defined(SFML_USE_DRM)
|
||||||
|
|
||||||
#include <SFML/Window/EglContext.hpp>
|
|
||||||
typedef sf::priv::EglContext ContextType;
|
|
||||||
|
|
||||||
#elif defined(SFML_USE_DRM)
|
|
||||||
|
|
||||||
#include <SFML/Window/DRM/DRMContext.hpp>
|
#include <SFML/Window/DRM/DRMContext.hpp>
|
||||||
typedef sf::priv::DRMContext ContextType;
|
typedef sf::priv::DRMContext ContextType;
|
||||||
|
|
||||||
|
#elif defined(SFML_OPENGL_ES)
|
||||||
|
|
||||||
|
#include <SFML/Window/EglContext.hpp>
|
||||||
|
typedef sf::priv::EglContext ContextType;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <SFML/Window/Unix/GlxContext.hpp>
|
#include <SFML/Window/Unix/GlxContext.hpp>
|
||||||
|
Loading…
Reference in New Issue
Block a user