Commit 3a1cfa80 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Check optional dependencies even if not enabled

parent cc040c6b
...@@ -56,22 +56,18 @@ flags = cc.get_supported_arguments(flags) ...@@ -56,22 +56,18 @@ flags = cc.get_supported_arguments(flags)
# optional dependencies # optional dependencies
pc_requires_private = [] pc_requires_private = []
if get_option('enable-notify') libnotify = dependency('libnotify', version: '>=0.7.0', required: false)
libnotify = dependency('libnotify', version: '>=0.7.0', required: false) jsonc = dependency('json-c', required: false)
if libnotify.found() if get_option('enable-notify') and libnotify.found()
build_dependencies += libnotify build_dependencies += libnotify
defines += '-DWITH_LIBNOTIFY' defines += '-DWITH_LIBNOTIFY'
pc_requires_private += 'libnotify' pc_requires_private += 'libnotify'
endif
endif endif
if get_option('enable-json') if get_option('enable-json') and jsonc.found()
jsonc = dependency('json-c', required: false) build_dependencies += jsonc
if jsonc.found() defines += '-DWITH_JSONC'
build_dependencies += jsonc pc_requires_private += 'json-c'
defines += '-DWITH_JSONC'
pc_requires_private += 'json-c'
endif
endif endif
# generate version header file # generate version header file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment