From: SooChan Lim Date: Wed, 8 Jun 2022 00:24:33 +0000 (+0900) Subject: rearrange the directory of the libds respository X-Git-Tag: accepted/tizen/unified/20220718.140337~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=455038f762830ce1731306efe2bc92cd59de5a0b;p=platform%2Fcore%2Fuifw%2Flibds.git rearrange the directory of the libds respository Change-Id: I4edc18679d585feef80aca84c526dd4f414ed1b8 --- diff --git a/src/clients/input-generator.c b/clients/input-generator.c similarity index 100% rename from src/clients/input-generator.c rename to clients/input-generator.c diff --git a/src/clients/meson.build b/clients/meson.build similarity index 100% rename from src/clients/meson.build rename to clients/meson.build diff --git a/src/clients/simple-dpms.c b/clients/simple-dpms.c similarity index 100% rename from src/clients/simple-dpms.c rename to clients/simple-dpms.c diff --git a/src/clients/simple-shm-shell.c b/clients/simple-shm-shell.c similarity index 100% rename from src/clients/simple-shm-shell.c rename to clients/simple-shm-shell.c diff --git a/src/examples/input-device-test.c b/examples/input-device-test.c similarity index 100% rename from src/examples/input-device-test.c rename to examples/input-device-test.c diff --git a/src/examples/libinput-backend.c b/examples/libinput-backend.c similarity index 100% rename from src/examples/libinput-backend.c rename to examples/libinput-backend.c diff --git a/src/examples/meson.build b/examples/meson.build similarity index 100% rename from src/examples/meson.build rename to examples/meson.build diff --git a/src/examples/pixman-helper.c b/examples/pixman-helper.c similarity index 100% rename from src/examples/pixman-helper.c rename to examples/pixman-helper.c diff --git a/src/examples/pixman-helper.h b/examples/pixman-helper.h similarity index 100% rename from src/examples/pixman-helper.h rename to examples/pixman-helper.h diff --git a/src/examples/pixman-tbm-helper.c b/examples/pixman-tbm-helper.c similarity index 100% rename from src/examples/pixman-tbm-helper.c rename to examples/pixman-tbm-helper.c diff --git a/src/examples/pixman-tbm-helper.h b/examples/pixman-tbm-helper.h similarity index 100% rename from src/examples/pixman-tbm-helper.h rename to examples/pixman-tbm-helper.h diff --git a/src/examples/tinyds-tdm-dpms.c b/examples/tinyds-tdm-dpms.c similarity index 100% rename from src/examples/tinyds-tdm-dpms.c rename to examples/tinyds-tdm-dpms.c diff --git a/src/examples/tinyds.c b/examples/tinyds.c similarity index 100% rename from src/examples/tinyds.c rename to examples/tinyds.c diff --git a/src/examples/wl-backend.c b/examples/wl-backend.c similarity index 100% rename from src/examples/wl-backend.c rename to examples/wl-backend.c diff --git a/meson.build b/meson.build index d3d2df0..be7d520 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,22 @@ cdata.set('LIBDS_VERSION_MAJOR', libds_version_major) cdata.set('LIBDS_VERSION_MINOR', libds_version_minor) cdata.set('LIBDS_VERSION_PATCH', libds_version_patch) +wayland_protos = dependency('wayland-protocols', + fallback: ['wayland-protocols', 'wayland_protocols'], + default_options: ['tests=false'], +) +wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') + +wayland_scanner_dep = dependency('wayland-scanner', native: true) +wayland_scanner = find_program( + wayland_scanner_dep.get_variable('wayland_scanner'), + native: true, +) + subdir('src') +subdir('tests') +subdir('examples') +subdir('clients') subdir('include') -configure_file(output: 'config.h', install: false, configuration: cdata) +configure_file(output: 'config.h', install: false, configuration: cdata) \ No newline at end of file diff --git a/src/libds/addon.c b/src/addon.c similarity index 100% rename from src/libds/addon.c rename to src/addon.c diff --git a/src/libds/addon.h b/src/addon.h similarity index 100% rename from src/libds/addon.h rename to src/addon.h diff --git a/src/libds/allocator.c b/src/allocator.c similarity index 100% rename from src/libds/allocator.c rename to src/allocator.c diff --git a/src/libds/allocator/meson.build b/src/allocator/meson.build similarity index 100% rename from src/libds/allocator/meson.build rename to src/allocator/meson.build diff --git a/src/libds/allocator/shm.c b/src/allocator/shm.c similarity index 100% rename from src/libds/allocator/shm.c rename to src/allocator/shm.c diff --git a/src/libds/backend.c b/src/backend.c similarity index 100% rename from src/libds/backend.c rename to src/backend.c diff --git a/src/libds/backend/libinput/backend.c b/src/backend/libinput/backend.c similarity index 100% rename from src/libds/backend/libinput/backend.c rename to src/backend/libinput/backend.c diff --git a/src/libds/backend/libinput/backend.h b/src/backend/libinput/backend.h similarity index 100% rename from src/libds/backend/libinput/backend.h rename to src/backend/libinput/backend.h diff --git a/src/libds/backend/libinput/input.c b/src/backend/libinput/input.c similarity index 100% rename from src/libds/backend/libinput/input.c rename to src/backend/libinput/input.c diff --git a/src/libds/backend/libinput/keyboard.c b/src/backend/libinput/keyboard.c similarity index 100% rename from src/libds/backend/libinput/keyboard.c rename to src/backend/libinput/keyboard.c diff --git a/src/libds/backend/libinput/meson.build b/src/backend/libinput/meson.build similarity index 100% rename from src/libds/backend/libinput/meson.build rename to src/backend/libinput/meson.build diff --git a/src/libds/backend/libinput/pointer.c b/src/backend/libinput/pointer.c similarity index 100% rename from src/libds/backend/libinput/pointer.c rename to src/backend/libinput/pointer.c diff --git a/src/libds/backend/libinput/touch.c b/src/backend/libinput/touch.c similarity index 100% rename from src/libds/backend/libinput/touch.c rename to src/backend/libinput/touch.c diff --git a/src/libds/backend/meson.build b/src/backend/meson.build similarity index 100% rename from src/libds/backend/meson.build rename to src/backend/meson.build diff --git a/src/libds/backend/wayland/backend.c b/src/backend/wayland/backend.c similarity index 100% rename from src/libds/backend/wayland/backend.c rename to src/backend/wayland/backend.c diff --git a/src/libds/backend/wayland/backend.h b/src/backend/wayland/backend.h similarity index 100% rename from src/libds/backend/wayland/backend.h rename to src/backend/wayland/backend.h diff --git a/src/libds/backend/wayland/meson.build b/src/backend/wayland/meson.build similarity index 100% rename from src/libds/backend/wayland/meson.build rename to src/backend/wayland/meson.build diff --git a/src/libds/backend/wayland/output.c b/src/backend/wayland/output.c similarity index 100% rename from src/libds/backend/wayland/output.c rename to src/backend/wayland/output.c diff --git a/src/libds/backend/wayland/seat.c b/src/backend/wayland/seat.c similarity index 100% rename from src/libds/backend/wayland/seat.c rename to src/backend/wayland/seat.c diff --git a/src/libds/buffer.c b/src/buffer.c similarity index 100% rename from src/libds/buffer.c rename to src/buffer.c diff --git a/src/libds/buffer.h b/src/buffer.h similarity index 100% rename from src/libds/buffer.h rename to src/buffer.h diff --git a/src/libds/client_buffer.h b/src/client_buffer.h similarity index 100% rename from src/libds/client_buffer.h rename to src/client_buffer.h diff --git a/src/libds/client_buffer/shm_client_buffer.c b/src/client_buffer/shm_client_buffer.c similarity index 100% rename from src/libds/client_buffer/shm_client_buffer.c rename to src/client_buffer/shm_client_buffer.c diff --git a/src/libds/compositor.c b/src/compositor.c similarity index 100% rename from src/libds/compositor.c rename to src/compositor.c diff --git a/src/libds/input_device.c b/src/input_device.c similarity index 100% rename from src/libds/input_device.c rename to src/input_device.c diff --git a/src/libds/keyboard.c b/src/keyboard.c similarity index 100% rename from src/libds/keyboard.c rename to src/keyboard.c diff --git a/src/libds/meson.build b/src/libds/meson.build deleted file mode 100644 index b59fda2..0000000 --- a/src/libds/meson.build +++ /dev/null @@ -1,101 +0,0 @@ -libds_files = [ - 'log.c', - 'addon.c', - 'buffer.c', - 'allocator.c', - 'swapchain.c', - 'output.c', - 'compositor.c', - 'subcompositor.c', - 'region.c', - 'util/time.c', - 'util/shm.c', - 'surface/surface.c', - 'surface/subsurface.c', - 'client_buffer/shm_client_buffer.c', - 'xdg_shell/xdg_shell.c', - 'xdg_shell/xdg_surface.c', - 'xdg_shell/xdg_toplevel.c', - 'pixel_format.c', - 'backend.c', - 'input_device.c', - 'pointer.c', - 'keyboard.c', - 'touch.c', - 'seat/seat.c', - 'seat/seat_pointer.c', - 'seat/seat_keyboard.c', - 'seat/seat_touch.c', - 'shell.c', - 'shell_surface.c', -] - -protocols = { - 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml', -} - -protocols_code = {} -protocols_server_header = {} - -foreach name, path : protocols - code = custom_target( - name.underscorify() + '_c', - input: path, - output: '@BASENAME@-protocol.c', - command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'], - ) - libds_files += code - - server_header = custom_target( - name.underscorify() + '_server_h', - input: path, - output: '@BASENAME@-server-protocol.h', - command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'], - build_by_default: false, - ) - libds_files += server_header -endforeach - -math = meson.get_compiler('c').find_library('m') -wayland_server = dependency('wayland-server', required: true) -pixman = dependency('pixman-1', required: true) -libdrm = dependency('libdrm', required: true) -xkbcommon = dependency('xkbcommon', required: true) -rt = meson.get_compiler('c').find_library('rt') - -if wayland_server.version().version_compare('>= 1.19') - cdata.set('HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY', '1') -endif - -libds_deps = [ - math, - wayland_server, - pixman, - libdrm, - xkbcommon, - rt, -] - -subdir('backend') -subdir('allocator') - -lib_libds = shared_library('ds', libds_files, - dependencies: libds_deps, - include_directories: [ common_inc, include_directories('.') ], - version: meson.project_version(), - install: true -) - -dep_libds = declare_dependency( - link_with: lib_libds, - dependencies: libds_deps, - include_directories: [ common_inc, include_directories('.') ], -) - -pkgconfig = import('pkgconfig') -pkgconfig.generate(lib_libds, - version: meson.project_version(), - filebase: meson.project_name(), - name: meson.project_name(), - description: 'Wayland compositor library', -) diff --git a/src/libds/log.c b/src/log.c similarity index 100% rename from src/libds/log.c rename to src/log.c diff --git a/src/meson.build b/src/meson.build index 774c7eb..b59fda2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,16 +1,101 @@ -wayland_protos = dependency('wayland-protocols', - fallback: ['wayland-protocols', 'wayland_protocols'], - default_options: ['tests=false'], +libds_files = [ + 'log.c', + 'addon.c', + 'buffer.c', + 'allocator.c', + 'swapchain.c', + 'output.c', + 'compositor.c', + 'subcompositor.c', + 'region.c', + 'util/time.c', + 'util/shm.c', + 'surface/surface.c', + 'surface/subsurface.c', + 'client_buffer/shm_client_buffer.c', + 'xdg_shell/xdg_shell.c', + 'xdg_shell/xdg_surface.c', + 'xdg_shell/xdg_toplevel.c', + 'pixel_format.c', + 'backend.c', + 'input_device.c', + 'pointer.c', + 'keyboard.c', + 'touch.c', + 'seat/seat.c', + 'seat/seat_pointer.c', + 'seat/seat_keyboard.c', + 'seat/seat_touch.c', + 'shell.c', + 'shell_surface.c', +] + +protocols = { + 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml', +} + +protocols_code = {} +protocols_server_header = {} + +foreach name, path : protocols + code = custom_target( + name.underscorify() + '_c', + input: path, + output: '@BASENAME@-protocol.c', + command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'], + ) + libds_files += code + + server_header = custom_target( + name.underscorify() + '_server_h', + input: path, + output: '@BASENAME@-server-protocol.h', + command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'], + build_by_default: false, + ) + libds_files += server_header +endforeach + +math = meson.get_compiler('c').find_library('m') +wayland_server = dependency('wayland-server', required: true) +pixman = dependency('pixman-1', required: true) +libdrm = dependency('libdrm', required: true) +xkbcommon = dependency('xkbcommon', required: true) +rt = meson.get_compiler('c').find_library('rt') + +if wayland_server.version().version_compare('>= 1.19') + cdata.set('HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY', '1') +endif + +libds_deps = [ + math, + wayland_server, + pixman, + libdrm, + xkbcommon, + rt, +] + +subdir('backend') +subdir('allocator') + +lib_libds = shared_library('ds', libds_files, + dependencies: libds_deps, + include_directories: [ common_inc, include_directories('.') ], + version: meson.project_version(), + install: true ) -wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') -wayland_scanner_dep = dependency('wayland-scanner', native: true) -wayland_scanner = find_program( - wayland_scanner_dep.get_variable('wayland_scanner'), - native: true, +dep_libds = declare_dependency( + link_with: lib_libds, + dependencies: libds_deps, + include_directories: [ common_inc, include_directories('.') ], ) -subdir('libds') -subdir('tests') -subdir('examples') -subdir('clients') +pkgconfig = import('pkgconfig') +pkgconfig.generate(lib_libds, + version: meson.project_version(), + filebase: meson.project_name(), + name: meson.project_name(), + description: 'Wayland compositor library', +) diff --git a/src/libds/output.c b/src/output.c similarity index 100% rename from src/libds/output.c rename to src/output.c diff --git a/src/libds/output.h b/src/output.h similarity index 100% rename from src/libds/output.h rename to src/output.h diff --git a/src/libds/pixel_format.c b/src/pixel_format.c similarity index 100% rename from src/libds/pixel_format.c rename to src/pixel_format.c diff --git a/src/libds/pixel_format.h b/src/pixel_format.h similarity index 100% rename from src/libds/pixel_format.h rename to src/pixel_format.h diff --git a/src/libds/pointer.c b/src/pointer.c similarity index 100% rename from src/libds/pointer.c rename to src/pointer.c diff --git a/src/libds/presentation.c b/src/presentation.c similarity index 100% rename from src/libds/presentation.c rename to src/presentation.c diff --git a/src/libds/region.c b/src/region.c similarity index 100% rename from src/libds/region.c rename to src/region.c diff --git a/src/libds/region.h b/src/region.h similarity index 100% rename from src/libds/region.h rename to src/region.h diff --git a/src/libds/seat.h b/src/seat.h similarity index 100% rename from src/libds/seat.h rename to src/seat.h diff --git a/src/libds/seat/seat.c b/src/seat/seat.c similarity index 100% rename from src/libds/seat/seat.c rename to src/seat/seat.c diff --git a/src/libds/seat/seat_keyboard.c b/src/seat/seat_keyboard.c similarity index 100% rename from src/libds/seat/seat_keyboard.c rename to src/seat/seat_keyboard.c diff --git a/src/libds/seat/seat_pointer.c b/src/seat/seat_pointer.c similarity index 100% rename from src/libds/seat/seat_pointer.c rename to src/seat/seat_pointer.c diff --git a/src/libds/seat/seat_private.h b/src/seat/seat_private.h similarity index 100% rename from src/libds/seat/seat_private.h rename to src/seat/seat_private.h diff --git a/src/libds/seat/seat_touch.c b/src/seat/seat_touch.c similarity index 100% rename from src/libds/seat/seat_touch.c rename to src/seat/seat_touch.c diff --git a/src/libds/shell.c b/src/shell.c similarity index 100% rename from src/libds/shell.c rename to src/shell.c diff --git a/src/libds/shell.h b/src/shell.h similarity index 100% rename from src/libds/shell.h rename to src/shell.h diff --git a/src/libds/shell_surface.c b/src/shell_surface.c similarity index 100% rename from src/libds/shell_surface.c rename to src/shell_surface.c diff --git a/src/libds/subcompositor.c b/src/subcompositor.c similarity index 100% rename from src/libds/subcompositor.c rename to src/subcompositor.c diff --git a/src/libds/subcompositor.h b/src/subcompositor.h similarity index 100% rename from src/libds/subcompositor.h rename to src/subcompositor.h diff --git a/src/libds/surface.h b/src/surface.h similarity index 100% rename from src/libds/surface.h rename to src/surface.h diff --git a/src/libds/surface/subsurface.c b/src/surface/subsurface.c similarity index 100% rename from src/libds/surface/subsurface.c rename to src/surface/subsurface.c diff --git a/src/libds/surface/surface-private.h b/src/surface/surface-private.h similarity index 100% rename from src/libds/surface/surface-private.h rename to src/surface/surface-private.h diff --git a/src/libds/surface/surface.c b/src/surface/surface.c similarity index 100% rename from src/libds/surface/surface.c rename to src/surface/surface.c diff --git a/src/libds/swapchain.c b/src/swapchain.c similarity index 100% rename from src/libds/swapchain.c rename to src/swapchain.c diff --git a/src/libds/touch.c b/src/touch.c similarity index 100% rename from src/libds/touch.c rename to src/touch.c diff --git a/src/libds/util.h b/src/util.h similarity index 100% rename from src/libds/util.h rename to src/util.h diff --git a/src/libds/util/shm.c b/src/util/shm.c similarity index 100% rename from src/libds/util/shm.c rename to src/util/shm.c diff --git a/src/libds/util/time.c b/src/util/time.c similarity index 100% rename from src/libds/util/time.c rename to src/util/time.c diff --git a/src/libds/xdg_shell/xdg_shell.c b/src/xdg_shell/xdg_shell.c similarity index 100% rename from src/libds/xdg_shell/xdg_shell.c rename to src/xdg_shell/xdg_shell.c diff --git a/src/libds/xdg_shell/xdg_shell.h b/src/xdg_shell/xdg_shell.h similarity index 100% rename from src/libds/xdg_shell/xdg_shell.h rename to src/xdg_shell/xdg_shell.h diff --git a/src/libds/xdg_shell/xdg_surface.c b/src/xdg_shell/xdg_surface.c similarity index 100% rename from src/libds/xdg_shell/xdg_surface.c rename to src/xdg_shell/xdg_surface.c diff --git a/src/libds/xdg_shell/xdg_toplevel.c b/src/xdg_shell/xdg_toplevel.c similarity index 100% rename from src/libds/xdg_shell/xdg_toplevel.c rename to src/xdg_shell/xdg_toplevel.c diff --git a/src/tests/meson.build b/tests/meson.build similarity index 100% rename from src/tests/meson.build rename to tests/meson.build diff --git a/src/tests/test-backend.c b/tests/test-backend.c similarity index 100% rename from src/tests/test-backend.c rename to tests/test-backend.c diff --git a/src/tests/test-compositor.c b/tests/test-compositor.c similarity index 100% rename from src/tests/test-compositor.c rename to tests/test-compositor.c diff --git a/src/tests/test-subsurface.c b/tests/test-subsurface.c similarity index 100% rename from src/tests/test-subsurface.c rename to tests/test-subsurface.c diff --git a/src/tests/test-surface.c b/tests/test-surface.c similarity index 100% rename from src/tests/test-surface.c rename to tests/test-surface.c