blob: 97474e25610b5abc660e01799486a5c45b75a33f [file] [log] [blame]
Roman Stratiienko38094812022-12-09 19:16:41 +02001project(
2 'drm_hwcomposer',
3 ['c', 'cpp'],
Dennis Tsiang33f0ece2023-11-29 12:45:04 +00004 version : '3',
Roman Stratiienko38094812022-12-09 19:16:41 +02005 license : 'APACHE-2.0',
6 meson_version : '>= 0.56',
7 default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c11', 'cpp_std=c++17', 'cpp_rtti=false']
8)
9
10inc_include = [include_directories('.')]
11
12src_common = files(
13 'compositor/DrmKmsPlan.cpp',
Roman Stratiienko22fe9612023-01-17 21:22:29 +020014 'compositor/FlatteningController.cpp',
Roman Stratiienko38094812022-12-09 19:16:41 +020015 'backend/BackendManager.cpp',
16 'backend/Backend.cpp',
17 'backend/BackendClient.cpp',
Roman Stratiienko76892782023-01-16 17:15:53 +020018 'utils/fd.cpp',
Tim Van Patten16933c32024-11-08 16:41:39 -070019 'utils/properties.cpp',
Roman Stratiienko38094812022-12-09 19:16:41 +020020)
21
Dennis Tsiang33f0ece2023-11-29 12:45:04 +000022srcs_hwc2_device = [
23 'hwc2_device/hwc2_device.cpp',
24 'hwc2_device/DrmHwcTwo.cpp',
25 'hwc2_device/HwcDisplayConfigs.cpp',
26 'hwc2_device/HwcDisplay.cpp',
27 'hwc2_device/HwcLayer.cpp',
28]
29
Roman Stratiienko38094812022-12-09 19:16:41 +020030deps = [
31 dependency('cutils'),
32 dependency('drm'),
33 dependency('hardware'),
34 dependency('hidlbase'),
35 dependency('log'),
36 dependency('sync'),
37 dependency('ui'),
38 dependency('utils'),
Drew Davenport5951b112024-08-05 09:44:27 -060039 dependency('aidlcommonsupport'),
40 dependency('android.hardware.graphics.composer@2.1-resources'),
41 dependency('android.hardware.graphics.composer@2.2-resources'),
Roman Stratiienko38094812022-12-09 19:16:41 +020042]
43
44common_cpp_flags = [
45 '-DUSE_IMAPPER4_METADATA_API',
46]
47
Lucas Berthou4483e472024-12-09 21:05:28 +000048dep_libdisplay_info = dependency('display_info', required : false)
49if dep_libdisplay_info.found()
50 common_cpp_flags += '-DHAS_LIBDISPLAY_INFO'
51 deps += dep_libdisplay_info
52endif
53
Roman Stratiienko38094812022-12-09 19:16:41 +020054hwc2_cpp_flags = [
55 '-DHWC2_INCLUDE_STRINGIFICATION',
56 '-DHWC2_USE_CPP11',
57]
58
59subdir('drm')
60subdir('bufferinfo')
61
62drmhwc_common = static_library(
63 'drm_hwcomposer_common',
64 src_common,
65# TODO remove hwc2 flags from common code (backends needs rework)
66 cpp_args : common_cpp_flags + hwc2_cpp_flags,
67 dependencies : deps,
68)
69
70subdir('hwc2_device')
Dennis Tsiang33f0ece2023-11-29 12:45:04 +000071subdir('hwc3')