From 5da8ed250a12875cb0483e0958a84c955f8e723b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 2 Dec 2012 19:01:20 +0100 Subject: [PATCH] Cleanup of backend option strings. --- CMakeLists.txt | 5 ++++- src/cocoa_platform.h | 2 ++ src/internal.h | 2 +- src/win32_platform.h | 2 ++ src/x11_platform.h | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5797c99f..08542a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,10 @@ option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON) option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON) option(GLFW_NATIVE_API "Build the GLFW native API" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) -option(GLFW_USE_EGL "Build for EGL and OpenGL ES platform (Currently only X11)" OFF) + +if (NOT APPLE) + option(GLFW_USE_EGL "Use EGL for context creation" OFF) +endif() if (GLFW_USE_EGL) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/modules) diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index 57a27487..21589a69 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -42,6 +42,8 @@ typedef void* id; #if defined(_GLFW_NSGL) #include "nsgl_platform.h" +#else + #error "No supported context creation API selected" #endif #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS NS diff --git a/src/internal.h b/src/internal.h index fa87e699..d2619e2e 100644 --- a/src/internal.h +++ b/src/internal.h @@ -72,7 +72,7 @@ typedef struct _GLFWlibrary _GLFWlibrary; #elif defined(_GLFW_X11) #include "x11_platform.h" #else - #error "No supported platform selected" + #error "No supported window creation API selected" #endif diff --git a/src/win32_platform.h b/src/win32_platform.h index f5e94bb5..30d55347 100644 --- a/src/win32_platform.h +++ b/src/win32_platform.h @@ -111,6 +111,8 @@ typedef DWORD (WINAPI * TIMEGETTIME_T) (void); #define _GLFW_EGL_NATIVE_WINDOW window->Win32.handle #define _GLFW_EGL_NATIVE_DISPLAY NULL #include "egl_platform.h" +#else + #error "No supported context creation API selected" #endif #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWin32 Win32 diff --git a/src/x11_platform.h b/src/x11_platform.h index 990487fc..87c46d85 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -61,6 +61,8 @@ #define _GLFW_EGL_NATIVE_WINDOW window->X11.handle #define _GLFW_EGL_NATIVE_DISPLAY _glfwLibrary.X11.display #include "egl_platform.h" +#else + #error "No supported context creation API selected" #endif #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowX11 X11