diff options
author | Liang Qi <liang.qi@qt.io> | 2020-01-28 09:16:11 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-01-28 09:16:11 +0100 |
commit | 54b1f1d199eb0d03883240bcbb688fc3051005f0 (patch) | |
tree | 40277c535779db90c690a1e05fcbbc21c90b7454 /mkspecs | |
parent | 1ed802e3b8a7f236bd277719090f461a87eae78e (diff) | |
parent | 0ab53fbdda2fd7f24f45dcd52fbd195e282554da (diff) |
Merge remote-tracking branch 'origin/5.14.1' into 5.14
Conflicts:
mkspecs/features/create_cmake.prf
Done-With: Artem Pisarenko <artem.k.pisarenko@gmail.com>
Change-Id: I2ecb9fdca06fe687be8ab3457a58dd81e5e81c4c
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/android/android.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/create_cmake.prf | 25 | ||||
-rw-r--r-- | mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 15 | ||||
-rw-r--r-- | mkspecs/features/qt_functions.prf | 19 | ||||
-rw-r--r-- | mkspecs/features/resources.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/yacc.prf | 4 |
6 files changed, 46 insertions, 21 deletions
diff --git a/mkspecs/features/android/android.prf b/mkspecs/features/android/android.prf index 8290286ec6..6990417536 100644 --- a/mkspecs/features/android/android.prf +++ b/mkspecs/features/android/android.prf @@ -36,7 +36,7 @@ build_pass { } } } else: contains(TEMPLATE, "lib"):!static:!QTDIR_build:android_install { - tmpvar = $$str_member(TARGET, -$$str_size(QT_ARCH), -1) + tmpvar = $$str_member($$TARGET, -$$str_size($${QT_ARCH}), -1) !equals(tmpvar, $${QT_ARCH}): TARGET = $${TARGET}_$${QT_ARCH} target.path = /libs/$$ANDROID_TARGET_ARCH/ INSTALLS *= target diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 0d93597012..0e71fd0015 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -212,17 +212,20 @@ contains(CONFIG, plugin) { CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _) win32 { + !mingw|qtConfig(debug_and_release): debug_suffix="d" + CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl + CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl + isEmpty(CMAKE_STATIC_TYPE) { CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll - CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.dll + CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.dll } else:mingw { CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a - CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.a + CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a } else { # MSVC static CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib - CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.lib + CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib } } else { mac { @@ -309,27 +312,29 @@ mac { CMAKE_WINDOWS_BUILD = "true" CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" - CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll + !mingw|qtConfig(debug_and_release): debug_suffix="d" + + CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll !isEmpty(CMAKE_STATIC_TYPE) { CMAKE_STATIC_WINDOWS_BUILD = "true" - CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl + CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl } mingw { - CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a + CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a } else { - CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib + CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib } } else { diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 26d4c17e6c..50364765fb 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -72,6 +72,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends \"${_prl_strings}\") string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries \"${CMAKE_CXX_STANDARD_LIBRARIES}\") set(_search_paths) + set(_fw_search_paths) set(_framework_flag) string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\") foreach(_flag ${_static_depends}) @@ -79,10 +80,13 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura if(_flag MATCHES \"^-framework$\") # Handle the next flag as framework name set(_framework_flag 1) + elseif(_flag MATCHES \"^-F(.*)$\") + # Handle -F/foo/bar flags by recording the framework search paths to be used + # by find_library. + list(APPEND _fw_search_paths \"${CMAKE_MATCH_1}\") elseif(_framework_flag OR _flag MATCHES \"^-l(.*)$\") if(_framework_flag) # Handle Darwin framework bundles passed as -framework Foo - unset(_framework_flag) set(_lib ${_flag}) else() # Handle normal libraries passed as -lfoo @@ -100,8 +104,12 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura find_package(Threads REQUIRED) list(APPEND _lib_deps Threads::Threads) else() - if(_search_paths) - find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${_search_paths} NO_DEFAULT_PATH) + set(current_search_paths \"${_search_paths}\") + if(_framework_flag) + set(current_search_paths \"${_fw_search_paths}\") + endif() + if(current_search_paths) + find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${current_search_paths} NO_DEFAULT_PATH) endif() find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib}) mark_as_advanced(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH) @@ -112,6 +120,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura else() message(FATAL_ERROR \"Library not found: ${_lib}\") endif() + unset(_framework_flag) endif() elseif(EXISTS \"${_flag}\") # The flag is an absolute path to an existing library diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 45d4492788..7777e615bd 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -2,10 +2,21 @@ defineReplace(qtPlatformTargetSuffix) { suffix = android: return($${suffix}_$${QT_ARCH}) - else: CONFIG(debug, debug|release) { - !debug_and_release|build_pass { - mac: return($${suffix}_debug) - win32: return($${suffix}d) + win32 { + CONFIG(debug, debug|release) { + mingw { + qtConfig(debug_and_release):build_pass: \ + return($${suffix}d) + } else { + !debug_and_release|build_pass: \ + return($${suffix}d) + } + } + } + darwin { + CONFIG(debug, debug|release) { + !debug_and_release|build_pass: \ + return($${suffix}_debug) } } return($$suffix) diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index cee0981db0..6d9f27b86b 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -30,7 +30,7 @@ qtFlattenResources() "{" \ for (resource, RESOURCES) { - resource_name = $$section($$list($$basename(resource)), ., 0, 0) + resource_name = $$replace($$list($$basename(resource)),\.qrc$, ) resource_name = $$replace(resource_name, [^a-zA-Z0-9_], _) RESOURCE_INIT_CONT += " Q_INIT_RESOURCE($$resource_name);" } diff --git a/mkspecs/features/yacc.prf b/mkspecs/features/yacc.prf index 0c7ff7321e..8acb9bc4bd 100644 --- a/mkspecs/features/yacc.prf +++ b/mkspecs/features/yacc.prf @@ -30,8 +30,8 @@ defineReplace(yaccCommands) { commands = \ -$(DEL_FILE) $${hpp_output} $${cpp_output}$$escape_expand(\\n\\t) \ $${yacc_call}$$escape_expand(\\n\\t) \ - $(MOVE) $${YACC_DIR}/$${QMAKE_YACC_HEADER} $${hpp_output}$$escape_expand(\\n\\t) \ - $(MOVE) $${YACC_DIR}/$${QMAKE_YACC_SOURCE} $${cpp_output}$$escape_expand(\\n\\t) + $(MOVE) $$shell_path($${YACC_DIR}/$${QMAKE_YACC_HEADER}) $${hpp_output}$$escape_expand(\\n\\t) \ + $(MOVE) $$shell_path($${YACC_DIR}/$${QMAKE_YACC_SOURCE}) $${cpp_output}$$escape_expand(\\n\\t) silent: commands = @echo Yacc $$1 && $$commands return($$commands) |