diff options
author | nicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-05-19 17:55:57 +0000 |
---|---|---|
committer | nicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-05-19 17:55:57 +0000 |
commit | ef2c01194bf73fe90a018ae18c92f069d7966c08 (patch) | |
tree | 95b788e9ebdce305046b37c46a09c659b266a86e | |
parent | cd768d0a38b2e6f1157fc4e79e44fc60740928e8 (diff) | |
parent | 3edff243f7f4c0de58b132fe422124220932619c (diff) | |
download | libproxy-0.4.2.tar.gz |
Version 0.4.2, second trylibproxy-0.4.2
git-svn-id: http://libproxy.googlecode.com/svn/tags/libproxy-0.4.2@677 c587cffe-e639-0410-9787-d7902ae8ed56
-rw-r--r-- | libproxy/CMakeLists.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/libproxy/CMakeLists.txt b/libproxy/CMakeLists.txt index e6c641e..3fc0e3a 100644 --- a/libproxy/CMakeLists.txt +++ b/libproxy/CMakeLists.txt @@ -85,13 +85,18 @@ else() px_check_modules(WEBKIT webkit-1.0) 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}) + option(WITH_MOZJS "Search for MOZJS package" ON) + if (WITH_MOZJS) + pkg_search_module(MOZJS ${MOZJS_SEARCH_ORDER}) if(MOZJS_FOUND) - break() + include_directories(${MOZJS_INCLUDE_DIRS}) + set(LIBPROXY_LIBRARY_DIRS ${LIBPROXY_LIBRARY_DIRS} ${MOZJS_LIBRARY_DIRS}) + else() + set(MOZJS_FOUND 0) endif() + else() set(MOZJS_FOUND 0) - endforeach() + endif() px_check_modules(GNOME gconf-2.0 gobject-2.0) @@ -103,11 +108,13 @@ else() set(KDE4_FOUND 1) set(KDE4_LIBRARIES ${KDE4_KDECORE_LIBS} ${QT_LIBRARIES}) include_directories(${KDE4_INCLUDE_DIR} ${QT_INCLUDES}) - set(LIBPROXY_LIBRARY_DIRS ${LIBPROXY_LIBRARY_DIRS} ${KDE4_LIB_DIR} PARENT_SCOPE) + set(LIBPROXY_LIBRARY_DIRS ${LIBPROXY_LIBRARY_DIRS} ${KDE4_LIB_DIR}) string(REGEX REPLACE " *-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) else() set(KDE4_FOUND 0) endif() + else() + set(KDE4_FOUND 0) endif() endif() endif() @@ -118,8 +125,9 @@ if(MOZJS_FOUND AND WEBKIT_FOUND) set(BIPR 0) endif() -# Add link directories all at once +# Add link directories all at once and make it available globally. link_directories(${LIBPROXY_LIBRARY_DIRS}) +set(LIBPROXY_LIBRARY_DIRS ${LIBPROXY_LIBRARY_DIRS} PARENT_SCOPE) # ## Module definition |