diff options
author | hinder <hinder@4054007a-4839-4648-a056-eb81e030d849> | 2012-02-08 15:08:40 +0000 |
---|---|---|
committer | hinder <hinder@4054007a-4839-4648-a056-eb81e030d849> | 2012-02-08 15:08:40 +0000 |
commit | 40613aef915ec44833ee985192ee5a6ec60339a4 (patch) | |
tree | 4d85a234c8b464ad375cadface9d131884c2f32e | |
parent | 8a4d635ef9407ee69b23f56d3de1242dae3aa4ec (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.sh | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 |