cmake: Fixes for Qt6 on Windows.

This commit is contained in:
Admiral H. Curtiss 2022-05-20 17:14:05 +02:00
parent 96e2f1f95e
commit dbee810a04
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
2 changed files with 16 additions and 9 deletions

View File

@ -10,8 +10,8 @@
"cmakeCommandArgs": "",
"variables": [
{
"name": "QT_DIR",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64\\lib\\cmake\\Qt6"
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64"
}
]
},
@ -25,8 +25,8 @@
"cmakeCommandArgs": "",
"variables": [
{
"name": "QT_DIR",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64\\lib\\cmake\\Qt6"
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64"
}
]
},
@ -40,8 +40,8 @@
"cmakeCommandArgs": "",
"variables": [
{
"name": "QT_DIR",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64\\lib\\cmake\\Qt6"
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64"
},
{
"name": "CMAKE_SYSTEM_NAME",
@ -63,8 +63,8 @@
"cmakeCommandArgs": "",
"variables": [
{
"name": "QT_DIR",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64\\lib\\cmake\\Qt6"
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64"
},
{
"name": "CMAKE_SYSTEM_NAME",

View File

@ -427,6 +427,13 @@ if(WIN32)
get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY)
find_program(WINDEPLOYQT_EXE windeployqt HINTS "${QT_BINARY_DIRECTORY}")
if ("${QT_VERSION_MAJOR}" LESS 6)
set(NO_ANGLE_PARAM "--no-angle")
else()
# parameter no longer exists in Qt6
set(NO_ANGLE_PARAM "")
endif()
# Note: We set the PATH for the duration of this command so that the
# deployment application is able to locate the Qt libraries to copy.
# if the necessary paths aren't already set beforehand.
@ -449,7 +456,7 @@ if(WIN32)
--no-translations
--no-compiler-runtime
--no-system-d3d-compiler
--no-angle
"${NO_ANGLE_PARAM}"
--no-opengl-sw
"$<TARGET_FILE:dolphin-emu>"
)