summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel E <daniel.engberg.lists@pyret.net>2022-03-30 14:30:42 +0000
committerJan Rybar <jrybar@redhat.com>2022-03-30 14:30:42 +0000
commitb533b25208f4ea32bed1808bd824e70cfe4b6629 (patch)
treedea23311b8001b44b729d821f0df08fb44e53fee /meson.build
parent0a1473f013694cc31247d950bece5d58ec0408d0 (diff)
downloadpolkit-b533b25208f4ea32bed1808bd824e70cfe4b6629.tar.gz
build: Add fallback looking for duktape's library and header
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index dd09b28..c6765fd 100644
--- a/meson.build
+++ b/meson.build
@@ -137,7 +137,11 @@ duktape_req_version = '>= 2.2.0'
js_engine = get_option('js_engine')
if js_engine == 'duktape'
- js_dep = dependency('duktape', version: duktape_req_version)
+ js_dep = dependency('duktape', version: duktape_req_version, required: false)
+ if not js_dep.found()
+ message('Falling back to looking for library and header...')
+ js_dep = cc.find_library('duktape', has_headers: ['duktape.h'], required: true)
+ endif
libm_dep = cc.find_library('m')
thread_dep = dependency('threads')
func = 'pthread_condattr_setclock'