Commit b5bc9853 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

Ensure module files are generated in the build tree

The ExternalMoleculeMacros should ensure that the module data files are
generated in the build tree of the external module, rather than
polluting the VTK tree they are building against. This relies on the
vtkModuleAPI using CMAKE_MODULE_PATH for the original module files.

Change-Id: If134458e014d29f2cd432e2f9248b5c13b50c96b
parent bc51f8e3
......@@ -42,8 +42,12 @@ endif()
if(NOT VTK_INSTALL_EXPORT_NAME)
set(VTK_INSTALL_EXPORT_NAME VTKTargets)
endif()
if(NOT VTK_MODULES_DIR)
set(VTK_MODULES_DIR "${VTK_BINARY_DIR}/${VTK_INSTALL_PACKAGE_DIR}/Modules")
# Add the VTK_MODULES_DIR to the CMAKE_MODULE_PATH and then use the binary
# directory for the project to write out new ones to.
if(VTK_MODULES_DIR)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTK_MODULES_DIR})
endif()
set(VTK_MODULES_DIR "${CMAKE_BINARY_DIR}/${VTK_INSTALL_PACKAGE_DIR}/Modules")
include(vtkModuleMacros)
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