Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools] Switch stl2obj to use VTK built from source #20084

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manipulation/util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ drake_cc_binary(
"//common:add_text_logging_gflags",
"//common:essential",
"@gflags",
"@vtk//:vtkFiltersCore",
"@vtk//:vtkIOGeometry",
"@vtk_internal//:vtkFiltersCore",
"@vtk_internal//:vtkIOGeometry",
],
)

Expand Down
62 changes: 62 additions & 0 deletions tools/workspace/vtk_internal/settings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,54 @@ MODULE_SETTINGS = {
"VTK::CommonTransforms": {
# This isn't used directly by Drake, but is used by other VTK modules.
},
"VTK::FiltersCore": {
"visibility": ["//visibility:public"],
# This module has a lot of code we don't need. We'll opt-out of the
# default srcs glob, and instead just specify what Drake needs.
"srcs_glob_exclude": ["**"],
"srcs_extra": [
"Filters/Core/vtkAppendPolyData.cxx",
"Filters/Core/vtkDecimatePro.cxx",
"Filters/Core/vtkGlyph3D.cxx",
"Filters/Core/vtkPolyDataNormals.cxx",
"Filters/Core/vtkPolyDataTangents.cxx",
"Filters/Core/vtkTriangleFilter.cxx",
],
},
"VTK::IOCore": {
"srcs_glob_exclude": [
# Skip code we don't need.
"**/*Codec*",
"**/*Particle*",
"**/*Java*",
"**/*UTF*",
# Skip this to avoid a dependency on lz4.
"**/*LZ4*",
# Skip this to avoid a dependency on lzma.
"**/*LZMA*",
],
"module_deps_ignore": [
"VTK::lz4",
"VTK::lzma",
],
},
"VTK::IOGeometry": {
"visibility": ["//visibility:public"],
# This module has a lot of code we don't need. We'll opt-out of the
# default srcs glob, and instead just specify what Drake needs.
"srcs_glob_exclude": ["**"],
"srcs_extra": [
"IO/Geometry/vtkOBJWriter.cxx",
"IO/Geometry/vtkSTLReader.cxx",
],
"module_deps_ignore": [
"VTK::IOLegacy",
"VTK::FiltersGeneral",
"VTK::FiltersHybrid",
"VTK::RenderingCore",
"VTK::nlohmannjson",
],
},
"VTK::IOImage": {
"visibility": ["//visibility:public"],
# This module has a lot of code we don't need. We'll opt-out of the
Expand Down Expand Up @@ -300,6 +348,20 @@ MODULE_SETTINGS = {

# Fourth, we'll configure dependencies that we let VTK build and vendor on
# its own, because nothing else in Drake needs these.
"VTK::doubleconversion": {
"cmake_undefines": [
"VTK_MODULE_USE_EXTERNAL_vtkdoubleconversion",
],
"hdrs_content": {
"ThirdParty/doubleconversion/vtkdoubleconversion_export.h": """
#pragma once
#define VTKDOUBLECONVERSION_EXPORT
""",
},
"srcs_glob_extra": [
"ThirdParty/doubleconversion/**/*.cc",
],
},
"VTK::pugixml": {
# TODO(jwnimmer-tri) The only user of pugixml is vtkDataAssembly.
# Possibly there is some way to disable XML I/O support on that
Expand Down