-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild_and_install
executable file
·62 lines (46 loc) · 1.68 KB
/
build_and_install
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
#!/usr/bin/env bash
source environment.sh
cat <<EOF
=== PySide BuildScripts Configuration ===
Installation prefix: $PYSIDESANDBOXPATH
Build type: $BUILD_TYPE
Target Python version: $PYTHONXY
Build for Python 3: $PYSIDE_BUILDSCRIPTS_USE_PYTHON3
EOF
alldirs=("shiboken" "pyside" "pyside-tools")
if [ $# == 0 ] ; then
dirs=("${alldirs[@]}")
else
dirs=("$@")
fi
for d in "${dirs[@]}" ; do
rm -rf "$d/build"
mkdir -p "$d/build"
(
source environment.sh
if [ "`uname -s`" == "Darwin" ]; then
# When running on Mac OS X, we need to specify the
# Qt include dir for the header files to be found.
echo "$0: Mac OS X detected (uname -s gave 'Darwin')."
PYSIDE_BS_CMAKE_FLAGS="-DALTERNATIVE_QT_INCLUDE_DIR=/Library/Frameworks/"
else
# On Non-OS X builds, we enable this to fix a gcc bug
PYSIDE_BS_CMAKE_FLAGS="-DENABLE_GCC_OPTIMIZATION=On"
fi
if [ "$Q_WS_SIMULATOR" == "yes" ]; then
PYSIDE_BS_CMAKE_FLAGS=$PYSIDE_BS_CMAKE_FLAGS" -DQ_WS_SIMULATOR=yes"
fi
if [ "$PYSIDE_BUILDSCRIPTS_USE_PYTHON3" == "yes" ]; then
PYSIDE_BS_CMAKE_FLAGS=$PYSIDE_BS_CMAKE_FLAGS" -DUSE_PYTHON3=1"
fi
cd "$d/build"
cmake .. -DCMAKE_INSTALL_PREFIX=$PYSIDESANDBOXPATH \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DENABLE_ICECC=0 \
$PYSIDE_BS_CMAKE_FLAGS \
&& make -j4 && make install || exit 1
) || exit 1
# If you are experiencing problems on OS X, uncomment the
# following line to update the run-time linker cache:
# sudo ldconfig
done