aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhinder <hinder@4054007a-4839-4648-a056-eb81e030d849>2012-02-08 15:08:40 +0000
committerhinder <hinder@4054007a-4839-4648-a056-eb81e030d849>2012-02-08 15:08:40 +0000
commit40613aef915ec44833ee985192ee5a6ec60339a4 (patch)
tree4d85a234c8b464ad375cadface9d131884c2f32e
parent8a4d635ef9407ee69b23f56d3de1242dae3aa4ec (diff)
OpenCL.sh: Find OpenCL automatically on Mac OS
Note that the Apple OpenCL on Mac OS might not work very well git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/OpenCL/trunk@5 4054007a-4839-4648-a056-eb81e030d849
-rw-r--r--OpenCL.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenCL.sh b/OpenCL.sh
index 81e24d7..03fb1ef 100644
--- a/OpenCL.sh
+++ b/OpenCL.sh
@@ -15,9 +15,16 @@ set -e # Abort on errors
################################################################################
if [ -z "${OPENCL_DIR}" ]; then
- echo "BEGIN ERROR"
- echo "OpenCL selected, but OPENCL_DIR not set."
- echo "END ERROR"
+ if [ -r /System/Library/Frameworks/OpenCL.framework ]; then
+ OPENCL_DIR=/System/Library/Frameworks/OpenCL.framework
+ OPENCL_INC_DIRS=/System/Library/Frameworks/OpenCL.framework/Headers
+ OPENCL_LIB_DIRS=/System/Library/Frameworks/OpenCL.framework/Libraries
+ OPENCL_LIBS="-Wl,-framework -Wl,OpenCL"
+ else
+ echo "BEGIN ERROR"
+ echo "OpenCL selected, but OPENCL_DIR not set."
+ echo "END ERROR"
+ fi
fi
# Set options