build_cgo_hack.go 615 B

12345678910111213141516
  1. // +build required
  2. package gl
  3. // This file exists purely to prevent the golang toolchain from stripping
  4. // away the c source directories and files when `go mod vendor` is used
  5. // to populate a `vendor/` directory of a project depending on `go-gl/go`.
  6. //
  7. // How it works:
  8. // - every directory which only includes c source files receives a dummy.go file.
  9. // - every directory we want to preserve is included here as a _ import.
  10. // - this file is given a build tag to exclude it from the regular build.
  11. import (
  12. // Prevent go tooling from stripping out the c source files.
  13. _ "github.com/go-gl/gl/v2.1/gl/KHR"
  14. )