examples: build some samples with meson
[dpdk.git] / meson.build
index efbb637..8c08436 100644 (file)
@@ -49,7 +49,7 @@ if get_option('default_library') == 'static'
        driver_install_path = get_option('libdir')
        eal_pmd_path = ''
 else
-       driver_install_path = join_paths(get_option('datadir'), 'dpdk/drivers')
+       driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers')
        eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 endif
 
@@ -59,17 +59,26 @@ endif
 global_inc = include_directories('.', 'config')
 subdir('config')
 
-# build libs and (TODO) drivers
+# build libs and drivers
 subdir('lib')
 subdir('buildtools')
+subdir('drivers')
 
-# TODO build binaries and installable tools
+# build binaries and installable tools
+subdir('usertools')
+subdir('app')
+
+# build any examples explicitly requested - useful for developers
+if get_option('examples') != ''
+       subdir('examples')
+endif
 
 # write the build config
 build_cfg = 'rte_build_config.h'
 configure_file(output: build_cfg,
                configuration: dpdk_conf,
-               install_dir: get_option('includedir'))
+               install_dir: join_paths(get_option('includedir'),
+                               get_option('include_subdir_arch')))
 
 # for static builds, include the drivers as libs, and also any
 # other dependent libs that DPDK needs to link against
@@ -80,8 +89,10 @@ endif
 
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
+       filebase: 'lib' + meson.project_name().to_lower(),
        version: meson.project_version(),
        libraries: dpdk_libraries,
        description: 'The Data Plane Development Kit (DPDK)',
+       subdirs: [get_option('include_subdir_arch'), '.'],
        extra_cflags: ['-include', 'rte_config.h', '-march=@0@'.format(machine)]
 )