Commit d943052d authored by Alexis Girault's avatar Alexis Girault

ENH: Add VTK as external project

parent df756c9f
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( VTK
REPOSITORY ${git_protocol}://github.com/Kitware/VTK.git
GIT_TAG v7.0.0
CMAKE_ARGS
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DVTK_Group_StandAlone:BOOL=OFF
-DVTK_Group_Rendering:BOOL=OFF
-DModule_vtkRenderingOpenGL2:BOOL=ON
-DModule_vtkIOXML:BOOL=ON
-DModule_vtkIOLegacy:BOOL=ON
-DModule_vtkIOPLY:BOOL=ON
-DModule_vtkInteractionStyle:BOOL=ON
-DModule_vtkRenderingAnnotation:BOOL=ON
-DModule_vtkInteractionWidgets:BOOL=ON
-DModule_vtkglew:BOOL=ON
-DModule_vtkRenderingContext2D:BOOL=ON
-DVTK_RENDERING_BACKEND:STRING=OpenGL2
-DVTK_WRAP_PYTHON:BOOL=OFF
DEPENDENCIES ""
#VERBOSE
)
......@@ -11,5 +11,5 @@ imstk_add_external_project( VegaFEM
-DVegaFEM_BUILD_MODEL_REDUCTION:BOOL=OFF
-DVegaFEM_BUILD_UTILITIES:BOOL=ON
DEPENDENCIES ""
VERBOSE
#VERBOSE
)
......@@ -28,7 +28,7 @@ endmacro(_eigen_check_version)
#-----------------------------------------------------------------------------
set(Eigen_INCLUDE_DIR ${Eigen_SOURCE_DIR})
mark_as_advanced(Eigen_INCLUDE_DIR)
message(STATUS "Eigen_INCLUDE_DIR : ${Eigen_INCLUDE_DIR}")
#message(STATUS "Eigen_INCLUDE_DIR : ${Eigen_INCLUDE_DIR}")
#-----------------------------------------------------------------------------
# Macro checking version
......
......@@ -9,7 +9,7 @@ find_path(g3log_INCLUDE_DIR
${g3log_SOURCE_DIR}/src
)
mark_as_advanced(g3log_INCLUDE_DIR)
message(STATUS "g3log_INCLUDE_DIR : ${g3log_INCLUDE_DIR}")
#message(STATUS "g3log_INCLUDE_DIR : ${g3log_INCLUDE_DIR}")
#-----------------------------------------------------------------------------
# Find library
......@@ -21,7 +21,7 @@ find_library(g3log_LIBRARY
${g3log_DIR}
)
mark_as_advanced(g3log_LIBRARY)
message(STATUS "g3log_LIBRARY : ${g3log_LIBRARY}")
#message(STATUS "g3log_LIBRARY : ${g3log_LIBRARY}")
#-----------------------------------------------------------------------------
# Find package
......
......@@ -60,25 +60,17 @@ endif()
#-----------------------------------------------------------------------------
# Define External dependencies
#-----------------------------------------------------------------------------
# g3log
list(APPEND ${PROJECT_NAME}_DEPENDENCIES g3log)
option(USE_SYSTEM_g3log "Exclude g3log from superbuild and use an existing build." OFF)
mark_as_advanced(USE_SYSTEM_g3log)
# Uncrustify
list(APPEND ${PROJECT_NAME}_DEPENDENCIES Uncrustify)
option(USE_SYSTEM_Uncrustify "Exclude Uncrustify from superbuild and use an existing build." OFF)
mark_as_advanced(USE_SYSTEM_Uncrustify)
macro(imstk_define_dependency extProj)
list(APPEND ${PROJECT_NAME}_DEPENDENCIES ${extProj})
option(USE_SYSTEM_${extProj} "Exclude ${extProj} from superbuild and use an existing build." OFF)
mark_as_advanced(USE_SYSTEM_${extProj})
endmacro()
# Eigen
list(APPEND ${PROJECT_NAME}_DEPENDENCIES Eigen)
option(USE_SYSTEM_Eigen "Exclude Eigen from superbuild and use an existing build." OFF)
mark_as_advanced(USE_SYSTEM_Eigen)
# VegaFEM
list(APPEND ${PROJECT_NAME}_DEPENDENCIES VegaFEM)
option(USE_SYSTEM_VegaFEM "Exclude VegaFEM from superbuild and use an existing build." OFF)
mark_as_advanced(USE_SYSTEM_VegaFEM)
imstk_define_dependency(g3log)
imstk_define_dependency(Uncrustify)
imstk_define_dependency(Eigen)
imstk_define_dependency(VegaFEM)
imstk_define_dependency(VTK)
#-----------------------------------------------------------------------------
# SUPERBUILD
......@@ -112,7 +104,11 @@ find_package( Eigen 3.1.2 REQUIRED )
include_directories( ${Eigen_INCLUDE_DIR} )
# VegaFEM
find_package( VegaFEM REQUIRED CONFIG)
find_package( VegaFEM REQUIRED CONFIG )
# VTK
find_package( VTK REQUIRED )
include( ${VTK_USE_FILE} )
#--------------------------------------------------------------------------
# Add Source code subdirectories
......
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