3 ## -- Command line options
4 while [[ "$#" -gt 1 ]]; do
42 ## -- Check command line options
49 (>&2 echo "Usage: $0 -prefix [dir] -qt [dir] -cmake [dir] -vtk [dir] -itk [dir] [-build_dir [dir]] [-cores [n]]")
53 ## -- Complete optional parameters
54 if [ -z "$cores" ] ; then
57 if [ -z "$build_dir" ] ; then
58 build_dir="$HOME/.tmp"
62 ## -- Configure, build and install Qt5
63 mkdir -p $build_dir/qt
66 -prefix $prefix -shared -confirm-license -opensource -release \
67 -c++std c++11 -opengl desktop \
68 -nomake examples -nomake tests -no-harfbuzz \
69 -qt-xcb -qt-xkbcommon -qt-pcre \
70 -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity \
71 -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad \
72 -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation \
73 -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing \
74 -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript \
75 -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \
76 -skip qtspeech -skip qtsvg -skip qttranslations -skip qtvirtualkeyboard \
77 -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets \
78 -skip qtwebview -skip qtxmlpatterns \
79 -qtlibinfix _cpPlugins
83 ## -- Configure, build and install CMake
84 mkdir -p $build_dir/cmake
86 $cmake/bootstrap --parallel=$cores --prefix=$prefix --no-qt-gui
90 ## -- Configure, build and install VTK
91 mkdir -p $build_dir/vtk
94 -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
95 -DBUILD_SHARED_LIBS:BOOL=ON \
96 -DCMAKE_BUILD_TYPE:STRING=Release \
97 -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
98 -DBUILD_DOCUMENTATION:BOOL=OFF \
99 -DBUILD_EXAMPLES:BOOL=OFF \
100 -DBUILD_TESTING:BOOL=OFF \
101 -DVTK_Group_Qt:BOOL=ON \
102 -DVTK_QT_VERSION:STRING=5 \
103 -DQt5_DIR:PATH=$prefix/lib/cmake/Qt5 \
104 -DQT_QMAKE_EXECUTABLE:PATH=$prefix/bin/qmake \
105 -DModule_vtkGUISupportQtOpenGL:BOOL=ON \
106 -DCMAKE_DEBUG_POSTFIX:STRING="_cpPlugins" \
107 -DCMAKE_RELEASE_POSTFIX:STRING="_cpPlugins" \
108 -DCMAKE_MACOSX_RPATH:BOOL=ON \
113 ## -- Configure, build and install VTK
114 mkdir -p $build_dir/itk
117 -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
118 -DBUILD_SHARED_LIBS:BOOL=ON \
119 -DCMAKE_BUILD_TYPE:STRING=Release \
120 -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
121 -DBUILD_DOCUMENTATION:BOOL=OFF \
122 -DBUILD_EXAMPLES:BOOL=OFF \
123 -DBUILD_TESTING:BOOL=OFF \
124 -DModule_ITKReview:BOOL=ON \
125 -DModule_ITKVtkGlue:BOOL=ON \
126 -DCMAKE_DEBUG_POSTFIX:STRING="_cpPlugins" \
127 -DCMAKE_RELEASE_POSTFIX:STRING="_cpPlugins" \
128 -DCMAKE_MACOSX_RPATH:BOOL=ON \