Commit dececfb4 authored by Ken Martin's avatar Ken Martin

cleanup and expose some options for ios android

remove some old code expose a couple options andmake the
compile tools build into a different directory as it
does not need to be wiped as often. Also remove
the install step for the compile tools as it is not needed.
parent 94c297a1
Pipeline #6007 passed with stage
......@@ -68,20 +68,20 @@ macro(compile_vtk_tools)
ExternalProject_Add(
vtk-compile-tools
SOURCE_DIR ${CMAKE_SOURCE_DIR}
PREFIX ${PREFIX_DIR}/vtk-compile-tools
BINARY_DIR ${BUILD_DIR}/vtk-compile-tools
PREFIX ${CMAKE_BINARY_DIR}/CompileTools
BINARY_DIR ${CMAKE_BINARY_DIR}/CompileTools
INSTALL_COMMAND ""
${VTK_BUILD_COMMAND} vtkCompileTools
${BUILD_ALWAYS_STRING}
INSTALL_DIR ${INSTALL_DIR}/vtk-compile-tools
CMAKE_ARGS
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DVTK_BUILD_ALL_MODULES:BOOL=OFF
-DVTK_Group_Rendering:BOOL=OFF
-DVTK_Group_StandAlone:BOOL=ON
-DVTK_Group_StandAlone:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/vtk-compile-tools
-DModule_vtkUtilitiesEncodeString:BOOL=ON
)
endmacro()
compile_vtk_tools()
......@@ -157,7 +157,7 @@ macro(crosscompile target toolchain_file)
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_TOOLCHAIN_FILE:PATH=CMake/${toolchain_file}
-DANDROID_NDK:PATH=${ANDROID_NDK}
-DVTKCompileTools_DIR:PATH=${BUILD_DIR}/vtk-compile-tools
-DVTKCompileTools_DIR:PATH=${CMAKE_BINARY_DIR}/CompileTools
${android_cmake_flags}
)
endmacro()
......
......@@ -51,20 +51,20 @@ macro(compile_vtk_tools)
ExternalProject_Add(
vtk-compile-tools
SOURCE_DIR ${CMAKE_SOURCE_DIR}
PREFIX ${PREFIX_DIR}/vtk-compile-tools
BINARY_DIR ${BUILD_DIR}/vtk-compile-tools
PREFIX ${CMAKE_BINARY_DIR}/CompileTools
BINARY_DIR ${CMAKE_BINARY_DIR}/CompileTools
INSTALL_COMMAND ""
${VTK_BUILD_COMMAND} vtkCompileTools
${BUILD_ALWAYS_STRING}
INSTALL_DIR ${INSTALL_DIR}/vtk-compile-tools
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DVTK_BUILD_ALL_MODULES:BOOL=OFF
-DVTK_Group_Rendering:BOOL=OFF
-DVTK_Group_StandAlone:BOOL=ON
-DVTK_Group_StandAlone:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/vtk-compile-tools
-DModule_vtkUtilitiesEncodeString:BOOL=ON
)
endmacro()
compile_vtk_tools()
......@@ -81,12 +81,21 @@ mark_as_advanced(
)
# expose some module options
option(Module_vtkRenderingOpenGL2 "Include Polygonal Rendering Support" ON)
# add volume rendering option for ES 3.0
if (OPENGL_ES_VERSION STREQUAL "3.0" AND Module_vtkRenderingOpenGL2)
option(Module_vtkRenderingVolumeOpenGL2 "Include Volume Rendering Support" ON)
endif()
mark_as_advanced(Module_${vtk-module})
# Now cross-compile VTK with custom toolchains
set(ios_cmake_flags
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
-DVTK_RENDERING_BACKEND:STRING=OpenGL2
-DOPENGL_ES_VERSION:STRING=${OPENGL_ES_VERSION}
-DVTK_Group_Rendering:BOOL=OFF
-DVTK_Group_StandAlone:BOOL=OFF
......@@ -96,26 +105,29 @@ set(ios_cmake_flags
-DVTK_Group_Qt:BOOL=OFF
-DVTK_Group_Tk:BOOL=OFF
-DVTK_Group_Web:BOOL=OFF
-DModule_vtkFiltersCore:BOOL=ON
-DModule_vtkFiltersModeling:BOOL=ON
-DModule_vtkFiltersSources:BOOL=ON
-DModule_vtkFiltersGeometry:BOOL=ON
-DModule_vtkIOGeometry:BOOL=ON
-DModule_vtkIOLegacy:BOOL=ON
-DModule_vtkIOImage:BOOL=ON
-DModule_vtkIOPLY:BOOL=ON
-DModule_vtkIOInfovis:BOOL=ON
-DModule_vtkImagingCore:BOOL=ON
-DModule_vtkInteractionStyle:BOOL=ON
-DModule_vtkParallelCore:BOOL=ON
-DModule_vtkRenderingCore:BOOL=ON
# -DModule_vtkFiltersCore:BOOL=ON
# -DModule_vtkFiltersModeling:BOOL=ON
# -DModule_vtkFiltersSources:BOOL=ON
# -DModule_vtkFiltersGeometry:BOOL=ON
# -DModule_vtkIOGeometry:BOOL=ON
# -DModule_vtkIOLegacy:BOOL=ON
# -DModule_vtkIOImage:BOOL=ON
# -DModule_vtkIOPLY:BOOL=ON
# -DModule_vtkIOInfovis:BOOL=ON
# -DModule_vtkImagingCore:BOOL=ON
# -DModule_vtkInteractionStyle:BOOL=ON
# -DModule_vtkParallelCore:BOOL=ON
-DModule_vtkRenderingFreeType:BOOL=OFF
-DModule_vtkRenderingOpenGL2:BOOL=${Module_vtkRenderingOpenGL2}
)
# add volume rendering for ES 3.0
if (OPENGL_ES_VERSION STREQUAL "3.0")
set(ios_cmake_flags ${ios_cmake_flags}
-DModule_vtkRenderingVolumeOpenGL2:BOOL=ON
if (Module_vtkRenderingOpenGL2)
set (ios_cmake_flags ${ios_cmake_flags}
-DVTK_RENDERING_BACKEND:STRING=OpenGL2
)
else()
set (ios_cmake_flags ${ios_cmake_flags}
-DVTK_RENDERING_BACKEND:STRING=None
)
endif()
......@@ -133,7 +145,7 @@ macro(crosscompile target toolchain_file archs)
-DCMAKE_OSX_ARCHITECTURES:STRING=${archs}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${toolchain_file}
-DVTKCompileTools_DIR:PATH=${BUILD_DIR}/vtk-compile-tools
-DVTKCompileTools_DIR:PATH=${CMAKE_BINARY_DIR}/CompileTools
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target}
${ios_cmake_flags}
)
......
......@@ -138,18 +138,6 @@ if (ANDROID OR APPLE_IOS)
SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT ""
CACHE STRING "Output from TRY_RUN" FORCE)
option(BUILD_SHARED_LIBS "should be off for embedded" OFF)
set(VTK_RENDERING_BACKEND OpenGL2)
set(Module_vtkRenderingCore ON)
option(VTK_Group_Rendering "off for embedded" OFF)
option(VTK_Group_StandAlone "off for embedded" OFF)
option(VTK_Group_Imaging "off for embedded" OFF)
option(VTK_Group_MPI "off for embedded" OFF)
option(VTK_Group_Views "off for embedded" OFF)
option(VTK_Group_Qt "off for embedded" OFF)
option(VTK_Group_Tk "off for embedded" OFF)
option(VTK_Group_Web "off for embedded" OFF)
# need int version for CPP
if (${OPENGL_ES_VERSION} MATCHES 2.0)
set(OPENGL_ES_VERSION_INT 20)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment