Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 14 additions & 0 deletions modules/glfw/3.4.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module(
name = "glfw",
version = "3.4.0",
bazel_compatibility = [">=7.2.1"],
compatibility_level = 0,
)

bazel_dep(name = "apple_support", version = "1.18.0")
bazel_dep(name = "libx11", version = "1.8.12.bcr.3")
bazel_dep(name = "libxcursor", version = "1.2.3")
bazel_dep(name = "libxrandr", version = "1.5.4")
bazel_dep(name = "libxinerama", version = "1.1.5")
bazel_dep(name = "libxi", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
131 changes: 131 additions & 0 deletions modules/glfw/3.4.0/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
cc_library(
name = "glfw-headers",
hdrs = [
"include/GLFW/glfw3.h",
"include/GLFW/glfw3native.h",
],
includes = ["include"],
visibility = [
"//visibility:private",
],
)

DARWIN_HDRS = [
"src/cocoa_joystick.h",
"src/cocoa_platform.h",
"src/cocoa_time.h",
"src/posix_thread.h",
"src/wl_platform.h",
]

DARWIN_SRCS = [
"src/cocoa_init.m",
"src/cocoa_time.c",
"src/cocoa_joystick.m",
"src/cocoa_monitor.m",
"src/cocoa_window.m",
"src/nsgl_context.m",
"src/posix_module.c",
"src/posix_poll.c",
"src/posix_thread.c",
]

COMMON_HDRS = [
"include/GLFW/glfw3.h",
"include/GLFW/glfw3native.h",
"src/internal.h",
"src/mappings.h",
"src/null_joystick.h",
"src/null_platform.h",
"src/xkb_unicode.h",
"src/platform.h",
]

COMMON_SRCS = [
"src/context.c",
"src/egl_context.c",
"src/init.c",
"src/input.c",
"src/osmesa_context.c",
"src/monitor.c",
"src/null_init.c",
"src/null_window.c",
"src/null_monitor.c",
"src/null_joystick.c",
"src/vulkan.c",
"src/window.c",
"src/xkb_unicode.c",
"src/platform.c",
]

LINUX_HDRS = [
"src/linux_joystick.h",
"src/posix_poll.h",
"src/posix_thread.h",
"src/posix_time.h",
"src/x11_platform.h",
]

LINUX_SRCS = [
"src/glx_context.c",
"src/linux_joystick.c",
"src/posix_module.c",
"src/posix_poll.c",
"src/posix_thread.c",
"src/posix_time.c",
"src/x11_init.c",
"src/x11_monitor.c",
"src/x11_window.c",
]

objc_library(
name = "glfw-cocoa",
srcs = COMMON_SRCS + DARWIN_SRCS,
hdrs = COMMON_HDRS + DARWIN_HDRS,
copts = [
"-fno-objc-arc",
],
defines = [
"_GLFW_COCOA",
"GLFW_INVALID_CODEPOINT",
],
linkopts = [
"-framework OpenGL",
"-framework Cocoa",
"-framework IOKit",
"-framework CoreFoundation",
],
target_compatible_with = ["@platforms//os:macos"],
visibility = ["//visibility:private"],
)

cc_library(
name = "glfw-linux",
srcs = COMMON_SRCS + LINUX_SRCS,
hdrs = COMMON_HDRS + LINUX_HDRS,
defines = ["_GLFW_X11"],
visibility = ["//visibility:private"],
deps = [
"@libx11",
"@libxcursor",
"@libxi",
"@libxinerama",
"@libxrandr",
],
target_compatible_with = ["@platforms//os:linux"],
)

cc_library(
name = "glfw",
visibility = ["//visibility:public"],
deps = select({
"@platforms//os:linux": [
":glfw-headers",
":glfw-linux",
],
"@platforms//os:macos": [
":glfw-cocoa",
":glfw-headers",
],
}),
)
1 change: 1 addition & 0 deletions modules/glfw/3.4.0/overlay/MODULE.bazel
20 changes: 20 additions & 0 deletions modules/glfw/3.4.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
matrix:
linux_platform: ["ubuntu2004", "ubuntu2004_arm64", "ubuntu2204", "ubuntu2404", "debian11"]
osx_platform: ["macos", "macos_arm64"]
bazel: [7.x, 8.x, rolling]

tasks:
verify_linux_targets:
name: Verify linux build and test targets
platform: ${{ linux_platform }}
bazel: ${{ bazel }}
build_targets:
- '@glfw//:glfw'
verify_osx_targets:
name: Verify osx build and test targets
platform: ${{ osx_platform }}
bazel: ${{ bazel }}
build_targets:
- '@glfw//:glfw'
build_flags:
- "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"
10 changes: 10 additions & 0 deletions modules/glfw/3.4.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"integrity": "sha256-tewASycS/Qjohh3CcUKPBId1IAot9xnM9XUUO6dJo+k=",
"patch_strip": 0,
"overlay": {
"BUILD.bazel": "sha256-mqUhrPbE0fDiRSEcVzLLtG/nQQ9xYM9vfbqmbkP+lhA=",
"MODULE.bazel": "sha256-2jTp4dN8dd0OQLFpDJnH48EH24gCDRucbE4WucpQCXk="
},
"strip_prefix": "glfw-3.4",
"url": "https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip"
}
11 changes: 6 additions & 5 deletions modules/glfw/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@
{
"email": "julian.amann@tum.de",
"github": "Vertexwahn",
"name": "Julian Amann",
"github_user_id": 3775001
"github_user_id": 3775001,
"name": "Julian Amann"
},
{
"github": "phaedon",
"name": "Phaedon (F\u00e6don) Sinis",
"github_user_id": 1106027
"github_user_id": 1106027,
"name": "Phaedon (F\u00e6don) Sinis"
}
],
"repository": [
"github:glfw/glfw"
],
"versions": [
"3.3.9",
"3.3.9.bcr.1"
"3.3.9.bcr.1",
"3.4.0"
],
"yanked_versions": {}
}
Loading