1import("//build/ohos.gni") 2import("//third_party/wayland_standard/wayland_protocol.gni") 3 4## Generate Wayland Protocols {{{ 5wayland_protocol("ivi_wm_protocol") { 6 sources = [ "protocol/ivi-wm.xml" ] 7} 8wayland_protocol("ivi_input_protocol") { 9 sources = [ "protocol/ivi-input.xml" ] 10} 11wayland_protocol("screen_info_protocol") { 12 sources = [ "screen-info/protocol/screen-info.xml" ] 13} 14 15## Generate Wayland Protocols }}} 16 17## Build ivi-controller.so {{{ 18config("ivi-controller_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "//third_party/wayland_standard", 23 "//third_party/weston/compositor", 24 "//third_party/weston/ivi-shell", 25 "//third_party/weston/libweston", 26 "screen-info/module", 27 ] 28 29 cflags = [ 30 "-Wall", 31 "-Werror", 32 ] 33} 34 35config("ivi-controller_public_config") { 36 include_dirs = [ "weston-ivi-shell/src" ] 37 38 cflags = [] 39} 40 41ohos_shared_library("ivi-controller") { 42 sources = [ "weston-ivi-shell/src/ivi-controller.c" ] 43 44 configs = [ ":ivi-controller_config" ] 45 46 public_configs = [ ":ivi-controller_public_config" ] 47 48 deps = [ 49 ":ivi_input_protocol", 50 "//third_party/wayland_standard:wayland_core_protocol", 51 "//third_party/weston:ivi_application_protocol", 52 "//third_party/weston:libexec_weston", 53 ] 54 55 public_deps = [ ":ivi_wm_protocol" ] 56 57 part_name = "graphic_standard" 58 subsystem_name = "graphic" 59} 60 61## Build ivi-controller.so }}} 62 63## Build ivi-input-controller.so {{{ 64config("ivi-input-controller_config") { 65 visibility = [ ":*" ] 66 67 include_dirs = [ 68 "//third_party/weston/ivi-shell", 69 "//third_party/weston/include/libweston", 70 "ivi-layermanagement-api/ilmCommon/include", 71 "weston-ivi-shell/src", 72 "//third_party/weston/libweston", 73 ] 74 75 cflags = [ 76 "-Wall", 77 "-Werror", 78 ] 79} 80 81config("ivi-input-controller_public_config") { 82 include_dirs = [] 83 84 cflags = [] 85} 86 87ohos_shared_library("ivi-input-controller") { 88 sources = 89 [ "ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c" ] 90 91 configs = [ ":ivi-input-controller_config" ] 92 93 public_configs = [ ":ivi-input-controller_public_config" ] 94 95 deps = [ 96 ":ivi_input_protocol", 97 ":ivi_wm_protocol", 98 "//third_party/wayland_standard:wayland_core_protocol", 99 "//third_party/weston:ivi_application_protocol", 100 "//third_party/weston:libweston", 101 ] 102 103 public_deps = [] 104 105 part_name = "graphic_standard" 106 subsystem_name = "graphic" 107} 108 109## Build ivi-input-controller.so }}} 110 111## Build ivi-id-agent.so {{{ 112config("ivi-id-agent_config") { 113 visibility = [ ":*" ] 114 115 include_dirs = [ 116 "//third_party/weston/compositor", 117 "//third_party/weston/ivi-shell", 118 "//third_party/weston/include/libweston", 119 ] 120 121 cflags = [] 122} 123 124config("ivi-id-agent_public_config") { 125 include_dirs = [] 126 127 cflags = [] 128} 129 130ohos_shared_library("ivi-id-agent") { 131 sources = [ "ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c" ] 132 133 configs = [ ":ivi-id-agent_config" ] 134 135 public_configs = [ ":ivi-id-agent_public_config" ] 136 137 deps = [ "//third_party/weston:libweston-desktop" ] 138 139 public_deps = [] 140 141 part_name = "graphic_standard" 142 subsystem_name = "graphic" 143} 144 145## Build ivi-id-agent.so }}} 146 147## Build libilmClient.so {{{ 148config("libilmClient_config") { 149 visibility = [ ":*" ] 150 151 include_dirs = [ "ivi-layermanagement-api/ilmCommon/include" ] 152 153 cflags = [ 154 "-Wall", 155 "-Werror", 156 ] 157} 158 159config("libilmClient_public_config") { 160 include_dirs = [ "ivi-layermanagement-api/ilmClient/include" ] 161 162 cflags = [] 163} 164 165ohos_shared_library("libilmClient") { 166 sources = [ 167 "ivi-layermanagement-api/ilmClient/src/ilm_client.c", 168 "ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c", 169 ] 170 171 configs = [ ":libilmClient_config" ] 172 173 public_configs = [ ":libilmClient_public_config" ] 174 175 deps = [ "//third_party/wayland_standard:libwayland_client" ] 176 177 public_deps = [ 178 "//third_party/wayland_standard:wayland_core_protocol", 179 "//third_party/weston:ivi_application_protocol", 180 ] 181 182 part_name = "graphic_standard" 183 subsystem_name = "graphic" 184} 185 186## Build libilmClient.so }}} 187 188## Build libilmCommon.so {{{ 189config("libilmCommon_config") { 190 visibility = [ ":*" ] 191 192 include_dirs = [] 193 194 cflags = [] 195} 196 197config("libilmCommon_public_config") { 198 include_dirs = [ "ivi-layermanagement-api/ilmCommon/include" ] 199 200 cflags = [] 201} 202 203ohos_shared_library("libilmCommon") { 204 sources = [ 205 "ivi-layermanagement-api/ilmCommon/src/ilm_common.c", 206 "ivi-layermanagement-api/ilmCommon/src/ilm_common_wayland_platform.c", 207 ] 208 209 configs = [ ":libilmCommon_config" ] 210 211 public_configs = [ ":libilmCommon_public_config" ] 212 213 deps = [ 214 ":libilmControl", 215 "//third_party/wayland_standard:libwayland_client", 216 ] 217 218 public_deps = [] 219 220 part_name = "graphic_standard" 221 subsystem_name = "graphic" 222} 223 224## Build libilmCommon.so }}} 225 226## Build libilmControl.so {{{ 227config("libilmControl_config") { 228 visibility = [ ":*" ] 229 230 include_dirs = [ "ivi-layermanagement-api/ilmCommon/include" ] 231 232 cflags = [] 233} 234 235config("libilmControl_public_config") { 236 include_dirs = [ "ivi-layermanagement-api/ilmControl/include" ] 237 238 cflags = [] 239} 240 241ohos_shared_library("libilmControl") { 242 sources = [ 243 "ivi-layermanagement-api/ilmControl/src/bitmap.c", 244 "ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c", 245 "ivi-layermanagement-api/ilmControl/src/writepng.c", 246 ] 247 248 configs = [ ":libilmControl_config" ] 249 250 public_configs = [ ":libilmControl_public_config" ] 251 252 deps = [ 253 ":ivi_input_protocol", 254 ":ivi_wm_protocol", 255 "//third_party/libpng:libpng", 256 "//third_party/wayland_standard:libwayland_client", 257 ] 258 259 public_deps = [] 260 261 part_name = "graphic_standard" 262 subsystem_name = "graphic" 263} 264 265## Build libilmControl.so }}} 266 267## Build libilmInput.so {{{ 268config("libilmInput_config") { 269 visibility = [ ":*" ] 270 271 include_dirs = [ "ivi-layermanagement-api/ilmCommon/include" ] 272 273 cflags = [] 274} 275 276config("libilmInput_public_config") { 277 include_dirs = [ "ivi-layermanagement-api/ilmInput/include" ] 278 279 cflags = [] 280} 281 282ohos_shared_library("libilmInput") { 283 sources = [ "ivi-layermanagement-api/ilmInput/src/ilm_input.c" ] 284 285 configs = [ ":libilmInput_config" ] 286 287 public_configs = [ ":libilmInput_public_config" ] 288 289 deps = [ 290 ":ivi_input_protocol", 291 ":libilmControl", 292 "//third_party/wayland_standard:libwayland_client", 293 ] 294 295 public_deps = [] 296 297 part_name = "graphic_standard" 298 subsystem_name = "graphic" 299} 300 301## Build libilmInput.so }}} 302 303## Build layer-add-surfaces {{{ 304config("layer-add-surfaces_config") { 305 visibility = [ ":*" ] 306 307 include_dirs = [] 308 309 cflags = [] 310} 311 312ohos_executable("layer-add-surfaces") { 313 install_enable = true 314 315 sources = [ 316 "ivi-layermanagement-examples/layer-add-surfaces/src/layer-add-surfaces.c", 317 ] 318 319 configs = [ ":layer-add-surfaces_config" ] 320 321 deps = [ 322 ":libilmCommon", 323 ":libilmControl", 324 "//third_party/wayland_standard:wayland_core_protocol", 325 "//third_party/weston:ivi_application_protocol", 326 ] 327 328 part_name = "graphic_standard" 329 subsystem_name = "graphic" 330} 331 332## Build layer-add-surfaces }}} 333 334## Build LayerManagerControl {{{ 335config("LayerManagerControl_config") { 336 visibility = [ ":*" ] 337 338 include_dirs = [ "ivi-layermanagement-examples/LayerManagerControl/include" ] 339 340 cflags = [ "-Wno-header-hygiene" ] 341} 342 343ohos_executable("LayerManagerControl") { 344 install_enable = true 345 346 sources = [ 347 "ivi-layermanagement-examples/LayerManagerControl/src/Expression.cpp", 348 "ivi-layermanagement-examples/LayerManagerControl/src/ExpressionInterpreter.cpp", 349 "ivi-layermanagement-examples/LayerManagerControl/src/analyze.cpp", 350 "ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp", 351 "ivi-layermanagement-examples/LayerManagerControl/src/common.cpp", 352 "ivi-layermanagement-examples/LayerManagerControl/src/control.cpp", 353 "ivi-layermanagement-examples/LayerManagerControl/src/input_commands.cpp", 354 "ivi-layermanagement-examples/LayerManagerControl/src/main.cpp", 355 "ivi-layermanagement-examples/LayerManagerControl/src/print.cpp", 356 "ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp", 357 "ivi-layermanagement-examples/LayerManagerControl/src/util.cpp", 358 ] 359 360 configs = [ ":LayerManagerControl_config" ] 361 362 deps = [ 363 ":libilmCommon", 364 ":libilmControl", 365 ":libilmInput", 366 "//third_party/wayland_standard:wayland_core_protocol", 367 "//third_party/weston:ivi_application_protocol", 368 ] 369 370 part_name = "graphic_standard" 371 subsystem_name = "graphic" 372} 373 374## Build LayerManagerControl }}} 375 376## Build simple-weston-client {{{ 377config("simple-weston-client_config") { 378 visibility = [ ":*" ] 379 380 include_dirs = [ "//third_party/bounds_checking_function/include" ] 381 382 cflags = [ 383 "-Wall", 384 "-Werror", 385 "-Wno-unused-function", 386 "-Wno-unused-variable", 387 ] 388} 389 390ohos_executable("simple-weston-client") { 391 install_enable = true 392 393 sources = [ "ivi-layermanagement-examples/simple-weston-client/src/simple-weston-client.c" ] 394 395 configs = [ 396 ":simple-weston-client_config", 397 "//third_party/libdrm:libdrm_public_config", 398 ] 399 400 deps = [ 401 "//third_party/wayland-protocols_standard:linux_dmabuf_unstable_v1_protocol", 402 "//third_party/wayland-protocols_standard:viewporter_protocol", 403 "//third_party/wayland_standard:libwayland_client", 404 "//third_party/wayland_standard:libwayland_cursor", 405 "//third_party/wayland_standard:wayland_core_protocol", 406 "//third_party/weston:ivi_application_protocol", 407 "//third_party/weston:libweston", 408 "//utils/native/base:utils", 409 ] 410 411 part_name = "graphic_standard" 412 subsystem_name = "graphic" 413} 414 415## Build simple-weston-client }}} 416 417## Build libscreen-info-module.so {{{ 418config("libscreen-info-module_config") { 419 visibility = [ ":*" ] 420 421 include_dirs = [ 422 "//third_party/weston/compositor", 423 "//third_party/weston/include", 424 "//third_party/weston/ivi-shell", 425 ] 426 427 cflags = [] 428} 429 430config("libscreen-info-module_public_config") { 431 include_dirs = [ "screen-info/module" ] 432 433 cflags = [] 434} 435 436ohos_shared_library("libscreen-info-module") { 437 sources = [ "screen-info/module/screen-info.c" ] 438 439 configs = [ ":libscreen-info-module_config" ] 440 441 public_configs = [ ":libscreen-info-module_public_config" ] 442 443 deps = [ 444 ":ivi-controller", 445 "//third_party/weston:libweston", 446 ] 447 448 part_name = "graphic_standard" 449 subsystem_name = "graphic" 450} 451 452## Build libscreen-info-module.so }}} 453 454## Build libtest-screen-info-module.so {{{ 455config("libtest-screen-info-module_config") { 456 visibility = [ ":*" ] 457 458 include_dirs = [ 459 "//third_party/weston/compositor", 460 "//third_party/weston/include", 461 "//third_party/weston/ivi-shell", 462 ] 463 464 cflags = [] 465} 466 467ohos_shared_library("libtest-screen-info-module") { 468 sources = [ "screen-info/test-module/call-screen-info.c" ] 469 470 configs = [ ":libtest-screen-info-module_config" ] 471 472 deps = [ 473 ":ivi-controller", 474 ":libscreen-info-module", 475 ":screen_info_protocol", 476 "//third_party/weston:libweston", 477 ] 478 479 part_name = "graphic_standard" 480 subsystem_name = "graphic" 481} 482 483## Build libtest-screen-info-module.so }}} 484 485## Build screen-info-module-test {{{ 486config("screen-info-module-test_config") { 487 visibility = [ ":*" ] 488 489 include_dirs = [] 490 491 cflags = [] 492} 493 494ohos_executable("screen-info-module-test") { 495 install_enable = true 496 497 sources = [ "screen-info/test/main.c" ] 498 499 configs = [ ":screen-info-module-test_config" ] 500 501 deps = [ 502 ":screen_info_protocol", 503 "//third_party/wayland_standard:libwayland_client", 504 ] 505 506 part_name = "graphic_standard" 507 subsystem_name = "graphic" 508} 509## Build screen-info-module-test }}} 510