build: move rbtree into a subdirectory

This commit is contained in:
Yaroslav Chvanov
2023-03-05 16:52:28 +03:00
parent 0d2ef30e41
commit ec246cd18c
6 changed files with 22 additions and 8 deletions

View File

@@ -376,6 +376,8 @@ if enable_tests
endif
endif
subdir('rbtree')
#### ratbagd ####
#
# The main item of this repo, a DBus server that uses libratbag to talk to
@@ -383,8 +385,6 @@ endif
#
src_ratbagd = [
'src/shared-macro.h',
'src/shared-rbtree.h',
'src/shared-rbtree.c',
'ratbagd/ratbagd.h',
'ratbagd/ratbagd.c',
'ratbagd/ratbagd-led.c',
@@ -403,6 +403,7 @@ deps_ratbagd = [
dep_udev,
dep_logind,
dep_libratbag,
dep_rbtree,
dep_unistring,
]

View File

@@ -36,7 +36,7 @@
#include <systemd/sd-event.h>
#include "ratbagd.h"
#include "shared-macro.h"
#include "shared-rbtree.h"
#include <rbtree/shared-rbtree.h>
#include "libratbag-util.h"

View File

@@ -36,7 +36,7 @@
#include <systemd/sd-bus.h>
#include <systemd/sd-event.h>
#include "shared-macro.h"
#include "shared-rbtree.h"
#include <rbtree/shared-rbtree.h>
#ifndef RATBAG_DBUS_INTERFACE
#define RATBAG_DBUS_INTERFACE "ratbag1"

17
rbtree/meson.build Normal file
View File

@@ -0,0 +1,17 @@
src_rbtree = [
'src/rbtree/shared-rbtree.h',
'src/rbtree/shared-rbtree.c',
]
inc_rbtree = include_directories('src')
lib_rbtree = static_library('rbtree',
src_rbtree,
dependencies : deps_libshared,
include_directories : inc_rbtree
)
dep_rbtree = declare_dependency(
link_with : lib_rbtree,
include_directories : inc_rbtree
)

View File

@@ -31,8 +31,6 @@
* file do not contain a full prove for correctness.
*/
#include "config.h"
#include "shared-rbtree.h"
RBNode *rbnode_leftmost(RBNode *n) {

View File

@@ -25,8 +25,6 @@
DEALINGS IN THE SOFTWARE.
***/
#include "config.h"
#ifdef __cplusplus
extern "C" {
#endif