]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/mlx5/meson.build
net/mlx: allow build only on Linux
[dpdk.git] / drivers / net / mlx5 / meson.build
index 326d1a369b57f237b699776cb3d8dae3aef6e27a..3eff22e4dfbf55171c93e8baf6c414b9a0f804a4 100644 (file)
@@ -2,6 +2,13 @@
 # Copyright 2018 6WIND S.A.
 # Copyright 2018 Mellanox Technologies, Ltd
 
+if not is_linux
+       build = false
+       reason = 'only supported on Linux'
+       subdir_done()
+endif
+build = true
+
 pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
 LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
 LIB_GLUE_VERSION = '19.05.0'
@@ -13,9 +20,9 @@ if pmd_dlopen
                '-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
        ]
 endif
+
 libnames = [ 'mlx5', 'ibverbs' ]
 libs = []
-build = true
 foreach libname:libnames
        lib = dependency('lib' + libname, required:false)
        if not lib.found()
@@ -28,6 +35,7 @@ foreach libname:libnames
                reason = 'missing dependency, "' + libname + '"'
        endif
 endforeach
+
 if build
        allow_experimental_apis = true
        ext_deps += libs