1 Star 0 Fork 62

吴刚/third_party_weston

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 13.52 KB
一键复制 编辑 原始数据 按行查看 历史
lisong 提交于 2021-10-18 21:48 . 多模提交联调代码
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
import("//build/ohos.gni")
import("//foundation/multimodalinput/input/multimodalinput_mini.gni")
import("//third_party/wayland_standard/wayland_protocol.gni")
group("default") {
public_deps = [
":drm-backend",
#":hdi-backend",
":ivi-shell",
":libweston-desktop",
":weston",
":weston.ini",
":weston.rc",
]
}
## Generate Wayland Protocols {{{
wayland_protocol("text_cursor_position_protocol") {
sources = [ "protocol/text-cursor-position.xml" ]
}
wayland_protocol("weston_content_protection_protocol") {
sources = [ "protocol/weston-content-protection.xml" ]
}
wayland_protocol("weston_touch_calibration_protocol") {
sources = [ "protocol/weston-touch-calibration.xml" ]
}
wayland_protocol("weston_direct_display_protocol") {
sources = [ "protocol/weston-direct-display.xml" ]
}
wayland_protocol("weston_screenshooter_protocol") {
sources = [ "protocol/weston-screenshooter.xml" ]
}
wayland_protocol("ivi_application_protocol") {
sources = [ "protocol/ivi-application.xml" ]
}
wayland_protocol("drm_auth_protocol") {
sources = [ "protocol/drm-auth.xml" ]
}
## Generate Wayland Protocols }}}
## Build libshared.a {{{
config("libshared_config") {
visibility = [ ":*" ]
include_dirs = [
"include",
"//third_party/wayland_standard/src",
"//third_party/wayland-ivi-extension_standard/include",
]
cflags = [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
]
}
config("libshared_public_config") {
include_dirs = [ "shared" ]
cflags = []
}
ohos_static_library("libshared") {
sources = [
"shared/config-parser.c",
"shared/file-util.c",
"shared/matrix.c",
"shared/option-parser.c",
"shared/os-compatibility.c",
]
configs = [ ":libshared_config" ]
public_configs = [ ":libshared_public_config" ]
deps = []
public_deps = [ "//third_party/wayland_standard:libwayland_server" ]
}
## Build libshared.a }}}
## Build libweston.so {{{
config("libweston_config") {
visibility = [ ":*" ]
include_dirs = [
"//third_party/weston/include",
"libweston",
"//third_party/wayland_standard/src",
"//third_party/wayland-ivi-extension_standard/include",
"//third_party/weston",
]
cflags = [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
"-Wno-unused-function",
"-Wno-missing-field-initializers",
"-Wno-unused-variable",
"-Wno-implicit-function-declaration",
]
}
config("libweston_public_config") {
include_dirs = [
"include",
"libweston/backend-drm",
"//third_party/bounds_checking_function/include",
]
cflags = []
}
ohos_shared_library("libweston") {
sources = [
"libweston/animation.c",
"libweston/bindings.c",
"libweston/clipboard.c",
"libweston/compositor.c",
"libweston/content-protection.c",
"libweston/data-device.c",
"libweston/input.c",
"libweston/launcher-direct.c",
"libweston/launcher-util.c",
"libweston/launcher-weston-launch.c",
"libweston/linux-dmabuf.c",
"libweston/linux-explicit-synchronization.c",
"libweston/linux-sync-file.c",
"libweston/noop-renderer.c",
"libweston/pixel-formats.c",
"libweston/pixman-renderer.c",
"libweston/plugin-registry.c",
"libweston/screenshooter.c",
"libweston/tde-render-part.cpp",
"libweston/touch-calibration.c",
"libweston/vertex-clipping.c",
"libweston/weston-direct-display.c",
"libweston/zoom.c",
]
configs = [ ":libweston_config" ]
public_configs = [
":libweston_public_config",
":drm-backend_public_config",
]
deps = [
":trace",
"//foundation/multimodalinput/input/patch/diff_libinput_mmi:libinput-third-mmi",
"//third_party/libdrm:libdrm",
"//utils/native/base:utils",
]
public_deps = [
":libshared",
":text_cursor_position_protocol",
":weston_content_protection_protocol",
":weston_direct_display_protocol",
":weston_touch_calibration_protocol",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//drivers/peripheral/display/hal:hdi_display_gralloc",
"//third_party/libxkbcommon:libxkbcommon",
"//third_party/pixman:libpixman",
"//third_party/wayland-protocols_standard:input_timestamps_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:linux_dmabuf_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:linux_explicit_synchronization_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:pointer_constraints_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:presentation_time_protocol",
"//third_party/wayland-protocols_standard:relative_pointer_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:viewporter_protocol",
"//third_party/wayland-protocols_standard:xdg_output_unstable_v1_protocol",
]
part_name = "graphic_standard"
subsystem_name = "graphic"
}
## Build libweston.so }}}
## Build libexec_weston.a {{{
config("libexec_weston_config") {
visibility = [ ":*" ]
include_dirs = [
"libweston",
".",
]
cflags = [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
"-Wno-missing-field-initializers",
"-Wno-unused-variable",
]
}
config("libexec_weston_public_config") {
include_dirs = []
cflags = []
}
ohos_static_library("libexec_weston") {
sources = [
"compositor/main.c",
"compositor/text-backend.c",
"compositor/weston-screenshooter.c",
]
configs = [ ":libexec_weston_config" ]
public_configs = [ ":libexec_weston_public_config" ]
deps = [
":trace",
":weston_screenshooter_protocol",
"//foundation/graphic/standard/frameworks/vsync:libvsync_module",
"//foundation/multimodalinput/input/patch/diff_libinput_mmi:libinput-third-mmi",
"//third_party/wayland-protocols_standard:input_method_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:text_input_unstable_v1_protocol",
]
public_deps = [
":libweston",
"//third_party/wayland_standard:wayland_core_protocol",
]
}
## Build libexec_weston.a }}}
## Build weston {{{
config("weston_config") {
visibility = [ ":*" ]
include_dirs = []
cflags = [
"-Wall",
"-Werror",
]
}
config("weston_public_config") {
include_dirs = []
cflags = []
}
ohos_executable("weston") {
install_enable = true
sources = [ "compositor/executable.c" ]
configs = [ ":weston_config" ]
public_configs = [ ":weston_public_config" ]
deps = [
":libexec_weston",
":trace",
]
public_deps = []
subsystem_name = "graphic"
part_name = "graphic_standard"
}
## Build weston }}}
## Build libweston-desktop.so {{{
config("libweston-desktop_config") {
visibility = [ ":*" ]
include_dirs = [ "." ]
cflags = [
"-Wall",
"-Werror",
"-Wno-unused-function",
]
}
config("libweston-desktop_public_config") {
include_dirs = [ "include/libweston-desktop" ]
cflags = []
}
ohos_shared_library("libweston-desktop") {
sources = [
"libweston-desktop/client.c",
"libweston-desktop/libweston-desktop.c",
"libweston-desktop/seat.c",
"libweston-desktop/surface.c",
"libweston-desktop/wl-shell.c",
"libweston-desktop/xdg-shell-v6.c",
"libweston-desktop/xdg-shell.c",
]
configs = [ ":libweston-desktop_config" ]
public_configs = [ ":libweston-desktop_public_config" ]
deps = []
public_deps = [
":libexec_weston",
"//third_party/wayland-protocols_standard:xdg_shell_protocol",
"//third_party/wayland-protocols_standard:xdg_shell_unstable_v6_protocol",
]
part_name = "graphic_standard"
subsystem_name = "graphic"
}
## Build libweston-desktop.so }}}
## Build ivi-shell.so {{{
config("ivi-shell_config") {
visibility = [ ":*" ]
include_dirs = [ "." ]
cflags = [
"-Wall",
"-Werror",
"-Wno-unused-function",
]
}
config("ivi-shell_public_config") {
include_dirs = []
cflags = []
}
ohos_shared_library("ivi-shell") {
sources = [
"ivi-shell/ivi-layout-transition.c",
"ivi-shell/ivi-layout.c",
"ivi-shell/ivi-shell.c",
]
configs = [ ":ivi-shell_config" ]
public_configs = [ ":ivi-shell_public_config" ]
deps = [
":ivi_application_protocol",
":libweston-desktop",
":trace",
"//third_party/wayland_standard:wayland_core_protocol",
]
public_deps = []
subsystem_name = "graphic"
part_name = "graphic_standard"
}
## Build ivi-shell.so }}}
## Build drm-backend.so {{{
config("drm-backend_config") {
visibility = [ ":*" ]
include_dirs = [
"include",
"libweston",
"libweston/backend-drm/auth",
".",
]
cflags = [
"-Wall",
"-Wno-error",
"-Wno-unused-parameter",
"-Wno-missing-field-initializers",
"-Wno-implicit-function-declaration",
"-Wno-unused-variable",
"-Wno-unused-function",
"-Wno-sometimes-uninitialized",
]
}
config("drm-backend_public_config") {
include_dirs = []
cflags = []
}
ohos_shared_library("drm-backend") {
output_prefix_override = true
output_name = "drm-backend"
output_extension = "so"
sources = [
"libweston/backend-drm/auth/wayland_drm_auth_server.c",
"libweston/backend-drm/drm.c",
"libweston/backend-drm/fb.c",
"libweston/backend-drm/kms.c",
"libweston/backend-drm/libbacklight.c",
"libweston/backend-drm/modes.c",
"libweston/backend-drm/state-helpers.c",
"libweston/backend-drm/state-propose.c",
"libweston/libinput-device.c",
"libweston/libinput-seat.c",
# "libweston/backend-drm/drm-gbm.c",
]
configs = [ ":drm-backend_config" ]
public_configs = [ ":drm-backend_public_config" ]
deps = [
":drm_auth_protocol",
":libweston",
":trace",
"//foundation/graphic/standard/frameworks/vsync:libvsync_module",
"//foundation/multimodalinput/input/patch/diff_libinput_mmi:libinput-third-mmi",
"//third_party/libdrm:libdrm",
"//third_party/wayland-protocols_standard:linux_dmabuf_unstable_v1_protocol",
"//third_party/wayland-protocols_standard:presentation_time_protocol",
"//third_party/wayland-protocols_standard:relative_pointer_unstable_v1_protocol",
"//third_party/wayland_standard:wayland_core_protocol",
]
if (is_mmi_have_hdf) {
defines = [ "LIBINPUT_THIRD_HDF" ]
}
public_deps = []
part_name = "graphic_standard"
subsystem_name = "graphic"
}
## Build drm-backend.so }}}
## Install weston.ini to /system/etc/weston.ini {{{
ohos_prebuilt_etc("weston.ini") {
source = "weston.ini"
part_name = "graphic_standard"
subsystem_name = "graphic"
}
## Install weston.ini to /system/etc/weston.ini }}}
## Install weston.rc to /system/etc/init/weston.rc {{{
ohos_prebuilt_etc("weston.rc") {
if (use_musl) {
source = "weston.cfg"
} else {
source = "weston.rc"
}
relative_install_dir = "init"
part_name = "graphic_standard"
subsystem_name = "graphic"
}
## Install weston.rc to /system/etc/init/weston.rc }}}
## Build trace.so {{{
config("trace_config") {
visibility = [ ":*" ]
cflags = [
"-Wall",
"-Werror",
"-g3",
]
}
config("trace_public_config") {
include_dirs = [ "libweston" ]
}
ohos_shared_library("trace") {
sources = [ "libweston/trace.cpp" ]
configs = [ ":trace_config" ]
public_configs = [ ":trace_public_config" ]
deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ]
subsystem_name = "graphic"
part_name = "graphic_standard"
}
## Build trace.so }}}
### Build hdi-backend.so {{{
#config("hdi-backend_config") {
# visibility = [ ":*" ]
#
# include_dirs = [
# "libweston",
# ".",
# ]
#
# cflags = [
# "-Wall",
# "-Werror",
# ]
#}
#
#ohos_shared_library("hdi-backend") {
# output_prefix_override = true
# output_name = "hdi-backend"
# output_extension = "so"
#
# sources = [
# "libweston/backend-hdi/hdi_backend.cpp",
# "libweston/backend-hdi/hdi_head.cpp",
# "libweston/backend-hdi/hdi_output.cpp",
# "libweston/backend-hdi/hdi_renderer.cpp",
# "libweston/backend-hdi/main.cpp",
# "libweston/libinput-device.c",
# "libweston/libinput-seat.c",
# ]
#
# configs = [ ":hdi-backend_config" ]
#
# deps = [
# ":libweston",
# ":trace",
# "//drivers/peripheral/display/hal:hdi_display_device_drm",
# "//drivers/peripheral/display/hal:hdi_display_gralloc",
# "//foundation/graphic/standard/frameworks/vsync:libvsync_module",
# "//third_party/libdrm:libdrm",
# "//third_party/libinput:libinput-third",
# "//third_party/wayland-protocols_standard:linux_dmabuf_unstable_v1_protocol",
# "//third_party/wayland_standard:wayland_core_protocol",
# "//utils/native/base:utils",
# ]
#
# part_name = "graphic_standard"
# subsystem_name = "graphic"
#}
#
### Build hdi-backend.so }}}
# gl-renderer.so waiting for libEGL & libGLESv2
### Build gl-renderer.so {{{
#config("gl-renderer_config") {
# visibility = [ ":*" ]
#
# include_dirs = [
# "//third_party/weston",
# "//third_party/wayland_standard/egl",
# "//third_party/weston/libweston",
# "//third_party/wayland-ivi-extension_standard/include",
# ]
#
# cflags = [
# "-Wno-return-type",
# "-Wno-visibility",
# "-Wno-unused-function",
# ]
#}
#
#config("gl-renderer_public_config") {
# include_dirs = [
# ]
#
# cflags = [
# ]
#}
#
#ohos_shared_library("gl-renderer") {
# sources = [
# "libweston/renderer-gl/egl-glue.c",
# "libweston/renderer-gl/gl-renderer.c",
# "libweston/vertex-clipping.c",
# ]
#
# configs = [
# ":gl-renderer_config",
# ]
#
# public_configs = [
# ":gl-renderer_public_config",
# ]
#
# deps = [
# ":libweston",
# "//third_party/wayland-protocols_standard:linux_dmabuf_unstable_v1_protocol",
# ]
#
# asdk_deps = [
# "shared_library:libEGL",
# "shared_library:libGLESv2",
# ]
#
# public_deps = [
# ]
#
# subsystem_name = "graphic"
# part_name = "graphic_standard"
#}
### Build gl-renderer.so }}}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/helloGraphics/third_party_weston.git
git@gitee.com:helloGraphics/third_party_weston.git
helloGraphics
third_party_weston
third_party_weston
master

搜索帮助