diff options
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 11 | ||||
-rw-r--r-- | mkspecs/features/qt_build_config.prf | 4 | ||||
-rw-r--r-- | mkspecs/features/qt_common.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/qt_configure.prf | 10 | ||||
-rw-r--r-- | mkspecs/features/qt_module.prf | 5 | ||||
-rw-r--r-- | mkspecs/features/qt_prefix_build_check.prf | 21 |
6 files changed, 51 insertions, 6 deletions
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index aca8703238..1c4994c30f 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -59,6 +59,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\") string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings}) string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends}) + string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries ${CMAKE_CXX_STANDARD_LIBRARIES}) set(_search_paths) string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\") foreach(_flag ${_static_depends}) @@ -66,7 +67,15 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura if(_flag MATCHES \"^-l(.*)$\") # Handle normal libraries passed as -lfoo set(_lib \"${CMAKE_MATCH_1}\") - if(_lib MATCHES \"^pthread$\") + foreach(_standard_library ${_standard_libraries}) + if(_standard_library MATCHES \"^${_lib}(\\.lib)?$\") + set(_lib_is_default_linked TRUE) + break() + endif() + endforeach() + if (_lib_is_default_linked) + unset(_lib_is_default_linked) + elseif(_lib MATCHES \"^pthread$\") find_package(Threads REQUIRED) list(APPEND _lib_deps Threads::Threads) else() diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 0c6c10dded..8a7c9c28d3 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -37,8 +37,10 @@ intel_icl { QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR +load(qt_prefix_build_check) + # force_independent can be set externally. prefix_build not. -!exists($$[QT_HOST_DATA]/.qmake.cache): \ +qtIsPrefixBuild($$[QT_HOST_DATA]): \ CONFIG += prefix_build force_independent !build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent { diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 53a20691ed..c24f2c6062 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -51,6 +51,12 @@ contains(TEMPLATE, .*lib) { } lib_replace.CONFIG = path QMAKE_PRL_INSTALL_REPLACE += lib_replace + !equals(qt_libdir, $$rplbase/lib) { + qtlibdir_replace.match = $$qt_libdir + qtlibdir_replace.replace = $$qqt_libdir + qtlibdir_replace.CONFIG = path + QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace + } } # The remainder of this file must not apply to host tools/libraries, diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 7c48badfaf..2ac9de266f 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -2517,17 +2517,19 @@ logn("Configure summary:") logn() qtConfPrintReport() +load(qt_prefix_build_check) + # final notes for the user logn() logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.") pfx = $$[QT_INSTALL_PREFIX] -exists($$pfx/.qmake.cache) { +qtIsPrefixBuild($$pfx) { + logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.") + logn("Qt will be installed into '$$system_path($$pfx)'.") +} else { logn("Once everything is built, Qt is installed.") logn("You should NOT run '$$QMAKE_MAKE_NAME install'.") logn("Note that this build cannot be deployed to other machines or devices.") -} else { - logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.") - logn("Qt will be installed into '$$system_path($$pfx)'.") } logn() logn("Prior to reconfiguration, make sure you remove any leftovers from") diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 213556904d..cb3707cf8c 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -82,6 +82,11 @@ header_module { CONFIG += force_qt # Needed for the headers_clean tests. !lib_bundle: \ CONFIG += qt_no_install_library + + # Allow creation of .prl, .la and .pc files. + target.path = $$[QT_INSTALL_LIBS] + target.CONFIG += dummy_install + INSTALLS += target } else { TEMPLATE = lib } diff --git a/mkspecs/features/qt_prefix_build_check.prf b/mkspecs/features/qt_prefix_build_check.prf new file mode 100644 index 0000000000..3f98847de9 --- /dev/null +++ b/mkspecs/features/qt_prefix_build_check.prf @@ -0,0 +1,21 @@ +# +# 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. +# + +defineTest(qtIsPrefixBuild) { + prefixdir = $$1 + # qtbase non-prefix build? + exists($$prefixdir/.qmake.cache): \ + return(false) + # top-level non-prefix build? + contains(prefixdir, .*/qtbase):exists($$dirname(prefixdir)/.qmake.super): \ + return(false) + return(true) +} |