From dbee810a04ab6ed207af4038202ee05a1a8b900c Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Fri, 20 May 2022 17:14:05 +0200 Subject: [PATCH] cmake: Fixes for Qt6 on Windows. --- CMakeSettings.json | 16 ++++++++-------- Source/Core/DolphinQt/CMakeLists.txt | 9 ++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CMakeSettings.json b/CMakeSettings.json index 94812b270f..491c378ec8 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -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", diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index 7f65c62179..d594b323fb 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -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 "$" )