[geary/wip/720315-webkitgtk-2.4] Further refinements



commit e0a8f247f2ac571b19cd44195a2705db1b429500
Author: Jim Nelson <jim yorba org>
Date:   Mon Dec 16 16:00:24 2013 -0800

    Further refinements
    
    A little more thorough with range-checking and organized the
    macros in src/CMakeLists.txt a bit more logically.

 CMakeLists.txt     |   11 +++++++----
 src/CMakeLists.txt |   40 +++++++++++++++++++++-------------------
 2 files changed, 28 insertions(+), 23 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77de038..a82dff2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,10 +52,13 @@ endif ()
 find_package(PkgConfig)
 pkg_check_modules(LIBUNITY QUIET unity>=5.12.0)
 pkg_check_modules(LIBMESSAGINGMENU QUIET messaging-menu>=12.10.2)
-pkg_check_modules(WEBKITGTK110X QUIET webkitgtk-3.0<=1.10.2)
-pkg_check_modules(WEBKITGTK200X QUIET webkitgtk-3.0>=2.0.0 webkitgtk-3.0<2.1.0)
-pkg_check_modules(WEBKITGTK22X QUIET webkitgtk-3.0>=2.2.0 webkitgtk-3.0<2.3.0)
-pkg_check_modules(WEBKITGTK24X QUIET webkitgtk-3.0>=2.3.0)
+
+# CMake's range-checking syntax doesn't allow for a bare less-than, so using
+# improbably high version numbers to indicate maximum
+pkg_check_modules(WEBKITGTK24X webkitgtk-3.0>=2.3.0)
+pkg_check_modules(WEBKITGTK22X webkitgtk-3.0>=2.2.0 webkitgtk-3.0<=2.2.100)
+pkg_check_modules(WEBKITGTK20X webkitgtk-3.0>=2.0.0 webkitgtk-3.0<=2.0.100)
+pkg_check_modules(WEBKITGTK110X webkitgtk-3.0>=1.10.0 webkitgtk-3.0<=1.10.2)
 
 # intl
 include(Gettext)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 16165c2..fe4a9c2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -438,49 +438,51 @@ else ()
     message(STATUS "Unity launcher support: OFF")
 endif ()
 
-if (WEBKITGTK110X_FOUND)
-    message(STATUS "Targeting WebKitGTK 1.10")
+if (WEBKITGTK24X_FOUND)
+    message(STATUS "Targeting WebKitGTK 2.4")
     SET(EXTRA_CLIENT_PKG_CONFIG
         ${EXTRA_CLIENT_PKG_CONFIG}
-        webkitgtk-3.0>=1.10.0
-        webkitgtk-3.0<=1.10.2
+        webkitgtk-3.0>=2.3.0
     )
     
     SET(WEBKITGTK_METADATA_DIR
-        webkitgtk-1.10
+        webkitgtk-2.4
     )
-elseif (WEBKITGTK20X_FOUND)
-    message(STATUS "Targeting WebKitGTK 2.0")
+elseif (WEBKITGTK22X_FOUND)
+    message(STATUS "Targeting WebKitGTK 2.2")
     SET(EXTRA_CLIENT_PKG_CONFIG
         ${EXTRA_CLIENT_PKG_CONFIG}
-        webkitgtk-3.0>=2.0.0
-        webkitgtk-3.0<=2.0.4
+        webkitgtk-3.0>=2.2.0
+        webkitgtk-3.0<2.3.0
     )
     
     SET(WEBKITGTK_METADATA_DIR
-        webkitgtk-2.0
+        webkitgtk-2.2
     )
-elseif (WEBKITGTK22X_FOUND)
-    message(STATUS "Targeting WebKitGTK 2.2")
+elseif (WEBKITGTK20X_FOUND)
+    message(STATUS "Targeting WebKitGTK 2.0")
     SET(EXTRA_CLIENT_PKG_CONFIG
         ${EXTRA_CLIENT_PKG_CONFIG}
-        webkitgtk-3.0>=2.2.0
-        webkitgtk-3.0<2.3.0
+        webkitgtk-3.0>=2.0.0
+        webkitgtk-3.0<=2.0.4
     )
     
     SET(WEBKITGTK_METADATA_DIR
-        webkitgtk-2.2
+        webkitgtk-2.0
     )
-else ()
-    message(STATUS "Targeting WebKitGTK 2.4")
+elseif (WEBKITGTK110X_FOUND)
+    message(STATUS "Targeting WebKitGTK 1.10")
     SET(EXTRA_CLIENT_PKG_CONFIG
         ${EXTRA_CLIENT_PKG_CONFIG}
-        webkitgtk-3.0>=2.3.0
+        webkitgtk-3.0>=1.10.0
+        webkitgtk-3.0<=1.10.2
     )
     
     SET(WEBKITGTK_METADATA_DIR
-        webkitgtk-2.4
+        webkitgtk-1.10
     )
+else ()
+    message(FATAL_ERROR "WebKitGTK not installed / unknown version detected")
 endif ()
 
 if (NO_FATAL_WARNINGS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]