mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Moved platform identifier define to config header.
This commit is contained in:
parent
3be0c05aaa
commit
5a112d6cd1
@ -34,6 +34,9 @@ set(common_SOURCES
|
||||
if (WIN32)
|
||||
message(STATUS "Building GLFW for WGL on a Win32 system")
|
||||
|
||||
# Define the platform identifier
|
||||
set(_GLFW_WIN32_WGL 1)
|
||||
|
||||
# Set up library and include paths
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
list(APPEND GLFW_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
|
||||
@ -49,6 +52,9 @@ endif (WIN32)
|
||||
if (UNIX AND NOT APPLE AND NOT CYGWIN)
|
||||
message(STATUS "Building GLFW for X11 and GLX on a Unix-like system")
|
||||
|
||||
# Define the platform identifier
|
||||
set(_GLFW_X11_GLX 1)
|
||||
|
||||
# Set up library and include paths
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${X11_X11_LIB} ${OPENGL_gl_LIBRARY})
|
||||
list(APPEND GLFW_INCLUDE_DIR ${X11_X11_INCLUDE_PATH})
|
||||
@ -106,6 +112,9 @@ endif(UNIX AND NOT APPLE AND NOT CYGWIN)
|
||||
if (UNIX AND APPLE)
|
||||
message(STATUS "Building GLFW for Cocoa and NSOpenGL on Mac OS X")
|
||||
|
||||
# Define the platform identifier
|
||||
set(_GLFW_COCOA_NSGL 1)
|
||||
|
||||
# Universal build, decent set of warning flags...
|
||||
set(CMAKE_OSX_ARCHITECTURES ppc;i386;ppc64;x86_64)
|
||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
|
||||
|
@ -34,9 +34,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
// This is the Mac OS X version of GLFW
|
||||
#define _GLFW_MAC_OS_X
|
||||
|
||||
#if defined(__OBJC__)
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#else
|
||||
|
@ -35,6 +35,13 @@
|
||||
// it. Instead, you should modify the config.h.in file.
|
||||
//========================================================================
|
||||
|
||||
// Define this to 1 if building GLFW for X11/GLX
|
||||
#cmakedefine _GLFW_X11_GLX
|
||||
// Define this to 1 if building GLFW for Win32/WGL
|
||||
#cmakedefine _GLFW_WIN32_WGL
|
||||
// Define this to 1 if building GLFW for Cocoa/NSOpenGL
|
||||
#cmakedefine _GLFW_COCOA_NSGL
|
||||
|
||||
// Define this to 1 if XRandR is available
|
||||
#cmakedefine _GLFW_HAS_XRANDR 1
|
||||
// Define this to 1 if Xf86VidMode is available
|
||||
|
@ -32,9 +32,6 @@
|
||||
#define _platform_h_
|
||||
|
||||
|
||||
// This is the Windows version of GLFW
|
||||
#define _GLFW_WIN32
|
||||
|
||||
// We don't need all the fancy stuff
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
@ -31,9 +31,6 @@
|
||||
#ifndef _platform_h_
|
||||
#define _platform_h_
|
||||
|
||||
// This is the X11 version of GLFW
|
||||
#define _GLFW_X11
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
Loading…
Reference in New Issue
Block a user