Title: [128450] trunk
Revision
128450
Author
[email protected]
Date
2012-09-13 05:39:46 -0700 (Thu, 13 Sep 2012)

Log Message

[Qt] Make sure LIBS, PKGCONFIG, and QT, do not affect QtWebKit's prl file

Unless it's actually a dependency of the public QtWebKit API.

We could replace every occurance of LIBS, PKGCONFIG, and QT, in the pri
files with their _PRIVATE equivivalent, but that's likely to break when
someone adds a new QT/LIBS/PKGCONFIG += foo line somewhere. Instead we
clean up the variables in default_post.

This means that the CONFIG -= explicitlib in linkAgainstLibrary() is no
longer needed, as it was a workaround for the intermediate libraries ending
up in the prl file. And, since CONFIG -= staticlib was there to support
the explicitlib option, we can remove that too (as well as the exception
for gprof, since it would be empty). If gprof needs tweaks to always link
statically they should go in gprof.prf.

Reviewed by Simon Hausmann.

Modified Paths

Diff

Modified: trunk/ChangeLog (128449 => 128450)


--- trunk/ChangeLog	2012-09-13 12:37:51 UTC (rev 128449)
+++ trunk/ChangeLog	2012-09-13 12:39:46 UTC (rev 128450)
@@ -1,3 +1,25 @@
+2012-09-13  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Make sure LIBS, PKGCONFIG, and QT, do not affect QtWebKit's prl file
+
+        Unless it's actually a dependency of the public QtWebKit API.
+
+        We could replace every occurance of LIBS, PKGCONFIG, and QT, in the pri
+        files with their _PRIVATE equivivalent, but that's likely to break when
+        someone adds a new QT/LIBS/PKGCONFIG += foo line somewhere. Instead we
+        clean up the variables in default_post.
+
+        This means that the CONFIG -= explicitlib in linkAgainstLibrary() is no
+        longer needed, as it was a workaround for the intermediate libraries ending
+        up in the prl file. And, since CONFIG -= staticlib was there to support
+        the explicitlib option, we can remove that too (as well as the exception
+        for gprof, since it would be empty). If gprof needs tweaks to always link
+        statically they should go in gprof.prf.
+
+        Reviewed by Simon Hausmann.
+
+        * Source/api.pri:
+
 2012-09-13  Oswald Buddenhagen  <[email protected]>
 
         [Qt] Fllow rename of qt_module_config.prf to qt_module.prf

Modified: trunk/Source/api.pri (128449 => 128450)


--- trunk/Source/api.pri	2012-09-13 12:37:51 UTC (rev 128449)
+++ trunk/Source/api.pri	2012-09-13 12:39:46 UTC (rev 128450)
@@ -14,6 +14,11 @@
 MODULE = webkit
 MODULE_PRI = ../Tools/qmake/qt_webkit.pri
 
+# This is the canonical list of dependencies for the public API of
+# the QtWebKit library, and will end up in the library's prl file.
+QT_API_DEPENDS = core gui network
+build?(webkit1): QT_API_DEPENDS += widgets
+
 # ---------------- Custom developer-build handling -------------------
 #
 # The assumption for Qt developer builds is that the module file

Modified: trunk/Tools/ChangeLog (128449 => 128450)


--- trunk/Tools/ChangeLog	2012-09-13 12:37:51 UTC (rev 128449)
+++ trunk/Tools/ChangeLog	2012-09-13 12:39:46 UTC (rev 128450)
@@ -1,3 +1,26 @@
+2012-09-13  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Make sure LIBS, PKGCONFIG, and QT, do not affect QtWebKit's prl file
+
+        Unless it's actually a dependency of the public QtWebKit API.
+
+        We could replace every occurance of LIBS, PKGCONFIG, and QT, in the pri
+        files with their _PRIVATE equivivalent, but that's likely to break when
+        someone adds a new QT/LIBS/PKGCONFIG += foo line somewhere. Instead we
+        clean up the variables in default_post.
+
+        This means that the CONFIG -= explicitlib in linkAgainstLibrary() is no
+        longer needed, as it was a workaround for the intermediate libraries ending
+        up in the prl file. And, since CONFIG -= staticlib was there to support
+        the explicitlib option, we can remove that too (as well as the exception
+        for gprof, since it would be empty). If gprof needs tweaks to always link
+        statically they should go in gprof.prf.
+
+        Reviewed by Simon Hausmann.
+
+        * qmake/mkspecs/features/default_post.prf:
+        * qmake/mkspecs/features/functions.prf:
+
 2012-09-13  Mario Sanchez Prada  <[email protected]>
 
         [GTK] "Infinite" loop in AccessibilityUIElementGtk.cpp

Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (128449 => 128450)


--- trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-09-13 12:37:51 UTC (rev 128449)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-09-13 12:39:46 UTC (rev 128450)
@@ -242,6 +242,19 @@
     LIBS = $$existing_libs $$LIBS
 }
 
+# Sanitize PKGCONFIG and LIBS, as we don't want any of these libraries
+# to end up in as public API dependenices in the QtWebKit prl file.
+PKGCONFIG_PRIVATE *= $$PKGCONFIG
+unset(PKGCONFIG)
+LIBS_PRIVATE = $$LIBS
+unset(LIBS)
+
+# We do have a limited subset of Qt modules as dependencies for using
+# the public QtWebKit API. The rest of the modules go into QT_PRIVATE.
+QT_PRIVATE *= $$QT
+QT = $$QT_API_DEPENDS
+QT_PRIVATE -= $$QT
+
 equals(_PRO_FILE_, $${ROOT_WEBKIT_DIR}/WebKit.pro):!isEmpty(OVERRIDE_SUBDIRS) {
     # The root WebKit project file is the only one that allows
     # you to pass a set of subtargets on the comand line.

Modified: trunk/Tools/qmake/mkspecs/features/functions.prf (128449 => 128450)


--- trunk/Tools/qmake/mkspecs/features/functions.prf	2012-09-13 12:37:51 UTC (rev 128449)
+++ trunk/Tools/qmake/mkspecs/features/functions.prf	2012-09-13 12:39:46 UTC (rev 128450)
@@ -259,23 +259,13 @@
             LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
         }
 
+        LIBS += -L$$path
+
         win32-msvc*|wince*|win32-icc {
-            LIBS += -L$$path
             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
         } else {
-            QMAKE_LIBDIR += $$path
             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}lib$${target}.a
         }
-
-        # gprof does not support profiling a shared library.
-        # To profile WebKit, applications must link QtWebKit statically.
-        !contains(CONFIG, gprof) {
-            # The following line is to prevent qmake from adding jscore to libQtWebKit's prl dependencies.
-            # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit
-            # statically in applications (which isn't used often because, among other things, of licensing obstacles).
-            CONFIG -= explicitlib
-            CONFIG -= staticlib
-        }
     }
 
     export(LIBS)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to