-
Notifications
You must be signed in to change notification settings - Fork 4
/
build-vtk.cmake
32 lines (27 loc) · 1.17 KB
/
build-vtk.cmake
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
set(CTEST_BUILD_NAME "$ENV{SGEN}-vtk")
set(CTEST_SITE "$ENV{COMPUTERNAME}")
set(VER "$ENV{VTK_VER}")
set(CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/lib/src/VTK-${VER}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/lib/build/vtk-${VER}/${CONF_DIR}")
set(BUILD_OPTIONS
-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_SCRIPT_DIRECTORY}/lib/install/vtk-${VER}/${CONF_DIR}
-DModule_vtkGUISupportQt:BOOL=ON
-DModule_vtkGUISupportQtOpenGL:BOOL=ON
-DModule_vtkRenderingQt:BOOL=ON
-DModule_vtkViewsQt:BOOL=ON
-DVTK_QT_VERSION:STRING=5
)
if("${CONF_DIR}" STREQUAL "debug-vtk-leaks")
list(APPEND BUILD_OPTIONS "-DVTK_DEBUG_LEAKS:BOOL=ON")
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(PREFIX_PATH "$ENV{HOME}/Qt5.5.1/5.5/gcc_64")
list(APPEND BUILD_OPTIONS "-DCMAKE_PREFIX_PATH:PATH=${PREFIX_PATH}")
list(APPEND BUILD_OPTIONS "-DCMAKE_C_FLAGS:STRING=-DGLX_GLXEXT_LEGACY")
list(APPEND BUILD_OPTIONS "-DCMAKE_CXX_FLAGS:STRING=-DGLX_GLXEXT_LEGACY")
endif()
CTEST_START("Experimental")
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}"
OPTIONS "${BUILD_OPTIONS}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" TARGET install)