diff options
-rw-r--r-- | .editorconfig | 8 | ||||
-rw-r--r-- | LICENSE | 20 | ||||
-rw-r--r-- | lib/meson.build | 7 | ||||
-rw-r--r-- | meson.build | 40 | ||||
-rw-r--r-- | src/icipc-client.c | 2 | ||||
-rw-r--r-- | src/meson.build | 9 | ||||
-rw-r--r-- | tests/client-server.c | 2 | ||||
-rw-r--r-- | tests/protocol.c | 2 | ||||
-rw-r--r-- | tests/sender-receiver.c | 2 |
9 files changed, 82 insertions, 10 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1923d41 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true @@ -0,0 +1,20 @@ +Copyright © 2021 Collabora Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/lib/meson.build b/lib/meson.build index 273c90c..dc19c1f 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,8 +1,3 @@ -if get_option('icipc').disabled() - icipc_dep = disabler() - subdir_done() -endif - icipc_lib_sources = files( 'utils.c', 'protocol.c', @@ -45,7 +40,7 @@ icipc_lib = library('icipc-' + icipc_api_version, icipc_dep = declare_dependency( link_with: icipc_lib, - include_directories: wp_lib_include_dir, + include_directories: include_directories('.'), dependencies: [spa_dep], ) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..c342c42 --- /dev/null +++ b/meson.build @@ -0,0 +1,40 @@ +project('icipc', ['c'], + version : '0.1', + license : 'MIT', + meson_version : '>= 0.52.0', + default_options : [ + 'warning_level=1', + 'buildtype=debugoptimized', + ] +) + +threads_dep = dependency('threads', required: true) +spa_dep = dependency('libspa-0.2', version: '>= 0.2', required: true) +glib_dep = dependency('glib-2.0', required: true) + +pkgconfig = import('pkgconfig') +cc = meson.get_compiler('c') + +common_flags = [ + '-fvisibility=hidden', + '-Wsuggest-attribute=format', + '-Wsign-compare', + '-Wpointer-arith', + '-Wpointer-sign', + '-Wformat', + '-Wformat-security', + '-Wimplicit-fallthrough', + '-Wmissing-braces', + '-Wtype-limits', + '-Wvariadic-macros', + '-Wno-missing-field-initializers', + '-Wno-unused-parameter', + '-Wno-pedantic', + '-Wold-style-declaration', + '-Wunused-result', +] +add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c') + +subdir('lib') +subdir('src') +subdir('tests') diff --git a/src/icipc-client.c b/src/icipc-client.c index 587878c..4626754 100644 --- a/src/icipc-client.c +++ b/src/icipc-client.c @@ -10,7 +10,7 @@ #include <assert.h> #include <spa/pod/builder.h> -#include <icipc/icipc.h> +#include <icipc.h> struct client_data { struct icipc_client *c; diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..e150678 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,9 @@ +executable('icipc-client', + 'icipc-client.c', + c_args : [ + '-D_GNU_SOURCE', + '-DG_LOG_USE_STRUCTURED', + '-DG_LOG_DOMAIN="icipc-client"', + ], + dependencies : [icipc_dep, threads_dep], +) diff --git a/tests/client-server.c b/tests/client-server.c index da42aaf..7d1cfc6 100644 --- a/tests/client-server.c +++ b/tests/client-server.c @@ -9,7 +9,7 @@ #include <glib.h> #include <spa/pod/builder.h> #include <spa/pod/parser.h> -#include <icipc/icipc.h> +#include <icipc.h> #include <unistd.h> static bool diff --git a/tests/protocol.c b/tests/protocol.c index c8291ff..66f645e 100644 --- a/tests/protocol.c +++ b/tests/protocol.c @@ -9,7 +9,7 @@ #include <glib.h> #include <spa/pod/builder.h> #include <spa/pod/parser.h> -#include <icipc/icipc.h> +#include <icipc.h> static void test_icipc_protocol () diff --git a/tests/sender-receiver.c b/tests/sender-receiver.c index 8424074..75a10be 100644 --- a/tests/sender-receiver.c +++ b/tests/sender-receiver.c @@ -7,7 +7,7 @@ */ #include <glib.h> -#include <icipc/icipc.h> +#include <icipc.h> #include <unistd.h> struct event_data { |