Commit 261de750 authored by Alexis Girault's avatar Alexis Girault

ENH: Add VegaFEM as external project

parent 6bcaff44
......@@ -25,6 +25,7 @@ imstk_add_library( Geometry
imstkHexahedralMesh.cpp
LIBRARIES
Core
VegaFEM::volumetricMesh
)
#-----------------------------------------------------------------------------
......
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( VegaFEM
REPOSITORY git@gitlab.kitware.com:iMSTK/VegaFEM-CMake.git
GIT_TAG simmedtk
CMAKE_ARGS
-DVegaFEM_ENABLE_PTHREADS_SUPPORT:BOOL=ON
-DVegaFEM_ENABLE_OpenGL_SUPPORT:BOOL=OFF
-DVegaFEM_BUILD_MODEL_REDUCTION:BOOL=OFF
-DVegaFEM_BUILD_UTILITIES:BOOL=ON
DEPENDENCIES ""
VERBOSE
)
......@@ -2,7 +2,7 @@ macro(imstk_add_external_project extProj)
set(options VERBOSE)
set(oneValueArgs REPOSITORY GIT_TAG)
set(multiValueArgs DEPENDENCIES)
set(multiValueArgs CMAKE_ARGS DEPENDENCIES)
include(CMakeParseArguments)
cmake_parse_arguments(${extProj} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
......@@ -45,6 +45,8 @@ macro(imstk_add_external_project extProj)
set(${extProj}_SOURCE_DIR ${CMAKE_BINARY_DIR}/External/${extProj}/src)
set(${extProj}_PREFIX_DIR ${CMAKE_BINARY_DIR}/External/${extProj}/cmake)
set(${extProj}_DIR ${CMAKE_BINARY_DIR}/External/${extProj}/build-${CMAKE_BUILD_TYPE})
set(${extProj}_INCLUDE_PATH ${${extProj}_DIR}/include)
set(${extProj}_LIBRARY_PATH ${${extProj}_DIR}/library)
#-----------------------------------------------------------------------------
# Add project
......@@ -61,6 +63,9 @@ macro(imstk_add_external_project extProj)
CMAKE_ARGS
${CMAKE_CONFIG_ARGS}
${CMAKE_CONFIG_OSX_ARGS}
${${extProj}_CMAKE_ARGS}
-DCMAKE_INCLUDE_PATH:STRING=${${extProj}_INCLUDE_PATH}
-DCMAKE_LIBRARY_PATH:STRING=${${extProj}_LIBRARY_PATH}
#-DBUILD_SHARED_LIBS:BOOL=${shared}
#-DBUILD_EXAMPLES:BOOL=OFF
#-DBUILD_TESTING:BOOL=OFF
......
......@@ -75,6 +75,11 @@ 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)
#-----------------------------------------------------------------------------
# SUPERBUILD
#-----------------------------------------------------------------------------
......@@ -106,6 +111,9 @@ include(SetupUncrustifyConfig)
find_package( Eigen 3.1.2 REQUIRED )
include_directories( ${Eigen_INCLUDE_DIR} )
# VegaFEM
find_package( VegaFEM REQUIRED CONFIG)
#--------------------------------------------------------------------------
# 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