diff options
author | Roman Stratiienko <r.stratiienko@gmail.com> | 2022-12-09 19:16:41 +0200 |
---|---|---|
committer | Roman Stratiienko <r.stratiienko@gmail.com> | 2023-01-04 16:58:14 +0200 |
commit | 380948102b746dc831b770105e1df1b6c621ded4 (patch) | |
tree | f78b30bc4cc2f2ccfe32ed624d1b40a16b554f3a | |
parent | 9e2a2cd3132eae959293e94d32f2ca85653a788e (diff) | |
download | drm_hwcomposer-380948102b746dc831b770105e1df1b6c621ded4.tar.gz |
drm_hwcomposer: Add meson.build file
This allows building without an AOSP tree, which significantly reduces
system requirements.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
-rw-r--r-- | bufferinfo/meson.build | 5 | ||||
-rw-r--r-- | drm/meson.build | 15 | ||||
-rw-r--r-- | hwc2_device/meson.build | 19 | ||||
-rw-r--r-- | meson.build | 50 |
4 files changed, 89 insertions, 0 deletions
diff --git a/bufferinfo/meson.build b/bufferinfo/meson.build new file mode 100644 index 0000000..f53d1b9 --- /dev/null +++ b/bufferinfo/meson.build @@ -0,0 +1,5 @@ +src_common += files( + 'legacy/BufferInfoLibdrm.cpp', + 'BufferInfoGetter.cpp', + 'BufferInfoMapperMetadata.cpp', +) diff --git a/drm/meson.build b/drm/meson.build new file mode 100644 index 0000000..7bef11a --- /dev/null +++ b/drm/meson.build @@ -0,0 +1,15 @@ +src_common += files( + 'DrmAtomicStateManager.cpp', + 'DrmConnector.cpp', + 'DrmCrtc.cpp', + 'DrmDevice.cpp', + 'DrmDisplayPipeline.cpp', + 'DrmEncoder.cpp', + 'DrmFbImporter.cpp', + 'DrmMode.cpp', + 'DrmPlane.cpp', + 'DrmProperty.cpp', + 'ResourceManager.cpp', + 'UEventListener.cpp', + 'VSyncWorker.cpp', +) diff --git a/hwc2_device/meson.build b/hwc2_device/meson.build new file mode 100644 index 0000000..7e6b8f4 --- /dev/null +++ b/hwc2_device/meson.build @@ -0,0 +1,19 @@ +src_hwc2_device = files( + 'hwc2_device.cpp', + 'DrmHwcTwo.cpp', + 'HwcDisplayConfigs.cpp', + 'HwcDisplay.cpp', + 'HwcLayer.cpp', +) + +shared_library( + 'hwcomposer.drm', + src_hwc2_device, + name_prefix : '', + cpp_args : common_cpp_flags + hwc2_cpp_flags, + dependencies : deps, + install : true, + link_whole: drmhwc_common, + install_dir : get_option('libdir') / 'hw', + include_directories: inc_include, +) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..266163e --- /dev/null +++ b/meson.build @@ -0,0 +1,50 @@ +project( + 'drm_hwcomposer', + ['c', 'cpp'], + version : '2', + license : 'APACHE-2.0', + meson_version : '>= 0.56', + default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c11', 'cpp_std=c++17', 'cpp_rtti=false'] +) + +inc_include = [include_directories('.')] + +src_common = files( + 'compositor/DrmKmsPlan.cpp', + 'backend/BackendManager.cpp', + 'backend/Backend.cpp', + 'backend/BackendClient.cpp', +) + +deps = [ + dependency('cutils'), + dependency('drm'), + dependency('hardware'), + dependency('hidlbase'), + dependency('log'), + dependency('sync'), + dependency('ui'), + dependency('utils'), +] + +common_cpp_flags = [ + '-DUSE_IMAPPER4_METADATA_API', +] + +hwc2_cpp_flags = [ + '-DHWC2_INCLUDE_STRINGIFICATION', + '-DHWC2_USE_CPP11', +] + +subdir('drm') +subdir('bufferinfo') + +drmhwc_common = static_library( + 'drm_hwcomposer_common', + src_common, +# TODO remove hwc2 flags from common code (backends needs rework) + cpp_args : common_cpp_flags + hwc2_cpp_flags, + dependencies : deps, +) + +subdir('hwc2_device') |