[Qt] Builds for Mac are tied to the OS system instead of the SDK version.
authormichael.bruning@digia.com <michael.bruning@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2012 13:14:10 +0000 (13:14 +0000)
committermichael.bruning@digia.com <michael.bruning@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2012 13:14:10 +0000 (13:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104529

Reviewed by Simon Hausmann.

Using work by Eike Ziller <eike.ziller@digia.com>.

The build system now first tries to assign the correct system libraries
for the SDK being used for Mac builds. If this does not yield any
result, it falls back to using the Mac OS version to determine the
correct library.

No new tests (not applicable).

* WebCore.pri:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137139 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.pri

index be811cd..c4159ad 100644 (file)
@@ -1,3 +1,21 @@
+2012-12-10  Michael BrĂ¼ning  <michael.bruning@digia.com>
+
+        [Qt] Builds for Mac are tied to the OS system instead of the SDK version.
+        https://bugs.webkit.org/show_bug.cgi?id=104529
+
+        Reviewed by Simon Hausmann.
+
+        Using work by Eike Ziller <eike.ziller@digia.com>.
+
+        The build system now first tries to assign the correct system libraries
+        for the SDK being used for Mac builds. If this does not yield any
+        result, it falls back to using the Mac OS version to determine the
+        correct library.
+
+        No new tests (not applicable).
+
+        * WebCore.pri:
+
 2012-12-10  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Unreviewed: touch RenderingAllInOne.cpp to fix Apple Windows builder.
index 94f6e65..d80c987 100644 (file)
@@ -177,18 +177,25 @@ enable?(VIDEO) {
                 -framework QuartzCore -framework QTKit \
                 -framework Security -framework IOKit
 
-        # We can know the Mac OS version by using the Darwin major version
         DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
         DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
-        equals(DARWIN_MAJOR_VERSION, "12") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a
-        } else:equals(DARWIN_MAJOR_VERSION, "11") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
-        } else:equals(DARWIN_MAJOR_VERSION, "10") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
-        } else:equals(DARWIN_MAJOR_VERSION, "9") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
+
+        # We first check if a specific SDK is set to be used for the build.
+        contains(QMAKE_MAC_SDK, ".*MacOSX10.7.sdk.*") {
+            SYSTEM_LIBRARY_PATH = $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
+        } else:contains(QMAKE_MAC_SDK, ".*MacOSX10.8.sdk.*") {
+            SYSTEM_LIBRARY_PATH = $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a
+        }
+
+        # If the previous check did not yield a result, we resort to the Darwin version.
+        isEmpty(SYSTEM_LIBRARY_PATH) {
+            equals(DARWIN_MAJOR_VERSION, "11") {
+                SYSTEM_LIBRARY_PATH = $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
+            } else:equals(DARWIN_MAJOR_VERSION, "12") {
+                SYSTEM_LIBRARY_PATH = $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a
+            }
         }
+        LIBS += $$SYSTEM_LIBRARY_PATH
     } else:use?(GSTREAMER) {
         INCLUDEPATH += $$SOURCE_DIR/platform/graphics/gstreamer
     } else:use?(QT_MULTIMEDIA) {