meta-wayland/recipes-extended/gmobile/gmobile/0001-meson.build-create-a-pkgconfig-.pc-file.patch
2023-12-19 19:49:48 +01:00

54 lines
1.4 KiB
Diff

From a9c5d3add6550e27636de3ef86d6eb8bad41874d Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Tue, 15 Aug 2023 07:36:31 +0200
Subject: [PATCH] meson.build: add a pkgconfig .pc file
- fix version
- build shared lib and install
- install headers
Upstream-Status: Inappropriate
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e9f6c62..7e94496 100644
--- a/meson.build
+++ b/meson.build
@@ -99,3 +99,7 @@ summary({
bool_yn: true,
section: 'Build',
)
+
+install_headers('src/gmobile.h' , 'src/gm-cutout.h', 'src/gm-device-info.h', 'src/gm-device-tree.h', 'src/gm-display-panel.h', 'src/gm-error.h', 'src/gm-main.h', 'src/gm-timeout.h', 'src/gm-rect.h')
+pkg = import('pkgconfig')
+pkg.generate(gm_lib)
diff --git a/src/meson.build b/src/meson.build
index ee98a39..8d8fd7d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -37,12 +37,15 @@ gm_c_args = [
'-DG_LOG_DOMAIN="gmobile"',
]
-gm_lib = static_library(
+gm_lib = shared_library(
'gmobile',
gm_sources,
include_directories: root_inc,
c_args: gm_c_args,
- dependencies: gm_deps)
+ dependencies: gm_deps,
+ version: meson.project_version(),
+ install: true,
+)
gmobile_dep = declare_dependency(
include_directories: [root_inc, include_directories('.')],
--
2.41.0