diff --git a/meson.build b/meson.build index 16e61b4..8537718 100644 --- a/meson.build +++ b/meson.build @@ -38,9 +38,11 @@ subdir('src') ############################# ## Pkgconfig definition ## ############################# -pkgconfig = import('pkgconfig') -pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig') -pkgconfig.generate(libnethogs, - requires: ['libpcap'], - version: meson.project_version() - ) +if get_option('enable-libnethogs').enabled() + pkgconfig = import('pkgconfig') + pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig') + pkgconfig.generate(libnethogs, + requires: ['libpcap'], + version: meson.project_version() + ) +endif