diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-03-06 15:54:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 18:19:26 +0100 |
commit | 3c2af9e9e5fe6f90dfa3d4a58bd30d60e0e211a8 (patch) | |
tree | 475455480bc0db60c654298f7887d558a10e8515 | |
parent | 7d371328265a4912fb323779adf95cc922a83541 (diff) |
Do not pass linking information from qmake to gyp and to qmake again
Instead make sure that the QT and QT_PRIVATE variables are identical
in both core_gyp_generator.pro and core_module.pro, the former for
compilation and the later for linking.
This allows working around issues of qmake when handling -l switches
in libs. Some features on Windows append version numbers, while this
is not done when linking to Qt libraries via the QT variable.
Change-Id: I04b58a313335daeffc9510471553517c63908852
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r-- | src/core/core_gyp_generator.pro | 4 | ||||
-rw-r--r-- | src/core/core_module.pro | 5 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/gyp_generator.prf | 33 |
3 files changed, 6 insertions, 36 deletions
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro index 25e105da6..a2bf2a19c 100644 --- a/src/core/core_gyp_generator.pro +++ b/src/core/core_gyp_generator.pro @@ -7,9 +7,9 @@ GYPINCLUDES += qtwebengine.gypi TEMPLATE = lib -# This must match the target name in core_module.pro to allow it to do the linking part. +# NOTE: The TARGET, QT, QT_PRIVATE variables must match those in core_module.pro. +# gyp/ninja will take care of the compilation, qmake/make will finish with linking and install. TARGET = QtWebEngineCore - QT += qml quick QT_PRIVATE += qml-private quick-private gui-private core-private diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 049bd0596..22d3d8646 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -1,5 +1,8 @@ -TARGET = QtWebEngineCore MODULE = webenginecore +TARGET = QtWebEngineCore + +QT += qml quick +QT_PRIVATE += qml-private quick-private gui-private core-private # Look for linking information produced by gyp for our target according to core_generated.gyp !include($$getOutDir()/$$getConfigDir()/$${TARGET}_linking.pri) { diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index e19c9568c..4e1b6f5bb 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -71,17 +71,6 @@ for (incl, GYPINCLUDES): GYP_CONTENTS += " '$$incl'," GYP_CONTENTS += " ]," } -# Split LIBS into linker flags and actual libraries, and add them to the -# appropriate section (ldflags vs link_settings: libraries) in the gyp file. -LIBRARIES = $$find(LIBS, "-l") -LIBRARIES = $$unique(LIBRARIES) -for (library, LIBRARIES): LIBS -= "$$library" - -GYP_CONTENTS += " 'ldflags': [" -for (lib, LIBS): GYP_CONTENTS += " '$$lib'," -for (rpath, QMAKE_RPATHDIR): GYP_CONTENTS += " '$$QMAKE_RPATH$$rpath'," -GYP_CONTENTS += " ]," - !isEmpty(QMAKE_FRAMEWORKPATH) { GYP_CONTENTS += " 'mac_framework_dirs': [" GYP_CONTENTS += " '$$QMAKE_FRAMEWORKPATH'," @@ -98,28 +87,6 @@ GYP_CONTENTS += " ]," for(flag, QMAKE_CXXFLAGS): GYP_CONTENTS += " '$$flag'," GYP_CONTENTS += " ]," } -GYP_CONTENTS += " 'link_settings': {" \ - " 'libraries': [" -win32: for (library, LIBRARIES): GYP_CONTENTS += " '$${library}.lib'," -else: for (library, LIBRARIES): GYP_CONTENTS += " '$$library'," -macx { - FRAMEWORKS = $$find(LIBS, "Q*") - FRAMEWORKS = $$unique(FRAMEWORKS) - FRAMEWORKS ~= s/-.*/ - FRAMEWORKS -= "-framework" - for (framework, FRAMEWORKS): { - framework_name = $$join(framework, "", "", ".framework") - GYP_CONTENTS += " '$$framework_name'," - } - - FRAMEWORK_PATHS = $$find(LIBS, "-F*") - FRAMEWORK_PATHS = $$unique(FRAMEWORK_PATHS) - FRAMEWORK_PATHS -= "-framework" - for (framework_path, FRAMEWORK_PATHS): GYP_CONTENTS += " '$$framework_path'," - !isEmpty(QMAKE_FRAMEWORKPATH): GYP_CONTENTS += " '-F$$QMAKE_FRAMEWORKPATH'," -} -GYP_CONTENTS += " ]," \ - " }," !isEmpty(DEFINES) { GYP_CONTENTS += " 'defines': [" |