From f329dccb797bcbb45bb5fbf7e9234279454d6d1e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 14:54:57 +0100 Subject: use correct module names in pkg-config Requires: field Task-number: QTBUG-29309 Change-Id: Id22d4e2707ceb3421dc6eb5effe16a03c4769d26 Reviewed-by: Thiago Macieira --- mkspecs/features/qt_module.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 19cdc2a26a..6b58457a9a 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -206,7 +206,8 @@ unix { } unix|win32-g++* { - for(i, QT):QMAKE_PKGCONFIG_REQUIRES += $$eval(QT.$${i}.name) + for(i, QT): \ + QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module } -- cgit v1.2.3 From ca7056ce5b467951060cb1dd13d7d274f10b70c5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 14:58:36 +0100 Subject: include all module dependencies into pkg-config Requires: field previously, we'd miss the -private ones (which imply the non-private version). Change-Id: Ib5ae2afaa5b5efda9639b7cc4a080432f2fcce2a Reviewed-by: Thiago Macieira Reviewed-by: Dihan Wickremasuriya Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_module.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 6b58457a9a..771ddb19da 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -206,7 +206,7 @@ unix { } unix|win32-g++* { - for(i, QT): \ + for(i, MODULE_DEPENDS): \ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module -- cgit v1.2.3 From 50a416889e4b8f033567a634be15b877ecfae981 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 15:08:17 +0100 Subject: explicitly set QMAKE_PKGCONFIG_NAME otherwise qmake will just take TARGET and lowercase and capitalize it, which not only looks weird, but also does not match the Requires: fields we generate. Change-Id: I4a070ff256fffd2b780acb0361d4213d0032dbb9 Reviewed-by: Thiago Macieira Reviewed-by: Dihan Wickremasuriya Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module.prf | 1 + 1 file changed, 1 insertion(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 771ddb19da..50e946937c 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -206,6 +206,7 @@ unix { } unix|win32-g++* { + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, Qt$$section(VERSION, ., 0, 0)) for(i, MODULE_DEPENDS): \ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ -- cgit v1.2.3 From 0e1427b0a6c3d304aabecd3d33708ecb0544fdba Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 29 Jan 2013 21:56:24 +0100 Subject: adjust paths in installed module metafiles from modular build Fully modular prefix build now puts the includes and libs into each module's own builddir, so the else branch was simply bogus. Replaced the else branch with the real base for modular builds. This allows the paths to be successfully replaced when installing metafiles. Change-Id: I056a923288965b560a4e9b0ba7add1aac912199f Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_module.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 19cdc2a26a..13ac35aa0e 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -190,7 +190,7 @@ unix|win32-g++* { !isEmpty(_QMAKE_SUPER_CACHE_): \ rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* else: \ - rplbase = $$[QT_INSTALL_PREFIX/get] + rplbase = $$MODULE_QMAKE_OUTDIR include_replace.match = $$rplbase/include include_replace.replace = $$[QT_INSTALL_HEADERS/raw] lib_replace.match = $$rplbase/lib -- cgit v1.2.3 From 6d90c2e9cbfeeb560ffaeed94d908997f90d0877 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Fri, 11 Jan 2013 00:30:25 +0100 Subject: adjust paths in installed prl files for mingw Curiously, qmake could fix .prl and .pc files for unix, but only .pc files for MinGW. qt_module.prf seems to have known this. Task-number: QTBUG-28902 Change-Id: Ice9983a69813690c0d4b96ca11589440182569a0 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_module.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 13ac35aa0e..8d436e63c5 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -196,11 +196,11 @@ unix|win32-g++* { lib_replace.match = $$rplbase/lib lib_replace.replace = $$[QT_INSTALL_LIBS/raw] QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace + QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace } unix { CONFIG += create_libtool explicitlib - QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw] QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace } -- cgit v1.2.3 From 2be4d6ba022e1349b1b231ae852235f557c6fc20 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 29 Jan 2013 21:51:31 +0100 Subject: fix path adjustments in installed metafiles Task-number: QTBUG-28902 Change-Id: Ia70da8f0f0b7abb4ea2a46cb4068c0827888b322 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_plugin.prf | 9 +++++++++ mkspecs/features/qt_plugin.prf | 10 ++++++++++ 2 files changed, 19 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index 7abd372e49..f9beabdc18 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -89,3 +89,12 @@ load(qt_targets) } load(qml_module) + +unix|win32-g++* { + !isEmpty(_QMAKE_SUPER_CACHE_): \ + lib_replace.match = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*/lib + else: \ + lib_replace.match = $$eval(QT.$${CXX_MODULE}.libs) + lib_replace.replace = $$[QT_INSTALL_LIBS/raw] + QMAKE_PRL_INSTALL_REPLACE += lib_replace +} diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 4861576eba..2ec523d78c 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -58,3 +58,13 @@ load(qt_targets) wince*:LIBS += $$QMAKE_LIBS_GUI QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + +unix|win32-g++* { + !isEmpty(_QMAKE_SUPER_CACHE_): \ + rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* + else: \ + rplbase = $$MODULE_QMAKE_OUTDIR + lib_replace.match = $$rplbase/lib + lib_replace.replace = $$[QT_INSTALL_LIBS/raw] + QMAKE_PRL_INSTALL_REPLACE += lib_replace +} -- cgit v1.2.3 From 839009c74f88e397f5bc6fad4dc5ce497072ef4b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 24 Jan 2013 20:32:30 +0100 Subject: fix duplicated installation of qml example files we need to collect the sources of the install targets for the check that all files have been properly handled, but of course we must not add these files to the source install target, as that would mean double installation. Change-Id: I6acb56f2a993b6ed81d1031d5dc0a0da30a53b54 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_example_installs.prf | 42 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 5417469909..5a87eeba64 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -9,6 +9,22 @@ # We mean it. # +defineTest(addInstallFiles) { + for(sf, 2) { + sf = $$relative_path($$sf, $$_PRO_FILE_PWD_) + contains(sf, \\..*) { + check_examples: message("Notice: $$_PRO_FILE_ refers to $$sf") + } else { + sfp = $$replace(sf, /.*, ) + !equals(sfp, $$sf): \ + $$1 *= $$sfp + else: \ + $$1 += $$sf + } + } + export($$1) +} + probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) !isEmpty(probase):!contains(probase, ^\\..*) { for(ex, EXAMPLE_FILES): \ @@ -42,34 +58,26 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) # Just for Qt Creator OTHER_FILES += $$sourcefiles - for(inst, INSTALLS): \ - !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \ - for(file, $${inst}.files): \ - sourcefiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_)) sourcefiles += \ $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \ $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ $$DBUS_ADAPTORS $$DBUS_INTERFACES - for(sf, sourcefiles) { - sf = $$relative_path($$sf, $$_PRO_FILE_PWD_) - contains(sf, \\..*) { - check_examples: message("Notice: $$_PRO_FILE_ refers to $$sf") - } else { - sfp = $$replace(sf, /.*, ) - !equals(sfp, $$sf): \ - sources.files *= $$sfp - else: \ - sources.files += $$sf - } - } + addInstallFiles(sources.files, $$sourcefiles) sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase INSTALLS += sources check_examples { + srcfiles = $$sources.files + for(inst, INSTALLS): \ + !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \ + for(file, $${inst}.files): \ + instfiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_)) + addInstallFiles(srcfiles, $$instfiles) + thefiles = $$files($$_PRO_FILE_PWD_/*) for(i, thefiles): \ allfiles += $$relative_path($$i, $$_PRO_FILE_PWD_) - for(i, sources.files): \ + for(i, srcfiles): \ allfiles -= $$relative_path($$i, $$_PRO_FILE_PWD_) for(i, SUBDIRS) { sd = $$eval($${i}.file) -- cgit v1.2.3 From 2b397f985e4ef6ae5c0571a928bb1320fb048c61 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 21 Dec 2012 19:36:12 +0100 Subject: do not actually build examples in production builds -developer-build enables an actual build of examples, based on the assumption that developers want to test it (it can be still disabled with -nomake examples). regular users otoh want only the examples sources installed. Change-Id: Ifc6a108099929175a3960480802b271a758fdd38 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_example_installs.prf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 5a87eeba64..ccb19fcbd4 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -92,4 +92,12 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) allfiles -= doc !isEmpty(allfiles): warning("remaining files in $$_PRO_FILE_PWD_: $$allfiles") } + + # Do not actually build the examples in production builds + !equals(TEMPLATE, subdirs):!contains(QT_CONFIG, private_tests) { + TEMPLATE = aux + CONFIG -= have_target qt staticlib dll + SOURCES = + INSTALLS -= target + } } -- cgit v1.2.3 From f75e897519183f4c5503f5c4d1c0b7046dc9d81c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 28 Jan 2013 20:25:33 +0100 Subject: centralize detection of prefix builds this makes the use sites more expressive Change-Id: Ib879de65d1cc26462fa61f5339e951f294515faf Reviewed-by: Joerg Bornemann --- mkspecs/features/qml_module.prf | 2 +- mkspecs/features/qt_build_config.prf | 5 ++++- mkspecs/features/qt_build_paths.prf | 4 ++-- mkspecs/features/qt_module.prf | 2 +- mkspecs/features/qt_tool.prf | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index e7d0b386b1..db5f6787b3 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -25,7 +25,7 @@ qml1_target: \ else: \ instbase = $$[QT_INSTALL_QML] -exists($$[QT_HOST_PREFIX]/.qmake.cache) { +!prefix_build { # These bizarre rules copy the files to the qtbase build directory defineReplace(qmlModStripSrcDir) { diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 48d6001aa9..4f5b62e1e5 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -20,7 +20,10 @@ debug(1, "Not loading qmodule.pri twice") } -!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):!exists($$[QT_HOST_DATA]/.qmake.cache) { +!exists($$[QT_HOST_DATA]/.qmake.cache): \ + CONFIG += prefix_build + +!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):prefix_build { # When doing a -prefix build of top-level qt5/qt.pro, we need to announce # this repo's module pris' location to the other repos. isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$shadowed($$dirname(_QMAKE_CONF_)) diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf index 123c87de3b..03b43e3153 100644 --- a/mkspecs/features/qt_build_paths.prf +++ b/mkspecs/features/qt_build_paths.prf @@ -16,8 +16,8 @@ isEmpty(MODULE_BASE_DIR): MODULE_BASE_DIR = $$MODULE_PROFILE_DIR isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_DIR) isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR -QTDIR = $$[QT_HOST_PREFIX] -exists($$QTDIR/.qmake.cache) { +!prefix_build { + QTDIR = $$[QT_HOST_PREFIX] # Permit modules to enforce being built outside QTDIR ... !force_independent: MODULE_BASE_OUTDIR = $$QTDIR # ... though this sort of breaks the idea. diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 50e946937c..810356c8b1 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -112,7 +112,7 @@ INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_inclu #other TEMPLATE = lib DESTDIR = $$eval(QT.$${MODULE}.libs) -win32:!wince*:exists($$[QT_INSTALL_PREFIX]/.qmake.cache): DLLDESTDIR = $$eval(QT.$${MODULE}.bins) +win32:!wince*:!prefix_build: DLLDESTDIR = $$eval(QT.$${MODULE}.bins) CONFIG += qmake_cache target_qt diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 16db6c7972..b449e4074d 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -31,7 +31,7 @@ load(qt_targets) # If we are doing a prefix build, create a "module" pri which enables # qtPrepareTool() to work with the non-installed build. -!build_pass:!exists($$[QT_INSTALL_PREFIX]/.qmake.cache) { +!build_pass:prefix_build { isEmpty(MODULE):MODULE = $$TARGET -- cgit v1.2.3 From 9e388bf692d4a499ec110132464190a7ec73e50b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 28 Jan 2013 21:07:14 +0100 Subject: qt_module_fwdpri.prf => qt_module_pris.prf move the regular pri file creation into the "sub-prf" and rename it accordingly. the original reason for the split was the deep magic in activeqt (and phonon), which is gone now. Change-Id: If40e941afc9293725630ed6bcf3e4ef18a692f66 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module.prf | 60 +------------- mkspecs/features/qt_module_fwdpri.prf | 92 ---------------------- mkspecs/features/qt_module_pris.prf | 144 ++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 151 deletions(-) delete mode 100644 mkspecs/features/qt_module_fwdpri.prf create mode 100644 mkspecs/features/qt_module_pris.prf (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 810356c8b1..855251425c 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -45,65 +45,7 @@ else: \ MODULE_DEFINE = QT_$${ucmodule}_LIB MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES -load(qt_build_paths) -MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri - -!build_pass { - - # Create a module .pri file - unix:!static: \ - module_rpath = "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" - else: \ - module_rpath = - !isEmpty(QT_FOR_PRIVATE) { - contains(QT_FOR_PRIVATE, .*-private$):error("QT_FOR_PRIVATE may not contain *-private.") - module_privdep = "QT.$${MODULE}.private_depends = $$QT_FOR_PRIVATE" - } else { - module_privdep = - } - static: \ - module_build_type = "QT.$${MODULE}.module_config = staticlib" - else:mac:contains(QT_CONFIG, qt_framework): \ - module_build_type = "QT.$${MODULE}.module_config = lib_bundle" - else: \ - module_build_type = - !isEmpty(MODULE_CONFIG): \ - module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG" - else: \ - module_config = - !no_module_headers { - MODULE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME" - MODULE_PRIVATE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \ - \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME" - } - MODULE_PRI_CONT = \ - "QT.$${MODULE}.VERSION = $${VERSION}" \ - "QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \ - "QT.$${MODULE}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \ - "QT.$${MODULE}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \ - "" \ - "QT.$${MODULE}.name = $$TARGET" \ - "QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \ - "QT.$${MODULE}.includes = $$MODULE_INCLUDES" \ - "QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \ - "QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \ - "QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \ - $$module_rpath \ - "QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \ - "QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \ - "QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE" \ - "QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \ - $$module_privdep \ - $$module_build_type \ - $$module_config \ - "QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting - "" \ - "QT_CONFIG += $$MODULE" # this is obsolete, but some code still depends on it - write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") - -} # !build_pass - -load(qt_module_fwdpri) +load(qt_module_pris) INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes) diff --git a/mkspecs/features/qt_module_fwdpri.prf b/mkspecs/features/qt_module_fwdpri.prf deleted file mode 100644 index 58b016803e..0000000000 --- a/mkspecs/features/qt_module_fwdpri.prf +++ /dev/null @@ -1,92 +0,0 @@ -# -# W A R N I N G -# ------------- -# -# This file is not part of the Qt API. It exists purely as an -# implementation detail. It may change from version to version -# without notice, or even be removed. -# -# We mean it. -# - -!build_pass { - - load(qt_build_paths) - - MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri - - # -rpath-link is used by the linker to find depedencies of dynamic - # libraries which were NOT specified on the command line. - # This means that .libs of each module's regular .depends (QT) don't - # need to be put there, as they appear on the linker line anyway. - # A module's QT_PRIVATE's .libs OTOH need to be put there. - # .depends_private (QT_FOR_PRIVATE) is somewhat special: if the privates - # are used, the libraries are explicitly linked. If not, their locations - # need to be put into -rpath-link. As QT_FOR_PRIVATE cannot in turn - # contain privates, they always end up in -rpath-link of dependant - # modules. - # For simplicity of use, each module's rpath list has all dependencies - # transitively resolved already. - pubqt = $$MODULE_DEPENDS $$QT_FOR_PRIVATE - pubdep = $$resolve_depends(pubqt, "QT.") - privqt = $$replace(QT_PRIVATE, -private$, ) - privdep = $$resolve_depends(privqt, "QT.") - rpaths = - alldep = $$pubdep $$privdep - for(dep, alldep) { # Inherit link-rpaths from all our dependencies - rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private) - } - privdep -= $$pubdep - for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths - rpaths += $$eval(QT.$${dep}.libs) - !isEmpty(rpaths) { - rpaths = $$unique(rpaths) - module_rpathlink = "QT.$${MODULE}.rpath_link = $$val_escape(rpaths)" - } else { - module_rpathlink = - } - rpaths_priv = - xtradep = $$resolve_depends(QT_FOR_PRIVATE, "QT.") - for(dep, xtradep): \ # Add our private API's dependencies' lib paths as new link-rpaths - rpaths_priv += $$eval(QT.$${dep}.libs) - rpaths_priv = $$unique(rpaths_priv) - rpaths_priv -= $$rpaths - !isEmpty(rpaths_priv) { - module_rpathlink_priv = "QT.$${MODULE}.rpath_link_private = $$val_escape(rpaths_priv)" - } else { - module_rpathlink_priv = - } - - # Create a forwarding module .pri file - MODULE_FWD_PRI_CONT = \ - "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \ - "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \ - "QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \ - "QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \ - "QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \ - "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \ - "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \ - $$module_rpathlink \ - $$module_rpathlink_priv \ - "include($$MODULE_PRI)" - write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.") - touch($$MODULE_FWD_PRI, $$MODULE_PRI) - - # Then, inject the new module into the current cache state - !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI) { # before the actual include()! - added = $$MODULE_PRI $$MODULE_FWD_PRI - cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added) - unset(added) - } - include($$MODULE_FWD_PRI) - for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ - name depends private_depends module_config CONFIG DEFINES sources \ - includes private_includes bins libs libexecs plugins imports qml \ - rpath_link rpath_link_private \ - )):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient) - cache(QT_CONFIG, transient) - -} # !build_pass - -# Schedule the regular .pri file for installation -CONFIG += qt_install_module diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf new file mode 100644 index 0000000000..7a3e7397b9 --- /dev/null +++ b/mkspecs/features/qt_module_pris.prf @@ -0,0 +1,144 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + +load(qt_build_paths) +MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri + +!build_pass { + + # Create a module .pri file + unix:!static: \ + module_rpath = "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" + else: \ + module_rpath = + !isEmpty(QT_FOR_PRIVATE) { + contains(QT_FOR_PRIVATE, .*-private$):error("QT_FOR_PRIVATE may not contain *-private.") + module_privdep = "QT.$${MODULE}.private_depends = $$QT_FOR_PRIVATE" + } else { + module_privdep = + } + static: \ + module_build_type = "QT.$${MODULE}.module_config = staticlib" + else:mac:contains(QT_CONFIG, qt_framework): \ + module_build_type = "QT.$${MODULE}.module_config = lib_bundle" + else: \ + module_build_type = + !isEmpty(MODULE_CONFIG): \ + module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG" + else: \ + module_config = + !no_module_headers { + MODULE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME" + MODULE_PRIVATE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \ + \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME" + } + MODULE_PRI_CONT = \ + "QT.$${MODULE}.VERSION = $${VERSION}" \ + "QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \ + "QT.$${MODULE}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \ + "QT.$${MODULE}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \ + "" \ + "QT.$${MODULE}.name = $$TARGET" \ + "QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \ + "QT.$${MODULE}.includes = $$MODULE_INCLUDES" \ + "QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \ + "QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \ + "QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \ + $$module_rpath \ + "QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \ + "QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \ + "QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE" \ + "QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \ + $$module_privdep \ + $$module_build_type \ + $$module_config \ + "QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting + "" \ + "QT_CONFIG += $$MODULE" # this is obsolete, but some code still depends on it + write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") + + MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri + + # -rpath-link is used by the linker to find depedencies of dynamic + # libraries which were NOT specified on the command line. + # This means that .libs of each module's regular .depends (QT) don't + # need to be put there, as they appear on the linker line anyway. + # A module's QT_PRIVATE's .libs OTOH need to be put there. + # .depends_private (QT_FOR_PRIVATE) is somewhat special: if the privates + # are used, the libraries are explicitly linked. If not, their locations + # need to be put into -rpath-link. As QT_FOR_PRIVATE cannot in turn + # contain privates, they always end up in -rpath-link of dependant + # modules. + # For simplicity of use, each module's rpath list has all dependencies + # transitively resolved already. + pubqt = $$MODULE_DEPENDS $$QT_FOR_PRIVATE + pubdep = $$resolve_depends(pubqt, "QT.") + privqt = $$replace(QT_PRIVATE, -private$, ) + privdep = $$resolve_depends(privqt, "QT.") + rpaths = + alldep = $$pubdep $$privdep + for(dep, alldep) { # Inherit link-rpaths from all our dependencies + rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private) + } + privdep -= $$pubdep + for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths + rpaths += $$eval(QT.$${dep}.libs) + !isEmpty(rpaths) { + rpaths = $$unique(rpaths) + module_rpathlink = "QT.$${MODULE}.rpath_link = $$val_escape(rpaths)" + } else { + module_rpathlink = + } + rpaths_priv = + xtradep = $$resolve_depends(QT_FOR_PRIVATE, "QT.") + for(dep, xtradep): \ # Add our private API's dependencies' lib paths as new link-rpaths + rpaths_priv += $$eval(QT.$${dep}.libs) + rpaths_priv = $$unique(rpaths_priv) + rpaths_priv -= $$rpaths + !isEmpty(rpaths_priv) { + module_rpathlink_priv = "QT.$${MODULE}.rpath_link_private = $$val_escape(rpaths_priv)" + } else { + module_rpathlink_priv = + } + + # Create a forwarding module .pri file + MODULE_FWD_PRI_CONT = \ + "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \ + "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \ + "QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \ + "QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \ + "QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \ + "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \ + "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \ + $$module_rpathlink \ + $$module_rpathlink_priv \ + "include($$MODULE_PRI)" + write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.") + touch($$MODULE_FWD_PRI, $$MODULE_PRI) + + # Then, inject the new module into the current cache state + !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI) { # before the actual include()! + added = $$MODULE_PRI $$MODULE_FWD_PRI + cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added) + unset(added) + } + include($$MODULE_FWD_PRI) + for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ + name depends private_depends module_config CONFIG DEFINES sources \ + includes private_includes bins libs libexecs plugins imports qml \ + rpath_link rpath_link_private \ + )):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient) + cache(QT_CONFIG, transient) + +} # !build_pass + +# Schedule the regular .pri file for installation +CONFIG += qt_install_module -- cgit v1.2.3 From 6654a05fcad565a302e205e7f7deaa0b2757082d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 28 Jan 2013 20:25:44 +0100 Subject: don't create forwarding module pris for non-prefix builds as everything is built inside the common build/install dir, there is no point in the fwd pri stuff. as a "side effect", this makes it more straight-forward to relocate non-prefix builds, which is the default on windows. Task-number: QTBUG-28827 Change-Id: I010246a9ad87cf74974dc168768b1a8625f73260 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module_pris.prf | 140 ++++++++++++++++++++---------------- 1 file changed, 78 insertions(+), 62 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 7a3e7397b9..7b5ccc0983 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -10,7 +10,11 @@ # load(qt_build_paths) -MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri +MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri +prefix_build: \ + MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri +else: \ + MODULE_PRI = $$MODULE_FWD_PRI !build_pass { @@ -64,72 +68,84 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri "" \ "QT_CONFIG += $$MODULE" # this is obsolete, but some code still depends on it write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") + MODULE_PRI_FILES = $$MODULE_PRI - MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri + prefix_build { - # -rpath-link is used by the linker to find depedencies of dynamic - # libraries which were NOT specified on the command line. - # This means that .libs of each module's regular .depends (QT) don't - # need to be put there, as they appear on the linker line anyway. - # A module's QT_PRIVATE's .libs OTOH need to be put there. - # .depends_private (QT_FOR_PRIVATE) is somewhat special: if the privates - # are used, the libraries are explicitly linked. If not, their locations - # need to be put into -rpath-link. As QT_FOR_PRIVATE cannot in turn - # contain privates, they always end up in -rpath-link of dependant - # modules. - # For simplicity of use, each module's rpath list has all dependencies - # transitively resolved already. - pubqt = $$MODULE_DEPENDS $$QT_FOR_PRIVATE - pubdep = $$resolve_depends(pubqt, "QT.") - privqt = $$replace(QT_PRIVATE, -private$, ) - privdep = $$resolve_depends(privqt, "QT.") - rpaths = - alldep = $$pubdep $$privdep - for(dep, alldep) { # Inherit link-rpaths from all our dependencies - rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private) - } - privdep -= $$pubdep - for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths - rpaths += $$eval(QT.$${dep}.libs) - !isEmpty(rpaths) { - rpaths = $$unique(rpaths) - module_rpathlink = "QT.$${MODULE}.rpath_link = $$val_escape(rpaths)" - } else { - module_rpathlink = - } - rpaths_priv = - xtradep = $$resolve_depends(QT_FOR_PRIVATE, "QT.") - for(dep, xtradep): \ # Add our private API's dependencies' lib paths as new link-rpaths - rpaths_priv += $$eval(QT.$${dep}.libs) - rpaths_priv = $$unique(rpaths_priv) - rpaths_priv -= $$rpaths - !isEmpty(rpaths_priv) { - module_rpathlink_priv = "QT.$${MODULE}.rpath_link_private = $$val_escape(rpaths_priv)" - } else { - module_rpathlink_priv = - } + # -rpath-link is used by the linker to find depedencies of dynamic + # libraries which were NOT specified on the command line. + # This means that .libs of each module's regular .depends (QT) don't + # need to be put there, as they appear on the linker line anyway. + # A module's QT_PRIVATE's .libs OTOH need to be put there. + # .depends_private (QT_FOR_PRIVATE) is somewhat special: if the privates + # are used, the libraries are explicitly linked. If not, their locations + # need to be put into -rpath-link. As QT_FOR_PRIVATE cannot in turn + # contain privates, they always end up in -rpath-link of dependant + # modules. + # For simplicity of use, each module's rpath list has all dependencies + # transitively resolved already. + pubqt = $$MODULE_DEPENDS $$QT_FOR_PRIVATE + pubdep = $$resolve_depends(pubqt, "QT.") + privqt = $$replace(QT_PRIVATE, -private$, ) + privdep = $$resolve_depends(privqt, "QT.") + rpaths = + alldep = $$pubdep $$privdep + for(dep, alldep) { # Inherit link-rpaths from all our dependencies + rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private) + } + privdep -= $$pubdep + for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths + rpaths += $$eval(QT.$${dep}.libs) + !isEmpty(rpaths) { + rpaths = $$unique(rpaths) + module_rpathlink = "QT.$${MODULE}.rpath_link = $$val_escape(rpaths)" + } else { + module_rpathlink = + } + rpaths_priv = + xtradep = $$resolve_depends(QT_FOR_PRIVATE, "QT.") + for(dep, xtradep): \ # Add our private API's dependencies' lib paths as new link-rpaths + rpaths_priv += $$eval(QT.$${dep}.libs) + rpaths_priv = $$unique(rpaths_priv) + rpaths_priv -= $$rpaths + !isEmpty(rpaths_priv) { + module_rpathlink_priv = "QT.$${MODULE}.rpath_link_private = $$val_escape(rpaths_priv)" + } else { + module_rpathlink_priv = + } - # Create a forwarding module .pri file - MODULE_FWD_PRI_CONT = \ - "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \ - "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \ - "QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \ - "QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \ - "QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \ - "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \ - "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \ - $$module_rpathlink \ - $$module_rpathlink_priv \ - "include($$MODULE_PRI)" - write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.") - touch($$MODULE_FWD_PRI, $$MODULE_PRI) + # Create a forwarding module .pri file + MODULE_FWD_PRI_CONT = \ + "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \ + "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \ + "QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \ + "QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \ + "QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \ + "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \ + "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \ + $$module_rpathlink \ + $$module_rpathlink_priv \ + "include($$MODULE_PRI)" + write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.") + touch($$MODULE_FWD_PRI, $$MODULE_PRI) + MODULE_PRI_FILES += $$MODULE_FWD_PRI + + } else { # prefix_build + + # This is needed for the direct include() below. + QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS] + QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS] + QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS] + QT_MODULE_QML_BASE = $$[QT_INSTALL_QML] + QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS] + QT_MODULE_LIBEXEC_BASE = $$[QT_INSTALL_LIBEXECS] + QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS] - # Then, inject the new module into the current cache state - !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI) { # before the actual include()! - added = $$MODULE_PRI $$MODULE_FWD_PRI - cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added) - unset(added) } + + # Then, inject the new module into the current cache state + !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI): \ # before the actual include()! + cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES) include($$MODULE_FWD_PRI) for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ name depends private_depends module_config CONFIG DEFINES sources \ -- cgit v1.2.3 From 06a6d1da589d68d72ef70bc0b19ab9ef39593164 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 17:20:33 +0100 Subject: substitute fixed version numbers in qdocconf files with variables Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2 Reviewed-by: Jerome Pasion Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_docs.prf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf index 99759c6da1..31f7b65c38 100644 --- a/mkspecs/features/qt_docs.prf +++ b/mkspecs/features/qt_docs.prf @@ -24,6 +24,13 @@ for(qmod, QMAKEMODULES): \ QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR !build_online_docs: \ QDOC += -installdir $$[QT_INSTALL_DOCS] +qtver.name = QT_VERSION +qtver.value = $$QT_VERSION +qtmver.name = QT_VER +qtmver.value = $${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION} +qtvertag.name = QT_VERSION_TAG +qtvertag.value = $$replace(QT_VERSION, \.,) +qtAddToolEnv(QDOC, qtver qtmver qtvertag) doc_command = $$QDOC $$QMAKE_DOCS prepare_docs { prepare_docs.commands += $$doc_command -prepare -no-link-errors -- cgit v1.2.3 From 4c34b418b89681d1228ab24749f4462bf0054d56 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 1 Feb 2013 17:30:31 +0100 Subject: fix lack of rpath-link when using modules from final location if the libraries are in a non-standard location, but no rpath is used, rpath-link is needed. this is often the case for non-prefix builds (which have no forwarding pris any more). as we cannot store absolute paths in the final pris, we need to store the module names, and resolve them only at use time. Change-Id: I1538b5d531611c76a2d7058a3b2ff683bdcbe427 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt.prf | 1 + mkspecs/features/qt_functions.prf | 27 +++++++++++++------- mkspecs/features/qt_module_pris.prf | 49 ++++--------------------------------- 3 files changed, 24 insertions(+), 53 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 9e36b6da16..5a1e39b1c7 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -67,6 +67,7 @@ qtAddModules(QT_PRIVATE, LIBS_PRIVATE) message("Running this project against other versions of the Qt modules may crash at any arbitrary point.") message("This is not a bug, but a result of using Qt internals. You have been warned!") } +qtAddRpathLink($$QT $$QT_PRIVATE) wince*:static:gui { QTLIB += qmenu_wce.res diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 389f2418ad..6fca19af57 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -121,15 +121,6 @@ defineTest(qtAddModule) { contains(MODULE_CONFIG, staticlib): \ PRE_TARGETDEPS *= $$MODULE_LIBS/$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB} - - # Make sure we can link to uninstalled libraries - !isEmpty(MODULE_LIBS) { - for(rpl, QT.$${1}.rpath_link): \ - QMAKE_RPATHLINKDIR *= $$rpl - !auto_use_privates:!isEqual(2, UsePrivate): \ - for(rpl, QT.$${1}.rpath_link_private): \ - QMAKE_RPATHLINKDIR *= $$rpl - } } # Only link to this module if a libs directory is set, else this is just a module # to give access to sources or include files, and not for linking. @@ -190,6 +181,24 @@ defineTest(qtAddModules) { export(using_privates) } +defineTest(qtAddRpathLink) { + # -rpath-link is used by the linker to find dependencies of dynamic + # libraries which were NOT specified on the command line. + # This means that paths of direct dependencies (QT & QT_PRIVATE) + # don't need to appear here. However, their private dependencies' + # paths OTOH need to be put there. + pubqt = $$replace(1, -private$, ) + pubdep = $$resolve_depends(pubqt, "QT.") + privdep = $$resolve_depends(pubqt, "QT.", ".depends" ".private_depends" ".run_depends") + privdep -= $$pubdep + rpaths = + for(dep, privdep): \ + rpaths += $$eval(QT.$${dep}.libs) + QMAKE_RPATHLINKDIR *= $$unique(rpaths) + QMAKE_RPATHLINKDIR -= $$QMAKE_RPATHDIR # -rpath implies -rpath-link + export(QMAKE_RPATHLINKDIR) +} + # variable, default defineTest(qtPrepareTool) { $$1 = $$eval(QT_TOOL.$${2}.command) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 7b5ccc0983..b74e5dd73f 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -29,6 +29,10 @@ else: \ } else { module_privdep = } + !isEmpty(QT_PRIVATE): \ + module_rundep = "QT.$${MODULE}.run_depends = $$unique($$list($$replace(QT_PRIVATE, -private$, )))" + else: \ + module_rundep = static: \ module_build_type = "QT.$${MODULE}.module_config = staticlib" else:mac:contains(QT_CONFIG, qt_framework): \ @@ -62,6 +66,7 @@ else: \ "QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE" \ "QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \ $$module_privdep \ + $$module_rundep \ $$module_build_type \ $$module_config \ "QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting @@ -72,48 +77,6 @@ else: \ prefix_build { - # -rpath-link is used by the linker to find depedencies of dynamic - # libraries which were NOT specified on the command line. - # This means that .libs of each module's regular .depends (QT) don't - # need to be put there, as they appear on the linker line anyway. - # A module's QT_PRIVATE's .libs OTOH need to be put there. - # .depends_private (QT_FOR_PRIVATE) is somewhat special: if the privates - # are used, the libraries are explicitly linked. If not, their locations - # need to be put into -rpath-link. As QT_FOR_PRIVATE cannot in turn - # contain privates, they always end up in -rpath-link of dependant - # modules. - # For simplicity of use, each module's rpath list has all dependencies - # transitively resolved already. - pubqt = $$MODULE_DEPENDS $$QT_FOR_PRIVATE - pubdep = $$resolve_depends(pubqt, "QT.") - privqt = $$replace(QT_PRIVATE, -private$, ) - privdep = $$resolve_depends(privqt, "QT.") - rpaths = - alldep = $$pubdep $$privdep - for(dep, alldep) { # Inherit link-rpaths from all our dependencies - rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private) - } - privdep -= $$pubdep - for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths - rpaths += $$eval(QT.$${dep}.libs) - !isEmpty(rpaths) { - rpaths = $$unique(rpaths) - module_rpathlink = "QT.$${MODULE}.rpath_link = $$val_escape(rpaths)" - } else { - module_rpathlink = - } - rpaths_priv = - xtradep = $$resolve_depends(QT_FOR_PRIVATE, "QT.") - for(dep, xtradep): \ # Add our private API's dependencies' lib paths as new link-rpaths - rpaths_priv += $$eval(QT.$${dep}.libs) - rpaths_priv = $$unique(rpaths_priv) - rpaths_priv -= $$rpaths - !isEmpty(rpaths_priv) { - module_rpathlink_priv = "QT.$${MODULE}.rpath_link_private = $$val_escape(rpaths_priv)" - } else { - module_rpathlink_priv = - } - # Create a forwarding module .pri file MODULE_FWD_PRI_CONT = \ "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \ @@ -123,8 +86,6 @@ else: \ "QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \ "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \ "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \ - $$module_rpathlink \ - $$module_rpathlink_priv \ "include($$MODULE_PRI)" write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.") touch($$MODULE_FWD_PRI, $$MODULE_PRI) -- cgit v1.2.3 From 04478614c1f21de8ff9abb7fe9dc64c672065695 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 5 Feb 2013 21:01:31 +0100 Subject: fix transitive linking for x-builds -rpath does *not* imply -rpath-link when x-building: ld(1): "Searching -rpath in this way is only supported by native linkers and cross linkers which have been configured with the --with-sysroot option." it doesn't hurt to have the "excess" -rpath-link for native builds, so just remove the cleanup. Change-Id: Ic39c1f4d6c2e3770d43a5ed3e56cf89a146edf85 Reviewed-by: Thiago Macieira --- mkspecs/features/qt_functions.prf | 1 - 1 file changed, 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 6fca19af57..b03e994b92 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -195,7 +195,6 @@ defineTest(qtAddRpathLink) { for(dep, privdep): \ rpaths += $$eval(QT.$${dep}.libs) QMAKE_RPATHLINKDIR *= $$unique(rpaths) - QMAKE_RPATHLINKDIR -= $$QMAKE_RPATHDIR # -rpath implies -rpath-link export(QMAKE_RPATHLINKDIR) } -- cgit v1.2.3 From 6944c012001dc3ad9956945934662d5621b11dc2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 4 Feb 2013 12:10:13 +0100 Subject: export QT_CONFIG instead of CONFIG to .pc files users need access to the Qt configuration, not some internals of module's build system. Change-Id: Ife3f668282969d444282d57152c11ed0f741076f Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module.prf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 8dce2634ca..fa3bea35ab 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -172,9 +172,8 @@ win32 { TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end -# Provides useful info normally only contained in the internal .qmake.cache file qt_conf.name = qt_config -qt_conf.variable = CONFIG +qt_conf.variable = QT_CONFIG QMAKE_PKGCONFIG_VARIABLES += qt_conf load(qt_targets) -- cgit v1.2.3 From bf915eeea29a482712c2d479d6cc1625315ec5f8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 4 Feb 2013 12:13:55 +0100 Subject: export QT_CONFIG only in Qt5Core.pc there is no point in duplicating the information in every module. host_bins is exported only here as well. Change-Id: I2f816e1cade9761a2c0d97c7ca1c90293095bfb1 Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- mkspecs/features/qt_module.prf | 4 ---- 1 file changed, 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index fa3bea35ab..4d533d165c 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -172,10 +172,6 @@ win32 { TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end -qt_conf.name = qt_config -qt_conf.variable = QT_CONFIG -QMAKE_PKGCONFIG_VARIABLES += qt_conf - load(qt_targets) win32:DEFINES+=_USE_MATH_DEFINES -- cgit v1.2.3 From dcada2a05d867dc83f579067168c813a20f2aa92 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 4 Feb 2013 12:43:22 +0100 Subject: beautify the pkg-config Name: field it's not used for anything other than display, so we can put a space there. Change-Id: I77e156856efeaaa964ff3bf2369bcd5586bac7c6 Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- mkspecs/features/qt_module.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 4d533d165c..4a43ba4490 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -148,7 +148,7 @@ unix { } unix|win32-g++* { - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, Qt$$section(VERSION, ., 0, 0)) + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$section(VERSION, ., 0, 0) ") for(i, MODULE_DEPENDS): \ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ -- cgit v1.2.3 From 132ba92ec2d672c44c3fc26b43b0293045d36586 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 4 Feb 2013 12:51:26 +0100 Subject: ensure consistent pkg-config file naming for macx qt frameworks the pkg-config file names follow the TARGET by default. as we create frameworks without the major version infix, all references to Qt5* would be invalid. Task-number: QTBUG-29453 Change-Id: I82e7de017a8f17f7d2d7b4a2a61a180125ca29a0 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module.prf | 1 + 1 file changed, 1 insertion(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 4a43ba4490..e6263af7a5 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -149,6 +149,7 @@ unix { unix|win32-g++* { QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$section(VERSION, ., 0, 0) ") + QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$section(VERSION, ., 0, 0)) for(i, MODULE_DEPENDS): \ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ -- cgit v1.2.3 From aac82954dac451f36263f85b8f1b113479006c0f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 8 Feb 2013 00:41:13 +0100 Subject: Include the CMake Extras file and the Macros file only once. As the Extras file can do things like append to a property (as in QtCore for include directories), that is something that should be done only once when the QtCore target is first defined. Change-Id: I5163912bccfda1ff43a02eb01f67ac59e6f6b24b Reviewed-by: Alexander Neundorf Reviewed-by: Stephen Kelly --- mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 36d0495222..0cdd2cc805 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -179,12 +179,12 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!ENDIF // CMAKE_RELEASE_TYPE -endif() - !!IF !isEmpty(CMAKE_MODULE_EXTRAS) -include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\") + include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\") !!ENDIF !!IF !isEmpty(CMAKE_MODULE_MACROS) -include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\") + include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\") !!ENDIF + +endif() -- cgit v1.2.3 From 316d8ececa3314ec16baf46ec4f1c5440cd951ef Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 8 Feb 2013 00:48:57 +0100 Subject: Don't duplicate the 'top-level' include dir in all modules. This is the /include directory which is independent of the module and which only has to be used once. As everything uses QtCore, it is enough to set it only there. The CI system is a special case, in that it tests things before installation. Handle that case too. Change-Id: Idcdf9617e199b7d490cb3553cce07f1f464b3bec Reviewed-by: Stephen Kelly --- mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 0cdd2cc805..c6fec811cd 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -14,13 +14,13 @@ set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME}) !!IF !no_module_headers !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) -set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") +set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/$${MODULE_INCNAME}\" ) !!ELSE -set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\") +set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\") set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\" \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/$${MODULE_INCNAME}\" -- cgit v1.2.3 From b9c1593435db3ed44e23c23dc19f22d7a68d7b01 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 11 Feb 2013 13:05:55 +0100 Subject: Fix regex for determining if a path is relative. Change-Id: I3d638220e16c215b737417c2bf8de02ddf4a8199 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/create_cmake.prf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 88b0e9ad8e..a06f268769 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -37,13 +37,13 @@ CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::") !isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}" CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_INCLUDE_DIR, "^\.\.") { +contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True } CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_LIB_DIR, "^\.\.") { +contains(CMAKE_LIB_DIR, "^\\.\\./.*") { CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ CMAKE_LIB_DIR_IS_ABSOLUTE = True } else { @@ -54,13 +54,13 @@ contains(CMAKE_LIB_DIR, "^\.\.") { } CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_BIN_DIR, "^\.\.") { +contains(CMAKE_BIN_DIR, "^\\.\\./.*") { CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ CMAKE_BIN_DIR_IS_ABSOLUTE = True } CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_ARCHDATA_DIR, "^\.\.") { # For the mkspecs +contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/ CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True } -- cgit v1.2.3 From 46f1c12b9ee60824545069a5fa5564696332b6fb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 6 Feb 2013 15:42:49 +0100 Subject: use install path as fallback when locating tools all non-installed tools are properly registered, so they don't need the fallback. conversely, we can assume that non-registered tools are already installed. this enables us to build docs in qtbase after an incremental build+install up to qttools. Change-Id: I95a55f6b84e01885bcf6dd656caf0dd2b679bb73 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index b03e994b92..aaf7a4710e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -202,7 +202,7 @@ defineTest(qtAddRpathLink) { defineTest(qtPrepareTool) { $$1 = $$eval(QT_TOOL.$${2}.command) isEmpty($$1) { - $$1 = $$[QT_HOST_BINS/get]/$$2 + $$1 = $$[QT_HOST_BINS]/$$2 contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) { exists($$eval($$1).bat) { $$1 = $$eval($$1).bat -- cgit v1.2.3 From e95a758236cf2c68e33da4ddb62bff4fe8d9dd8b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 11 Feb 2013 13:21:28 +0100 Subject: If the libdir is absolute, make the config file non-relocatable. If Qt is configured with -libdir /some/dir/outside/the/install/prefix/, then for use absolute paths for the executables and include dirs too. Change-Id: I5ccf62be6f93f97d934df62038fe4cd40dca9a93 Reviewed-by: Alexander Neundorf Reviewed-by: Stephen Kelly --- mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index c6fec811cd..51d66822ae 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -3,7 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 2.8.3) message(FATAL_ERROR \"Qt 5 requires at least CMake version 2.8.3\") endif() +!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +!!ELSE +set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +!!ENDIF set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MAJOR "$$eval(QT.$${MODULE}.MAJOR_VERSION)") set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MINOR "$$eval(QT.$${MODULE}.MINOR_VERSION)") -- cgit v1.2.3