Skip to content

Commit

Permalink
WIP apple
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri committed Aug 7, 2023
1 parent 006c244 commit 1ea1003
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build --incompatible_load_python_rules_from_bzl=yes
build -c opt

# Default build options.
build --force_pic
# build --force_pic
build --strip=never
build --strict_system_includes

Expand Down
23 changes: 23 additions & 0 deletions tools/workspace/vtk_internal/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ config_setting(
constraint_values = ["@platforms//os:osx"],
)

objc_library(
name = "rendering_opengl2_vtkCocoaRenderWindow",
non_arc_srcs = [
"Rendering/OpenGL2/vtkCocoaGLView.mm",
"Rendering/OpenGL2/vtkCocoaRenderWindow.mm",
],
hdrs = [
"Rendering/OpenGL2/vtkCocoaGLView.h",
"Rendering/OpenGL2/vtkCocoaRenderWindow.h",
"Rendering/OpenGL2/vtkOpenGLRenderWindow.h",
"Rendering/OpenGL2/vtkOpenGLState.h",
"Rendering/OpenGL2/vtkOpenGLVertexBufferObjectCache.h",
"Rendering/OpenGL2/vtkRenderingOpenGL2Module.h",
],
includes = ["Rendering/OpenGL2"],
sdk_frameworks = ["Cocoa"],
copts = ["-w"],
deps = [
":VTK__RenderingUI",
":VTK__glew",
],
)

# Generate some source files on the fly, using Bazel re-implementations of
# various CMake scripts.

Expand Down
8 changes: 5 additions & 3 deletions tools/workspace/vtk_internal/settings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ MODULE_SETTINGS = {
],
"srcs_extra": select({
":osx": [
"Rendering/OpenGL2/vtkCocoaGLView.mm",
"Rendering/OpenGL2/vtkCocoaRenderWindow.mm",
# "Rendering/OpenGL2/vtkCocoaGLView.mm",
# "Rendering/OpenGL2/vtkCocoaRenderWindow.mm",
],
"//conditions:default": [
"Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx",
Expand All @@ -355,7 +355,9 @@ MODULE_SETTINGS = {
"@drake//tools/workspace/vtk_internal:gen/vtkRenderingOpenGL2ObjectFactory.cxx", # noqa
],
"deps_extra": select({
":osx": [],
":osx": [
":rendering_opengl2_vtkCocoaRenderWindow",
],
"//conditions:default": [
# Mimic vtk_module_link(VTK::RenderingOpenGL2 PUBLIC X11::X11).
"@x11",
Expand Down

0 comments on commit 1ea1003

Please sign in to comment.