From 2955cd3afcdfc21dfc2a1383598932eb8612d575 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 17 Nov 2010 15:42:55 +0100 Subject: [PATCH 1/2] Formatting. --- include/GL/glfw3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index d645e9fa..bbfdc79e 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -1,4 +1,4 @@ -/************************************************************************ +/************************************************************************* * GLFW - An OpenGL framework * API version: 3.0 * WWW: http://www.glfw.org/ @@ -127,15 +127,15 @@ extern "C" { #if defined(_WIN32) && defined(GLFW_BUILD_DLL) /* We are building a Win32 DLL */ - #define GLFWAPI __declspec(dllexport) + #define GLFWAPI __declspec(dllexport) #elif defined(_WIN32) && defined(GLFW_DLL) /* We are calling a Win32 DLL */ #if defined(__LCC__) - #define GLFWAPI extern + #define GLFWAPI extern #else - #define GLFWAPI __declspec(dllimport) + #define GLFWAPI __declspec(dllimport) #endif #else From 71d64a03d816029905cdb1bcace073df67b71df7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 17 Nov 2010 16:36:09 +0100 Subject: [PATCH 2/2] Added build option to choose between native and Universal Binary builds. --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cbdeff4..3c28f70d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,10 +115,17 @@ if (UNIX AND APPLE) # Define the platform identifier set(_GLFW_COCOA_NSGL 1) + option(GLFW_BUILD_UNIVERSAL "Build the GLFW library and examples as Universal Binaries" FALSE) + # 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) - set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5 -Wall -Wextra -Wno-unused-parameter -Werror") + if (GLFW_BUILD_UNIVERSAL) + message(STATUS "Building GLFW as Universal Binaries") + set(CMAKE_OSX_ARCHITECTURES ppc;i386;ppc64;x86_64) + set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) + set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5 -Wall -Wextra -Wno-unused-parameter -Werror") + else(GLFW_BUILD_UNIVERSAL) + message(STATUS "Building GLFW only for the native architecture") + endif(GLFW_BUILD_UNIVERSAL) # Set up library and include paths find_library(COCOA_FRAMEWORK Cocoa)