QmlDesigner: fix build with MSVC2022

Change-Id: Ifef972c0b8ef0f4810c7c55d87d1d21cdc0d1801
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenßen
2024-09-05 20:31:59 +02:00
committed by Tim Jenssen
parent 6a50339e67
commit a949d50f33
2 changed files with 23 additions and 1 deletions

View File

@@ -100,4 +100,22 @@ function(configure_qml_designer Qt6_VERSION)
env_with_default("QTC_IS_SUPPORTED_PROJECTSTORAGE_QT" ENV_QTC_IS_SUPPORTED_PROJECTSTORAGE_QT ${QTC_IS_SUPPORTED_PROJECTSTORAGE_QT_DEFAULT}) env_with_default("QTC_IS_SUPPORTED_PROJECTSTORAGE_QT" ENV_QTC_IS_SUPPORTED_PROJECTSTORAGE_QT ${QTC_IS_SUPPORTED_PROJECTSTORAGE_QT_DEFAULT})
option(IS_SUPPORTED_PROJECTSTORAGE_QT "IS_SUPPORTED_PROJECTSTORAGE_QT" ${ENV_QTC_IS_SUPPORTED_PROJECTSTORAGE_QT}) option(IS_SUPPORTED_PROJECTSTORAGE_QT "IS_SUPPORTED_PROJECTSTORAGE_QT" ${ENV_QTC_IS_SUPPORTED_PROJECTSTORAGE_QT})
add_feature_info("IS_SUPPORTED_PROJECTSTORAGE_QT" ${IS_SUPPORTED_PROJECTSTORAGE_QT} "is ${IS_SUPPORTED_PROJECTSTORAGE_QT}") add_feature_info("IS_SUPPORTED_PROJECTSTORAGE_QT" ${IS_SUPPORTED_PROJECTSTORAGE_QT} "is ${IS_SUPPORTED_PROJECTSTORAGE_QT}")
# to enable define QML_DOM_MSVC2019_COMPAT if necessary, see QTBUG-127761
if(NOT DEFINED QT_BUILT_WITH_MSVC2019)
get_target_property(QT_QMAKE_EXECUTABLE Qt6::qmake IMPORTED_LOCATION)
execute_process(
COMMAND dumpbin /headers ${QT_QMAKE_EXECUTABLE} | findstr /c:"linker version"
OUTPUT_VARIABLE DUMPBIN_OUTPUT
)
string(FIND "${DUMPBIN_OUTPUT}" "14.2" QT_BUILT_WITH_MSVC2019)
if(QT_BUILT_WITH_MSVC2019 GREATER -1)
set(QT_BUILT_WITH_MSVC2019 TRUE CACHE BOOL "Qt was built with MSVC 2019")
else()
set(QT_BUILT_WITH_MSVC2019 FALSE CACHE BOOL "Qt was not built with MSVC 2019")
endif()
endif()
endfunction() endfunction()

View File

@@ -368,11 +368,15 @@ extend_qtc_library(QmlDesignerCore
storagecachefwd.h storagecachefwd.h
) )
extend_qtc_library(QmlDesignerCore
CONDITION QT_BUILT_WITH_MSVC2019
DEFINES QML_DOM_MSVC2019_COMPAT
)
extend_qtc_library(QmlDesignerCore extend_qtc_library(QmlDesignerCore
SOURCES_PREFIX projectstorage SOURCES_PREFIX projectstorage
PUBLIC_INCLUDES projectstorage PUBLIC_INCLUDES projectstorage
SOURCES_PROPERTIES SKIP_AUTOGEN ON SOURCES_PROPERTIES SKIP_AUTOGEN ON
DEFINES QML_DOM_MSVC2019_COMPAT # can be removed for Qt 6.8
SOURCES SOURCES
commontypecache.h commontypecache.h
directorypathcompressor.h directorypathcompressor.h