diff options
author | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-03-06 19:04:14 +0000 |
---|---|---|
committer | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-03-06 19:04:14 +0000 |
commit | 7e16d24f02355a6f6a1158e0be5b061668d26d94 (patch) | |
tree | 72ab00b2f7c3fc2e6e3a2328b79214be031b4ada /libproxy/CMakeLists.txt | |
parent | bdc58ea0312ce4b6727630047c1b17bced655ef4 (diff) | |
download | libproxy-7e16d24f02355a6f6a1158e0be5b061668d26d94.tar.gz |
Added ability to select mozjs search order
git-svn-id: http://libproxy.googlecode.com/svn/trunk@600 c587cffe-e639-0410-9787-d7902ae8ed56
Diffstat (limited to 'libproxy/CMakeLists.txt')
-rw-r--r-- | libproxy/CMakeLists.txt | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/libproxy/CMakeLists.txt b/libproxy/CMakeLists.txt index 14a4c10..a6a1d03 100644 --- a/libproxy/CMakeLists.txt +++ b/libproxy/CMakeLists.txt @@ -44,19 +44,16 @@ if("${PKG_CONFIG_FOUND}") px_check_modules(X11 x11 xmu) px_check_modules(NM NetworkManager dbus-1) px_check_modules(WEBKIT webkit-1.0) - px_check_modules(MOZJS xulrunner-js) - if(NOT MOZJS_FOUND) - unset(MOZJS_FOUND) - px_check_modules(MOZJS firefox-js) - if(NOT MOZJS_FOUND) - unset(MOZJS_FOUND) - px_check_modules(MOZJS mozilla-js) - if(NOT MOZJS_FOUND) - unset(MOZJS_FOUND) - px_check_modules(MOZJS seamonkey-js) - endif() + + set(MOZJS_SEARCH_ORDER "xulrunner-js;firefox-js;mozilla-js;seamonkey-js" CACHE STRING "MozJS search order") + foreach(mozjspc ${MOZJS_SEARCH_ORDER}) + px_check_modules(MOZJS ${mozjspc}) + if(MOZJS_FOUND) + break() endif() - endif() + unset(MOZJS_FOUND) + endforeach() + if(X11_FOUND) px_check_modules(GNOME gconf-2.0 gobject-2.0) find_package(KDE4) |