workspace(name = "drake")

load("//:cmake/external/workspace/conversion.bzl", "split_cmake_list")
load("//tools/workspace/python:repository.bzl", "python_repository")
load("//tools/workspace:default.bzl", "add_default_workspace")

# Use Drake's python repository rule to interrogate the interpreter chosen by
# the CMake find_program stanza, in support of compiling our C++ bindings.
python_repository(
    name = "python",
    linux_interpreter_path = "@Python_EXECUTABLE@",
    macos_interpreter_path = "@Python_EXECUTABLE@",
)

# Custom repository rules injected by CMake.
@BAZEL_WORKSPACE_EXTRA@

# The list of repositories already provided via BAZEL_WORKSPACE_EXTRA.
_BAZEL_WORKSPACE_EXCLUDES = split_cmake_list("@BAZEL_WORKSPACE_EXCLUDES@")

# For anything not already overridden, use Drake's default externals.
add_default_workspace(
    repository_excludes = ["python"] + _BAZEL_WORKSPACE_EXCLUDES,
)

load("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure")

apple_cc_configure()
