More robust way of building on 10.6 for a 10.5+ target.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6314 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-10-24 20:07:12 +00:00
parent ab53c84dcf
commit 78ab1c0f3f
4 changed files with 14 additions and 23 deletions

View File

@ -26,20 +26,12 @@
#define HAVE_OPENCL 1
#endif
// The latest (last?) release of Xcode for Leopard does not include the 10.6
// SDK, so we can only build with OpenCL on a Snow Leopard system where we link
// the OpenCL framework weakly so that the application will also run on 10.5.
#ifdef __APPLE__
#import <Foundation/NSObjCRuntime.h>
#ifdef NSFoundationVersionNumber10_5 // First defined in the 10.6 SDK
#include <OpenCL/opencl.h>
#define HAVE_OPENCL 1
#endif
#endif
#if defined(HAVE_OPENCL) && HAVE_OPENCL
#ifndef __APPLE__
#ifdef __APPLE__
#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif