content: [build-system]
  requires = [
      "scikit-build-core",
      "nanobind==2.9.2"
  ]
  build-backend = "scikit_build_core.build"
  
  
  [project]
  name = "nanogui"
  dynamic = ["version"]
  description = "A minimalistic GUI library for OpenGL, GLES 2, and Metal"
  readme = "README.rst"
  requires-python = ">=3.8"
  authors = [
      { name = "Wenzel Jakob", email = "wenzel.jakob@epfl.ch" }
  ]
  license = { text = "BSD" }
  classifiers = [
      "Development Status :: 4 - Beta",
      "Intended Audience :: Developers",
      "License :: OSI Approved :: BSD License",
      "Programming Language :: C++",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3.8",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Topic :: Software Development :: Libraries :: Python Modules",
      "Topic :: Software Development :: User Interfaces"
  ]
  
  [project.urls]
  Homepage = "https://github.com/mitsuba-renderer/nanogui"
  Repository = "https://github.com/mitsuba-renderer/nanogui"
  Issues = "https://github.com/mitsuba-renderer/nanogui/issues"
  
  
  [tool.scikit-build]
  minimum-version = "0.4"
  build-dir = "build/{wheel_tag}"
  cmake.verbose = true
  logging.level = "INFO"
  wheel.py-api = "cp312"
  
  cmake.args = [
      "-DCMAKE_INSTALL_LIBDIR=nanogui",
      "-DCMAKE_INSTALL_BINDIR=nanogui",
      "-DCMAKE_INSTALL_INCLUDEDIR=nanogui/include",
      "-DCMAKE_INSTALL_DATAROOTDIR=nanogui/share",
      "-DNANOGUI_BUILD_EXAMPLES=OFF"
  ]
  
  wheel.packages = ["nanogui"]
  
  
  [tool.scikit-build.metadata.version]
  provider = "scikit_build_core.metadata.regex"
  input = "include/nanogui/common.h"
  regex = '''(?sx)
  \#define \s+ NANOGUI_VERSION_MAJOR \s+ (?P<major>\d+) .*?
  \#define \s+ NANOGUI_VERSION_MINOR \s+ (?P<minor>\d+) .*?
  \#define \s+ NANOGUI_VERSION_PATCH \s+ (?P<patch>\d+) .*?
  '''
  result = "{major}.{minor}.{patch}"
  
  
  [tool.cibuildwheel]
  build-verbosity = 1
  build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
  skip = "*-musllinux* pp*"
  test-command = "python -c \"import nanogui\""
  
  # Platform-specific settings
  [tool.cibuildwheel.linux]
  archs = ["auto64"]
  manylinux-x86_64-image = "manylinux_2_28"
  manylinux-aarch64-image = "manylinux_2_28"
  before-build = "yum install -y mesa-libGLU-devel libXi-devel libXcursor-devel libXinerama-devel libXrandr-devel xorg-x11-server-devel libxkbcommon-devel wayland-devel dbus-devel kernel-headers"
  environment = { CFLAGS="-D_GNU_SOURCE", CXXFLAGS="-D_GNU_SOURCE" }
  
  [tool.cibuildwheel.windows]
  archs = ["auto64"]
  
  [tool.cibuildwheel.macos]
  environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
  