-
Notifications
You must be signed in to change notification settings - Fork 0
/
pull_thirdparty_osx.sh
executable file
·84 lines (63 loc) · 2.12 KB
/
pull_thirdparty_osx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
#
# Created by: Matt C. McCallum
# 2nd October 2017
#
# Pulls in dependencies for the VecLib project
#
# Dependencies covered here:
# - IPP
# - GYP
#
echo " "
echo "Installing Dependencies..."
echo " "
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "${ROOT_DIR}"
# Prepare thirdparty paths
THIRDPARTY_DIR="${ROOT_DIR}"/thirdparty/
LIB_DIR="${THIRDPARTY_DIR}/lib"
INCLUDE_DIR="${THIRDPARTY_DIR}/include"
mkdir -p "${LIB_DIR}"
mkdir -p "${INCLUDE_DIR}"
###################################################
# IPP #
###################################################
echo " "
echo "Installing IPP..."
echo " "
IPP_BASE_DIR="/opt/intel/ipp/"
if [ ! -e "/opt/intel/ipp/include/ipp.h" ]; then
echo "ERROR: Could not find IPP library."
echo "This must be manually downloaded and installed."
echo "Go here for more info: https://software.intel.com/en-us/articles/free-ipp"
echo " "
fi
if [ ! -e "${LIB_DIR}/libippsmerged.a" ]; then
cp "${IPP_BASE_DIR}/lib/libippcore.a" "${LIB_DIR}/libippcore.a"
cp "${IPP_BASE_DIR}/lib/libipps.a" "${LIB_DIR}/libipps.a"
cp "${IPP_BASE_DIR}/lib/libippvm.a" "${LIB_DIR}/libippvm.a"
mkdir "${INCLUDE_DIR}/ipp/"
cp "${IPP_BASE_DIR}/include/"*.h "${INCLUDE_DIR}/ipp/"
fi
###################################################
# GYP #
###################################################
echo " "
echo "Installing GYP..."
echo " "
if [[ $( which gyp ) == "" ]]; then
GYP_BUILD_DIR="${THIRDPARTY_DIR}/gyp/"
mkdir -p "${GYP_BUILD_DIR}"
pushd "${GYP_BUILD_DIR}"
git clone https://chromium.googlesource.com/external/gyp.git
GYP_LIB_DIR="./gyp"
pushd ${GYP_LIB_DIR}
echo " "
echo "Going to need your computer password to install GYP..."
echo " "
sudo python setup.py install
popd
popd
fi
popd