generated from DARMA-tasking/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
795d411
commit 040b06a
Showing
3 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# This script builds vtk using Mesa | ||
|
||
set -ex | ||
|
||
. /etc/lsb-release | ||
VTK_OPENGL_HAS_OSMESA=ON | ||
VTK_USE_X=OFF | ||
VTK_SRC_DIR=${VTK_SRC_DIR:-"/opt/src/vtk"} | ||
VTK_DIR=${VTK_DIR:-"/opt/build/vtk"} | ||
|
||
mkdir -p $VTK_DIR | ||
pushd $VTK_DIR | ||
|
||
# Issue with Ubuntu 24.04 / OSMESA : glew build error. Use X instead. | ||
if [ "$DISTRIB_ID" == "Ubuntu" -a "$DISTRIB_RELEASE" == "24.04" ]; then | ||
echo "Disabling VTK_OPENGL_HAS_OSMESA (not supported in Ubuntu 24.04). Using DVTK_USE_X instead." | ||
VTK_OPENGL_HAS_OSMESA=OFF | ||
VTK_USE_X=ON | ||
fi | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DBUILD_TESTING:BOOL=OFF \ | ||
-DVTK_OPENGL_HAS_OSMESA:BOOL=$VTK_OPENGL_HAS_OSMESA \ | ||
-DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN:BOOL=ON \ | ||
-DVTK_USE_X:BOOL=$VTK_USE_X \ | ||
-DVTK_USE_WIN32_OPENGL:BOOL=OFF \ | ||
-DVTK_USE_COCOA:BOOL=OFF \ | ||
-DVTK_USE_SDL2:BOOL=OFF \ | ||
-DVTK_Group_Rendering:BOOL=OFF \ | ||
-DBUILD_SHARED_LIBS:BOOL=ON \ | ||
-S "$VTK_SRC_DIR" -B "$VTK_DIR" | ||
cmake --build "$VTK_DIR" -j$(nproc) | ||
|
||
echo "VTK build success" | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters