Skip to content
Snippets Groups Projects
Commit 201c605d authored by David Thompson's avatar David Thompson Committed by Ricardo Ortiz
Browse files

Pass `VTK_DIR` to SimMedTK build from superbuild.

If `SimMedTK_VTK_DIR` is defined, its value is used for `VTK_DIR`.
Otherwise, we ask CMake to find VTK and pass whatever it returns
from the superbuild to the SimMedTK build.
parent 7c87dea8
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,15 @@ endif(WIN32)
#
SET(proj SimMedTK-Configure)
if (NOT SimMedTK_VTK_DIR)
find_package(VTK REQUIRED)
mark_as_advanced(SimMedTK_VTK_DIR)
set(SimMedTK_VTK_DIR ${VTK_DIR})
endif()
list(APPEND SimMedTK_SUPERBUILD_CMAKE_OPTIONS
"-DVTK_DIR:FILEPATH=${SimMedTK_VTK_DIR}"
)
ExternalProject_Add(${proj}
DOWNLOAD_COMMAND ""
CMAKE_GENERATOR ${gen}
......@@ -171,6 +180,7 @@ ExternalProject_Add(${proj}
CMAKE_ARGS
${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
${CMAKE_MSVC_EXTERNAL_PROJECT_ARGS}
${SimMedTK_SUPERBUILD_CMAKE_OPTIONS}
-DSimMedTK_SUPERBUILD:BOOL=OFF
# -DSimMedTK_SUPERBUILD_BINARY_DIR:PATH=${SimMedTK_BINARY_DIR}
# -DSimMedTK_INSTALL_BIN_DIR:STRING=${SimMedTK_INSTALL_BIN_DIR}
......
......@@ -169,6 +169,7 @@ find_package(Assimp REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(VegaFEM REQUIRED CONFIG)
find_package(ThreadPool REQUIRED)
find_package(VTK REQUIRED)
if(SimMedTK_USE_OCULUS)
find_package(Oculus REQUIRED)
......
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
simmedtk_add_library(VtkRendering
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment