1 Star 0 Fork 26

李蔚/third_party_glfw

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 2.89 KB
一键复制 编辑 原始数据 按行查看 历史
李蔚 提交于 2023-12-29 12:09 . add glfw build
# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
import("//build/ohos.gni")
import("//third_party/glfw/glfw_ace_config.gni")
config("glfw_inner_headers") {
include_dirs = [ "include" ]
}
config("glfw_config_mac") {
cflags = [ "-Wno-sign-compare" ]
}
ohos_shared_library("glfw") {
defines = [ "PREVIEW" ]
include_dirs = [ "src" ]
public = [
"include/GLFW/glfw3.h",
"include/GLFW/glfw3native.h",
]
sources = [
"src/context.c",
"src/init.c",
"src/input.c",
"src/monitor.c",
"src/vulkan.c",
"src/window.c",
]
public_configs = [ ":glfw_inner_headers" ]
if (current_os == "mingw") {
defines += ace_windows_defines
sources += [
"src/egl_context.c",
"src/egl_context.h",
"src/wgl_context.c",
"src/wgl_context.h",
"src/win32_init.c",
"src/win32_joystick.c",
"src/win32_joystick.h",
"src/win32_monitor.c",
"src/win32_platform.h",
"src/win32_time.c",
"src/win32_tls.c",
"src/win32_window.c",
]
defines += [ "_GLFW_WIN32" ]
libs = [
"gdi32",
"opengl32",
]
}
if (current_os == "mac") {
defines += ace_mac_defines
sources += [
"deps/glad.c",
"src/cocoa_init.m",
"src/cocoa_joystick.h",
"src/cocoa_joystick.m",
"src/cocoa_monitor.m",
"src/cocoa_platform.h",
"src/cocoa_time.c",
"src/cocoa_window.m",
"src/nsgl_context.h",
"src/nsgl_context.m",
"src/posix_tls.c",
"src/posix_tls.h",
]
include_dirs += [ "deps" ]
if (defined(enable_gn_2021)) {
frameworks = [
"Cocoa.framework",
"IOKit.framework",
"CoreFoundation.framework",
"CoreVideo.framework",
]
} else {
libs = [
"Cocoa.framework",
"IOKit.framework",
"CoreFoundation.framework",
"CoreVideo.framework",
]
}
cflags = [
"-Wno-deprecated-declarations",
"-Wno-objc-multiple-method-names",
"-DNS_FORMAT_ARGUMENT(A)=",
]
public_configs += [ ":glfw_config_mac" ]
defines += [ "_GLFW_COCOA" ]
}
if (current_os == "linux") {
defines += ace_linux_defines
sources += [
"src/egl_context.c",
"src/egl_context.h",
"src/glx_context.c",
"src/glx_context.h",
"src/linux_joystick.c",
"src/linux_joystick.h",
"src/posix_time.c",
"src/posix_time.h",
"src/posix_tls.c",
"src/posix_tls.h",
"src/x11_init.c",
"src/x11_monitor.c",
"src/x11_platform.h",
"src/x11_window.c",
"src/xkb_unicode.c",
"src/xkb_unicode.h",
]
cflags_c = [
"-Wno-sign-compare",
"-Wno-missing-field-initializers",
]
libs = [
"rt",
"dl",
"X11",
"Xcursor",
"Xinerama",
"Xrandr",
]
defines += [ "_GLFW_X11" ]
}
part_name = "glfw"
subsystem_name = "thirdparty"
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aslklw/third_party_glfw.git
[email protected]:aslklw/third_party_glfw.git
aslklw
third_party_glfw
third_party_glfw
master

搜索帮助