Include source root directory

All headers and sources are in src/. To avoid using relative includes
from subdirectories ("../../"), include the source root directory.
This commit is contained in:
Romain Vimont 2018-03-20 14:03:28 +01:00
parent 2573df9727
commit f5cf6c1b2c
5 changed files with 9 additions and 10 deletions

View file

@ -85,7 +85,8 @@ conf.set('HIDPI_SUPPORT', get_option('hidpi_support'))
configure_file(configuration: conf, output: 'config.h')
executable('scrcpy', src, dependencies: dependencies, install: true)
src_dir = include_directories('src')
executable('scrcpy', src, dependencies: dependencies, include_directories: src_dir, install: true)
### TESTS
@ -96,8 +97,6 @@ tests = [
['test_strutil', ['tests/test_strutil.c', 'src/strutil.c']],
]
src_dir = include_directories('src')
foreach t : tests
exe = executable(t[0], t[1], include_directories: src_dir, dependencies: dependencies)
test(t[0], exe)

View file

@ -1,4 +1,4 @@
#include "../../command.h"
#include "command.h"
#include <signal.h>
#include <sys/types.h>

View file

@ -1,4 +1,4 @@
#include "../../net.h"
#include "net.h"
# include <unistd.h>

View file

@ -1,7 +1,7 @@
#include "../../command.h"
#include "command.h"
#include "../../log.h"
#include "../../strutil.h"
#include "log.h"
#include "strutil.h"
HANDLE cmd_execute(const char *path, const char *const argv[]) {
STARTUPINFO si;

View file

@ -1,6 +1,6 @@
#include "../../net.h"
#include "net.h"
#include "../../log.h"
#include "log.h"
SDL_bool net_init(void) {
WSADATA wsa;