diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-29 21:03:34 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 23:19:46 +1300 |
| commit | 1956ce151fddee2e0ff9908246de5d173d72282d (patch) | |
| tree | 60037dbe65841c04eda158596d58c985986f237c | |
| parent | 2843cd10a8b3fddc4d545ad1afc0986a5db02bde (diff) | |
Cmake/MSVC: Fix Qt6 discover for IDEs other than Visual Studio
CMakeSettings.json is a Visual Studio only extention to cmake that isn't
supported anywhere else. Not even Visual Studio Code.
So we set CMAKE_PREFIX_PATH inside DolphinQt's CMakeLists.txt instead.
| -rw-r--r-- | CMakeSettings.json | 16 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/CMakeLists.txt | 6 |
2 files changed, 3 insertions, 19 deletions
diff --git a/CMakeSettings.json b/CMakeSettings.json index 491c378ec8..72ac09bacc 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -9,10 +9,6 @@ "buildRoot": "${workspaceRoot}\\Build\\${name}", "cmakeCommandArgs": "", "variables": [ - { - "name": "CMAKE_PREFIX_PATH", - "value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64" - } ] }, { @@ -24,10 +20,6 @@ "buildRoot": "${workspaceRoot}\\Build\\${name}", "cmakeCommandArgs": "", "variables": [ - { - "name": "CMAKE_PREFIX_PATH", - "value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64" - } ] }, { @@ -40,10 +32,6 @@ "cmakeCommandArgs": "", "variables": [ { - "name": "CMAKE_PREFIX_PATH", - "value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64" - }, - { "name": "CMAKE_SYSTEM_NAME", "value": "Windows" }, @@ -63,10 +51,6 @@ "cmakeCommandArgs": "", "variables": [ { - "name": "CMAKE_PREFIX_PATH", - "value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64" - }, - { "name": "CMAKE_SYSTEM_NAME", "value": "Windows" }, diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index a9e07afe0b..a5463c8c27 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -3,11 +3,11 @@ if(POLICY CMP0084) cmake_policy(SET CMP0084 NEW) endif() -if (NOT QT_DIR AND MSVC) +if (MSVC) if(_M_ARM_64) - set(QT_DIR "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.3.0/ARM64/lib/cmake/Qt6") + list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.3.0/ARM64") else() - set(QT_DIR "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.3.0/x64/lib/cmake/Qt6") + list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.3.0/x64") endif() endif() |
