vtk_version="8.0.1"
itk_version="4.12.2"
-cmake_short_version=`echo $cmake_version | sed 's/\.[^.]*$//'`
-cmake_url="https://www.cmake.org/files/v$cmake_short_version/cmake-$cmake_version.tar.gz"
+platform=`uname`
+qt5extras_id="x11"
+if [[ "$platform" == 'Darwin' ]]; then
+ qt5extras_id="mac"
+fi
+
qt5_short_version=`echo $qt5_version | sed 's/\.[^.]*$//'`
qt5_url="https://download.qt.io/official_releases/qt/$qt5_short_version/$qt5_version/submodules/qtbase-opensource-src-$qt5_version.tar.xz"
+qt5extras_url="https://download.qt.io/official_releases/qt/$qt5_short_version/$qt5_version/submodules/qt${qt5extras_id}extras-opensource-src-$qt5_version.tar.xz"
+qt5tools_url="https://download.qt.io/official_releases/qt/$qt5_short_version/$qt5_version/submodules/qttools-opensource-src-$qt5_version.tar.xz"
+cmake_short_version=`echo $cmake_version | sed 's/\.[^.]*$//'`
+cmake_url="https://www.cmake.org/files/v$cmake_short_version/cmake-$cmake_version.tar.gz"
vtk_short_version=`echo $vtk_version | sed 's/\.[^.]*$//'`
vtk_url="https://www.vtk.org/files/release/$vtk_short_version/VTK-$vtk_version.tar.gz"
itk_short_version=`echo $itk_version | sed 's/\.[^.]*$//'`
curr_dir=`pwd`
## -- Create build directory
-mkdir -p $build_dir/qt5
-mkdir -p $build_dir/cmake
-mkdir -p $build_dir/vtk
-mkdir -p $build_dir/itk
-platform=`uname`
+mkdir -p $build_dir/qt5/src
+mkdir -p $build_dir/qt5extras/src
+mkdir -p $build_dir/qt5tools/src
+mkdir -p $build_dir/cmake/src
+mkdir -p $build_dir/vtk/src
+mkdir -p $build_dir/itk/src
+mkdir -p $build_dir/qt5/bin
+mkdir -p $build_dir/qt5extras/bin
+mkdir -p $build_dir/qt5tools/bin
+mkdir -p $build_dir/cmake/bin
+mkdir -p $build_dir/vtk/bin
+mkdir -p $build_dir/itk/bin
if [[ "$platform" == 'Linux' ]]; then
wget -O $build_dir/qt5/qt5.tar.xz $qt5_url
- wget -O $build_dir/cmake/cmake.tar.xz $cmake_url
- wget -O $build_dir/vtk/vtk.tar.xz $vtk_url
+ wget -O $build_dir/qt5extras/qt5extras.tar.xz $qt5extras_url
+ wget -O $build_dir/qt5tools/qt5tools.tar.xz $qt5tools_url
+ wget -O $build_dir/cmake/cmake.tar.gz $cmake_url
+ wget -O $build_dir/vtk/vtk.tar.gz $vtk_url
wget -O $build_dir/itk/itk.tar.xz $itk_url
elif [[ "$platform" == 'Darwin' ]]; then
curl -o $build_dir/qt5/qt5.tar.xz $qt5_url
- curl -o $build_dir/cmake/cmake.tar.xz $cmake_url
- curl -o $build_dir/vtk/vtk.tar.xz $vtk_url
+ curl -o $build_dir/qt5extras/qt5extras.tar.xz $qt5extras_url
+ curl -o $build_dir/qt5tools/qt5tools.tar.xz $qt5tools_url
+ curl -o $build_dir/cmake/cmake.tar.gz $cmake_url
+ curl -o $build_dir/vtk/vtk.tar.gz $vtk_url
curl -o $build_dir/itk/itk.tar.xz $itk_url
fi
+tar xvf $build_dir/qt5/qt5.tar.xz -C $build_dir/qt5/src --strip-components=1
+tar xvf $build_dir/qt5extras/qt5extras.tar.xz -C $build_dir/qt5extras/src --strip-components=1
+tar xvf $build_dir/qt5tools/qt5tools.tar.xz -C $build_dir/qt5tools/src --strip-components=1
+tar xvf $build_dir/cmake/cmake.tar.gz -C $build_dir/cmake/src --strip-components=1
+tar xvf $build_dir/vtk/vtk.tar.gz -C $build_dir/vtk/src --strip-components=1
+tar xvf $build_dir/itk/itk.tar.xz -C $build_dir/itk/src --strip-components=1
+
+## -- Configure, build and install Qt5
+cd $build_dir/qt5/bin
+$build_dir/qt5/src/configure \
+ -prefix $prefix -shared -confirm-license -opensource -release \
+ -c++std c++11 -opengl desktop \
+ -nomake examples -nomake tests -no-harfbuzz \
+ -qt-xcb -qt-xkbcommon -qt-pcre
+make -s -j$cores -k
+make -s -j -k install
+
+## -- Configure, build and install Qt5Extras
+cd $build_dir/qt5extras/bin
+$prefix/bin/qmake $build_dir/qt5extras/src
+make -s -j$cores -k
+make -s -j -k install
-# ## -- Configure, build and install Qt5
-# mkdir -p $build_dir/qt
-# cd $build_dir/qt
-# $qt/configure \
-# -prefix $prefix -shared -confirm-license -opensource -release \
-# -c++std c++11 -opengl desktop \
-# -nomake examples -nomake tests -no-harfbuzz \
-# -qt-xcb -qt-xkbcommon -qt-pcre \
-# -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity \
-# -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad \
-# -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation \
-# -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing \
-# -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript \
-# -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \
-# -skip qtspeech -skip qtsvg -skip qttranslations -skip qtvirtualkeyboard \
-# -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets \
-# -skip qtwebview -skip qtxmlpatterns
-# make -s -j$cores -k
-# make -s -j -k install
+## -- Configure, build and install Qt5Tools
+cd $build_dir/qt5tools/bin
+$prefix/bin/qmake $build_dir/qt5tools/src
+make -s -j$cores -k
+make -s -j -k install
-# ## -- Configure, build and install CMake
-# mkdir -p $build_dir/cmake
-# cd $build_dir/cmake
-# $cmake/bootstrap --parallel=$cores --prefix=$prefix --no-qt-gui
-# make -s -j$cores -k
-# make -s -j -k install
+## -- Configure, build and install CMake
+cd $build_dir/cmake/bin
+$build_dir/cmake/src/bootstrap \
+ --parallel=$cores --prefix=$prefix --no-qt-gui
+make -s -j$cores -k
+make -s -j -k install
-# ## -- Configure, build and install VTK
-# cd $vtk
-# patch -s -p1 < $curr_dir/vtk.patch
-# mkdir -p $build_dir/vtk
-# cd $build_dir/vtk
-# $prefix/bin/cmake \
-# -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
-# -DBUILD_SHARED_LIBS:BOOL=ON \
-# -DCMAKE_BUILD_TYPE:STRING=Release \
-# -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-# -DBUILD_DOCUMENTATION:BOOL=OFF \
-# -DBUILD_EXAMPLES:BOOL=OFF \
-# -DBUILD_TESTING:BOOL=OFF \
-# -DVTK_Group_Qt:BOOL=ON \
-# -DVTK_QT_VERSION:STRING=5 \
-# -DQt5_DIR:PATH=$prefix/lib/cmake/Qt5 \
-# -DQT_QMAKE_EXECUTABLE:PATH=$prefix/bin/qmake \
-# -DModule_vtkGUISupportQtOpenGL:BOOL=ON \
-# -DCMAKE_MACOSX_RPATH:BOOL=ON \
-# $vtk
-# make -s -j$cores -k
-# use_vtk=`make -j -k -s install | grep UseVTK | sed 's/.*: //'`
+## -- Configure, build and install VTK
+cd $build_dir/vtk/bin
+$prefix/bin/cmake \
+ -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DVTK_USE_CXX11_FEATURES:BOOL=ON \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DVTK_Group_Qt:BOOL=ON \
+ -DVTK_QT_VERSION:STRING=5 \
+ -DQt5_DIR:PATH=$prefix/lib/cmake/Qt5 \
+ -DVTK_Group_Qt:BOOL=ON \
+ -DCMAKE_MACOSX_RPATH:BOOL=ON \
+ $build_dir/vtk/src
+make -s -j$cores -k
+use_vtk=`make -j -k -s install | grep UseVTK | sed 's/.*: //'`
-# ## -- Configure, build and install VTK
-# mkdir -p $build_dir/itk
-# cd $build_dir/itk
-# $prefix/bin/cmake \
-# -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
-# -DBUILD_SHARED_LIBS:BOOL=ON \
-# -DCMAKE_BUILD_TYPE:STRING=Release \
-# -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-# -DBUILD_DOCUMENTATION:BOOL=OFF \
-# -DBUILD_EXAMPLES:BOOL=OFF \
-# -DBUILD_TESTING:BOOL=OFF \
-# -DVTK_DIR:PATH=`dirname $use_vtk` \
-# -DModule_ITKReview:BOOL=ON \
-# -DModule_ITKVtkGlue:BOOL=ON \
-# -DCMAKE_MACOSX_RPATH:BOOL=ON \
-# $itk
-# make -s -j$cores -k
-# make -s -j -k install
+## -- Configure, build and install VTK
+cd $build_dir/itk/bin
+$prefix/bin/cmake \
+ -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DVTK_DIR:PATH=`dirname $use_vtk` \
+ -DModule_ITKReview:BOOL=ON \
+ -DModule_ITKVtkGlue:BOOL=ON \
+ -DCMAKE_MACOSX_RPATH:BOOL=ON \
+ $build_dir/itk/src
+make -s -j$cores -k
+make -s -j -k install
-# ## -- End
-# cd $curr_dir
+## -- End
+cd $curr_dir
## eof - $RCSfile$