Skip to content

Commit

Permalink
Cmake/MSVC: Fix Qt6 discover for IDEs other than Visual Studio
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phire committed Jan 31, 2023
1 parent 2843cd1 commit 1956ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
16 changes: 0 additions & 16 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"buildRoot": "${workspaceRoot}\\Build\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64"
}
]
},
{
Expand All @@ -24,10 +20,6 @@
"buildRoot": "${workspaceRoot}\\Build\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\x64"
}
]
},
{
Expand All @@ -39,10 +31,6 @@
"buildRoot": "${workspaceRoot}\\Build\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64"
},
{
"name": "CMAKE_SYSTEM_NAME",
"value": "Windows"
Expand All @@ -62,10 +50,6 @@
"buildRoot": "${workspaceRoot}\\Build\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "CMAKE_PREFIX_PATH",
"value": "${workspaceRoot}\\Externals\\Qt\\Qt6.3.0\\ARM64"
},
{
"name": "CMAKE_SYSTEM_NAME",
"value": "Windows"
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/DolphinQt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 1956ce1

Please sign in to comment.