build: simplify include_directories

Define common_inc which includes both public_inc and the project root directory.
The project root directory will allow access to config.h and all the shared/
headers.

Replacing all custom '.', '..', '../..', '../shared' etc. include paths with
common_inc reduces clutter in the target definitions and enforces the common
 #include directive style, as e.g. including shared/ headers without the
subdirectory name no longer works.

Unfortunately this does not prevent one from using private libweston headers
with the usual include pattern for public headers.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen
2019-04-05 17:09:28 +03:00
parent c232f8d934
commit 4f5e360180
21 changed files with 51 additions and 53 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ deps_libshared = dep_wayland_client
lib_libshared = static_library(
'shared',
srcs_libshared,
include_directories: [ include_directories('..'), public_inc ],
include_directories: common_inc,
dependencies: deps_libshared,
pic: true,
install: false
@@ -68,7 +68,7 @@ endif
lib_cairo_shared = static_library(
'cairo-shared',
srcs_cairo_shared,
include_directories: include_directories('..'),
include_directories: common_inc,
dependencies: deps_cairo_shared,
install: false
)