mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Added build option to choose between native and Universal Binary builds.
This commit is contained in:
parent
2955cd3afc
commit
71d64a03d8
@ -115,10 +115,17 @@ if (UNIX AND APPLE)
|
|||||||
# Define the platform identifier
|
# Define the platform identifier
|
||||||
set(_GLFW_COCOA_NSGL 1)
|
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...
|
# Universal build, decent set of warning flags...
|
||||||
set(CMAKE_OSX_ARCHITECTURES ppc;i386;ppc64;x86_64)
|
if (GLFW_BUILD_UNIVERSAL)
|
||||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
|
message(STATUS "Building GLFW as Universal Binaries")
|
||||||
set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5 -Wall -Wextra -Wno-unused-parameter -Werror")
|
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
|
# Set up library and include paths
|
||||||
find_library(COCOA_FRAMEWORK Cocoa)
|
find_library(COCOA_FRAMEWORK Cocoa)
|
||||||
|
Loading…
Reference in New Issue
Block a user