-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_occt.sh
65 lines (52 loc) · 1.94 KB
/
build_occt.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
export VERSION=7.6.2
export OCCT_VER=occt-${VERSION}
export HASH=bb368e271e24f63078129283148ce83db6b9670a
export PATCHFILE="../add_cotire_to_${VERSION}.patch"
echo "version = ${VERSION}"
echo "HASH = ${HASH}"
echo " ${HASH:0:7}"
echo "OCCT_VER= ${OCCT_VER}"
if [ ! -d ${OCCT_VER} ]
then
curl -L -o occt${VERSION}.tgz "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=${HASH};sf=tgz"
tar -xf occt${VERSION}.tgz
mv occt-${HASH:0:7} ${OCCT_VER}
echo -----------------------------------------------------------------
echo PATCHING ${VERSION} TO SPEEDUP BUILD
echo -----------------------------------------------------------------
cd ${OCCT_VER}
if [ -f ${PATCHFILE} ]
then
echo patching source with ${PATCHFILE}
patch -p1 < ${PATCHFILE}
# note diff -uraN b a > patch_from_a_to_b.patch
fi
cd ..
fi
export INSTALL_DIR=`pwd`/dist/${OCCT_VER}
mkdir -p build_linux
ls
cd build_linux
export CCACHE_SLOPPINESS="pch_defines;time_macros"
cmake -DINSTALL_DIR:STRING="${INSTALL_DIR}" \
-DCMAKE_SUPPRESS_REGENERATION:BOOL=ON \
-DBUILD_USE_PCH:BOOLEAN=ON \
-DUSE_TBB:BOOLEAN=ON \
-DUSE_VTK:BOOLEAN=OFF \
-USE_FREETYPE:BOOLEAN=OFF \
-USE_XLIB:BOOLEAN=OFF \
-USE_OPENGL:BOOLEAN=OFF \
-DUSE_FREEIMAGE:BOOLEAN=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_TESTING:BOOLEAN=OFF \
-DBUILD_MODULE_ApplicationFramework:BOOLEAN=OFF \
-DBUILD_MODULE_DataExchange:BOOLEAN=ON \
-DBUILD_MODULE_DataExchange2:BOOLEAN=OFF \
-DBUILD_MODULE_Draw:BOOLEAN=OFF \
-DBUILD_MODULE_FoundationClasses:BOOLEAN=ON \
-DBUILD_MODULE_MfcSamples:BOOLEAN=OFF \
-DBUILD_MODULE_ModelingAlgorithms:BOOLEAN=ON \
-DBUILD_MODULE_ModelingData:BOOLEAN=ON \
-DBUILD_MODULE_Visualization:BOOLEAN=OFF \
../${OCCT_VER}
make -j 5 | grep -v "Building CXX"