make libds-tizen-backend-tdm 29/278229/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 29 Jun 2022 08:36:40 +0000 (17:36 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:59:03 +0000 (14:59 +0900)
change the build script and change tdm.h to tdm_internal.h for libds-tizen-backend-tdm.

Change-Id: I7c1db1ae8acdb81bd1ce4fc01edd121782ef1f2d

examples/meson.build
packaging/libds-tizen.spec
src/backend/tdm/backend.c
src/backend/tdm/meson.build
src/backend/tdm/output.c
src/backend/tdm/tdm_buffer_queue.c
src/backend/tdm/tdm_buffer_queue.h
src/backend/tdm/tdm_internal.h [moved from src/backend/tdm/tdm.h with 98% similarity]
src/backend/tdm/tdm_output_hwc.c
src/backend/tdm/tdm_output_hwc.h
src/meson.build

index b7500a1..ca7c6ab 100644 (file)
@@ -5,7 +5,10 @@ common_deps = [
 
 executable('tdm-backend',
   'tdm-backend.c',
-  dependencies: common_deps,
+  dependencies: [
+    common_deps,
+    dep_libds_tizen_backend_tdm,
+  ],
   install_dir: libds_tizen_bindir,
   install : true
 )
@@ -21,6 +24,7 @@ executable('tinyds-tdm',
   tinyds_tdm_files,
   dependencies: [
     common_deps,
+    dep_libds_tizen_backend_tdm,
     dependency('pixman-1', required: true),
     dependency('threads', required: true),
   ],
@@ -39,6 +43,7 @@ executable('tinyds-tdm-libinput',
   tinyds_tdm_libinput_files,
   dependencies: [
     common_deps,
+    dep_libds_tizen_backend_tdm,
     dep_libds_tizen_input_devicemgr,
     dependency('pixman-1', required: true),
     dependency('threads', required: true),
@@ -54,6 +59,7 @@ executable('tinyds-tdm-dpms',
   'tinyds-tdm-renderer.c',
   dependencies: [
     common_deps,
+    dep_libds_tizen_backend_tdm,
     dependency('pixman-1', required: true),
     dependency('threads', required: true),
   ],
@@ -71,6 +77,7 @@ executable('tinyds-tdm-hwc',
   tinyds_tdm_hwc_files,
   dependencies: [
     common_deps,
+    dep_libds_tizen_backend_tdm,
     dependency('pixman-1', required: true),
     dependency('threads', required: true),
   ],
index 000f5a9..99b47ae 100644 (file)
@@ -39,6 +39,21 @@ Requires:   %{name} = %{version}-%{release}
 %description devel
 Development package of Wayland Compositor Library for Tizen
 
+## libds-tizen-backend-tdm
+%package backend-tdm
+Summary: Display Backend Library with TDM
+Group:   Development/Libraries
+
+%description backend-tdm
+Display Backend Library with TDM
+
+%package backend-tdm-devel
+Summary: TDM Display Backend Development package
+Group:   Development/Libraries
+
+%description backend-tdm-devel
+TDM Display Backend Development package
+
 %package keyrouter
 Summary: Wayland Compositor Library for keyrouter
 Group:   Development/Libraries
@@ -106,6 +121,21 @@ ninja -C builddir install
 %{_bindir}/tinyds-tdm-libinput
 %{_bindir}/input-generator
 
+%files backend-tdm
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%license LICENSE
+%{_libdir}/libds-tizen-backend-tdm.so.*
+
+%files backend-tdm-devel
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%license LICENSE
+%{_includedir}/libds-tizen/backend/tdm.h
+%{_includedir}/libds-tizen/backend/tdm_output_hwc.h
+%{_libdir}/pkgconfig/libds-tizen-backend-tdm.pc
+%{_libdir}/libds-tizen-backend-tdm.so
+
 %files keyrouter
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
index 2337204..8ca365e 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <libds/log.h>
 
-#include "tdm.h"
+#include "tdm_internal.h"
 
 static const struct ds_backend_interface tdm_backend_iface;
 
index 7a7c25f..04ecbcf 100644 (file)
@@ -1,14 +1,33 @@
-libds_tizen_files += files(
+libds_tizen_backend_tdm_files = files(
   'backend.c',
   'output.c',
   'tdm_buffer_queue.c',
   'tdm_output_hwc.c',
 )
 
-libtdm = dependency('libtdm', required: true)
-libtbm = dependency('libtbm', required: true)
-
-libds_tizen_deps += [
-  libtdm,
-  libtbm
+libds_tizen_backend_tdm_deps = [
+  dep_libds_tizen,
+  dependency('libtdm', required: true),
+  dependency('libtbm', required: true)
 ]
+
+lib_libds_tizen_backend_tdm = shared_library('ds-tizen-backend-tdm', libds_tizen_backend_tdm_files,
+  dependencies: libds_tizen_backend_tdm_deps,
+  include_directories: [ include_directories('/usr/include'), common_inc, include_directories('.'), include_directories('..')],
+  version: meson.project_version(),
+  install: true
+)
+
+dep_libds_tizen_backend_tdm = declare_dependency(
+  link_with: lib_libds_tizen_backend_tdm,
+  dependencies: libds_tizen_backend_tdm_deps,
+  include_directories: [ common_inc, include_directories('.') ],
+)
+
+pkgconfig = import('pkgconfig')
+pkgconfig.generate(lib_libds_tizen_backend_tdm,
+  version: meson.project_version(),
+  filebase: 'libds-tizen-backend-tdm',
+  name: 'libds-tizen-backend-tdm',
+  description: 'tdm backend of libds-tizen for tizen platform',
+)
\ No newline at end of file
index 5e874df..c9ad137 100644 (file)
@@ -6,7 +6,7 @@
 #include <libds/log.h>
 #include "libds-tizen/allocator/tbm.h"
 
-#include "tdm.h"
+#include "tdm_internal.h"
 #include "tdm_output_hwc.h"
 #include "tdm_buffer_queue.h"
 
index 3acec8f..40e6353 100644 (file)
@@ -6,7 +6,7 @@
 #include <libds/log.h>
 #include "libds/interfaces/buffer.h"
 
-#include "tdm.h"
+#include "tdm_internal.h"
 #include "tdm_buffer_queue.h"
 
 static void
index a983265..51eab37 100644 (file)
@@ -4,7 +4,7 @@
 #include <tbm_surface_queue.h>
 #include <libds/interfaces/buffer.h>
 
-#include "tdm.h"
+#include "tdm_internal.h"
 
 struct ds_tdm_buffer_queue
 {
similarity index 98%
rename from src/backend/tdm/tdm.h
rename to src/backend/tdm/tdm_internal.h
index 7c00202..ef7d88f 100644 (file)
@@ -2,8 +2,8 @@
 #define DS_TIZEN_BACKEND_TDM_H
 
 #include <time.h>
-
 #include <tdm.h>
+#include <wayland-server.h>
 
 #include <libds/interfaces/backend.h>
 #include <libds/interfaces/output.h>
index 8db2984..48aef1d 100644 (file)
@@ -3,10 +3,11 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <tdm.h>
 #include <libds/log.h>
 #include <libds-tizen/tbm_server.h>
 
+
+#include "tdm_internal.h"
 #include "tdm_output_hwc.h"
 
 static void
index 07b3699..bb634d2 100644 (file)
@@ -1,13 +1,15 @@
 #ifndef DS_TIZEN_BACKEND_TDM_OUTPUT_HWC_H
 #define DS_TIZEN_BACKEND_TDM_OUTPUT_HWC_H
 
-#include <tdm.h>
 #include <libds/surface.h>
 #include <libds/buffer.h>
 
 #include <libds-tizen/backend/tdm.h>
 #include <libds-tizen/backend/tdm_output_hwc.h>
 
+#include "tdm_internal.h"
+
+
 struct ds_tdm_output_hwc_window {
     struct wl_list link;
 
index 1ee9b99..7b61b9a 100644 (file)
@@ -34,7 +34,6 @@ libds_tizen_deps = [
 ]
 
 subdir('allocator')
-subdir('backend')
 subdir('util')
 
 lib_libds_tizen = shared_library('ds-tizen', libds_tizen_files,
@@ -58,6 +57,6 @@ pkgconfig.generate(lib_libds_tizen,
   description: 'extension of libds for tizen platform',
 )
 
+subdir('backend')
 subdir('keyrouter')
 subdir('input-devicemgr')
-