Skip to content
/ VTK Public
forked from Kitware/VTK

Commit 0ba7af6

Browse files
jcfrmathstuf
andcommitted
[Backport MR-8123] vtk_module_build: Ensure external modules build directory are not overwritten
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
1 parent 8003cdf commit 0ba7af6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMake/vtkModule.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,9 @@ function (vtk_module_build)
25462546
# The following logic ensures files are not generated in VTK source for case (3) and (4):
25472547
set(_vtk_build_module_binary_dir "${_vtk_build_module_absolute_binary_dir}")
25482548
if (_vtk_build_module_absolute_source_dir STREQUAL _vtk_build_module_absolute_binary_dir)
2549-
set(_vtk_build_module_binary_dir "${CMAKE_BINARY_DIR}-external")
2549+
get_property(_vtk_module_library_name GLOBAL
2550+
PROPERTY "_vtk_module_${_vtk_build_module}_library_name")
2551+
set(_vtk_build_module_binary_dir "${CMAKE_BINARY_DIR}/externals/${_vtk_module_library_name}")
25502552
endif ()
25512553

25522554
add_subdirectory(

0 commit comments

Comments
 (0)