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

fix: go mod vendor #280

Merged
merged 5 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 17 additions & 0 deletions v3.3/glfw/build_cgo_hack.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// +build required

package glfw

// this file exists purely to prevent the golang toolchain from stripping
// away the c source directories and files.
james-lawrence marked this conversation as resolved.
Show resolved Hide resolved
//
// how it works:
james-lawrence marked this conversation as resolved.
Show resolved Hide resolved
// - every directory which only includes c source files receives a dummy.go file.
// - every directory we want to preserve is included here as a _ import.
// - this file is given a build to exclude it from the regular build.
import (
// prevent go tooling from stripping out the c source files.
james-lawrence marked this conversation as resolved.
Show resolved Hide resolved
_ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps"
_ "github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW"
_ "github.com/go-gl/glfw/v3.3/glfw/glfw/src"
)
11 changes: 11 additions & 0 deletions v3.3/glfw/glfw/deps/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy

import (
// prevent go tooling from stripping out the c source files.
james-lawrence marked this conversation as resolved.
Show resolved Hide resolved
_ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps/glad"
_ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps/mingw"
_ "github.com/go-gl/glfw/v3.3/glfw/glfw/deps/vs2008"
)
4 changes: 4 additions & 0 deletions v3.3/glfw/glfw/deps/glad/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions v3.3/glfw/glfw/deps/mingw/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions v3.3/glfw/glfw/deps/vs2008/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions v3.3/glfw/glfw/include/GLFW/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions v3.3/glfw/glfw/src/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy