Skip to content

Commit 24d6139

Browse files
committed
Merge pull request #318 from hanyazou/xcode-opencl-header
Use newer OpenCL include path to save cl.hpp
2 parents 1d2db2a + 5c23927 commit 24d6139

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

depends/install_mac.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
cd `dirname $0`
44
DEPENDS_DIR=`pwd`
5+
OS_VER=`sw_vers -productVersion | sed 's/^\([0-9]*\)\.\([0-9]*\).*$/\1.\2/'`
56

67
sh ./install_libusb.sh
78
sh ./install_glfw.sh
89

910
#get the missing cl.hpp from Khronos.org
10-
cd /System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/
11+
cd /System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/ ||
12+
cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VER}.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers
1113
[ -f cl.hpp ] || sudo wget http://www.khronos.org/registry/cl/api/1.2/cl.hpp
1214

1315
cd $DEPENDS_DIR

0 commit comments

Comments
 (0)