libpldm: Fix header use

The headers need to work whether we're building libpldm in the repo or
we're building another project depending on the headers in the system
include directory.

Tidy up the paths involved and switch to defining the public headers as
system headers for the purpose of the build.

Change-Id: I49413988c94d393ea5761bc4684edcd2c2482a98
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/meson.build b/meson.build
index f8a7f88..22fb826 100644
--- a/meson.build
+++ b/meson.build
@@ -43,20 +43,22 @@
 
 add_project_arguments('-include', '@0@'.format(config), language: 'c')
 
-libpldm_sources = files()
-subdir('src')
-
-libpldm_include_dir = ['.', 'include', 'src']
+libpldm_include_dir = include_directories('include', is_system: true)
 libpldm_headers = files()
 libpldm_transport_headers = files()
+subdir('include')
 
-subdir('include/libpldm')
+libpldm_sources = files()
+subdir('src')
 
 libpldm = library(
   'pldm',
    libpldm_sources,
    implicit_include_directories: false,
-   include_directories: libpldm_include_dir,
+   include_directories: [
+     libpldm_include_dir,
+     include_directories('src')
+   ],
    version: meson.project_version(),
    gnu_symbol_visibility: 'hidden',
    install: true
@@ -73,7 +75,8 @@
   )
 
 libpldm_dep = declare_dependency(
-  include_directories: libpldm_include_dir,
+  include_directories: libpldm_include_dir
+,
   link_with: libpldm)
 
 import('pkgconfig').generate(