summaryrefslogtreecommitdiff
path: root/libproxy
diff options
context:
space:
mode:
Diffstat (limited to 'libproxy')
-rw-r--r--libproxy/cmake/modules/pacrunner_mozjs.cmk25
1 files changed, 14 insertions, 11 deletions
diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
index 27c0a11..7a73873 100644
--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
+++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
@@ -10,17 +10,20 @@ elseif(NOT APPLE)
set(MOZJS_SEARCH_ORDER "xulrunner-js;firefox-js;mozilla-js;seamonkey-js" CACHE STRING "MozJS search order")
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
- pkg_search_module(MOZJS ${MOZJS_SEARCH_ORDER})
- if(MOZJS_FOUND)
- include_directories(${MOZJS_INCLUDE_DIRS})
- link_directories(${MOZJS_LIBRARY_DIRS})
- pkg_search_module(MOZJS2 mozilla-js>=2.0b10)
- if(MOZJS2_FOUND)
- add_definitions(-DHAVE_MOZJS_2)
- endif(MOZJS2_FOUND)
- else()
- set(MOZJS_FOUND 0)
- endif()
+ foreach(MOZJSLIB ${MOZJS_SEARCH_ORDER})
+ pkg_search_module(MOZJS ${MOZJSLIB})
+ if(MOZJS_FOUND)
+ include_directories(${MOZJS_INCLUDE_DIRS})
+ link_directories(${MOZJS_LIBRARY_DIRS})
+ pkg_search_module(MOZJS2 ${MOZJSLIB}>=2.0b10)
+ if(MOZJS2_FOUND)
+ add_definitions(-DHAVE_MOZJS_2)
+ endif(MOZJS2_FOUND)
+ break()
+ else()
+ set(MOZJS_FOUND 0)
+ endif()
+ endforeach()
else()
set(MOZJS_FOUND 0)
endif()