feat(windows builds): add CMakePresets.json and installqt.ps1
- with default windows builds, make setting up even in visual studio a brease. - install qt on windows to `./libraries/Qt` Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
9137721e8e
commit
8c0a19d0c5
2
.gitignore
vendored
2
.gitignore
vendored
@ -56,3 +56,5 @@ flatbuild
|
|||||||
|
|
||||||
# Snap
|
# Snap
|
||||||
*.snap
|
*.snap
|
||||||
|
libraries/Qt/
|
||||||
|
aqtinstall.log
|
||||||
|
99
CMakePresets.json
Normal file
99
CMakePresets.json
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"version": 5,
|
||||||
|
"cmakeMinimumRequired": {
|
||||||
|
"major": 3,
|
||||||
|
"minor": 15,
|
||||||
|
"patch": 0
|
||||||
|
},
|
||||||
|
"include": [],
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_default",
|
||||||
|
"displayName": "MSVC Debug",
|
||||||
|
"description": "MSVC build using Visual Studio generator",
|
||||||
|
"generator": "Visual Studio 17 2022",
|
||||||
|
"binaryDir": "${sourceDir}/build/",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "install",
|
||||||
|
"Launcher_QT_VERSION_MAJOR": "6",
|
||||||
|
"CMAKE_PREFIX_PATH": "${sourceDir}/libraries/Qt/6.5.1/msvc2019_64/lib/cmake",
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-Qt6",
|
||||||
|
"Launcher_BUILD_PLATFORM": "custom",
|
||||||
|
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL",
|
||||||
|
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "yes"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CXX_FLAGS": ""
|
||||||
|
},
|
||||||
|
"vendor": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_debug_ninja",
|
||||||
|
"displayName": "MSVC Debug Ninja",
|
||||||
|
"description": "MSVC build using Ninja generator",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build/",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "install",
|
||||||
|
"Launcher_QT_VERSION_MAJOR": "6",
|
||||||
|
"CMAKE_PREFIX_PATH": "${sourceDir}/libraries/Qt/6.5.1/msvc2019_64/lib/cmake",
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-Qt6",
|
||||||
|
"Launcher_BUILD_PLATFORM": "custom",
|
||||||
|
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL",
|
||||||
|
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "yes"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CXX_FLAGS": ""
|
||||||
|
},
|
||||||
|
"vendor": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_release",
|
||||||
|
"displayName": "MSVC Release",
|
||||||
|
"description": "MSVC build using Ninja generator",
|
||||||
|
"generator": "Visual Studio 17 2022",
|
||||||
|
"binaryDir": "${sourceDir}/build/",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "install",
|
||||||
|
"Launcher_QT_VERSION_MAJOR": "6",
|
||||||
|
"CMAKE_PREFIX_PATH": "${sourceDir}/libraries/Qt/6.5.1/msvc2019_64/lib/cmake",
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-Qt6",
|
||||||
|
"Launcher_BUILD_PLATFORM": "custom",
|
||||||
|
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL",
|
||||||
|
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CXX_FLAGS": ""
|
||||||
|
},
|
||||||
|
"vendor": {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_default",
|
||||||
|
"configurePreset": "windows_default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_release",
|
||||||
|
"configurePreset": "windows_release"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_default",
|
||||||
|
"configurePreset": "windows_default",
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
},
|
||||||
|
"execution": {
|
||||||
|
"noTestsAction": "error",
|
||||||
|
"stopOnFailure": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
23
installQT.ps1
Normal file
23
installQT.ps1
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
$aqt_url = "https://github.com/miurahr/aqtinstall/releases/latest/download/aqt.exe"
|
||||||
|
$qt_path = ( Join-Path -Path "$PSScriptRoot/libraries" -ChildPath "Qt" )
|
||||||
|
New-Item -ItemType Directory -Path $qt_path -ErrorAction SilentlyContinue
|
||||||
|
$aqt_path = ( Join-Path -Path $qt_path -ChildPath "aqt.exe" )
|
||||||
|
|
||||||
|
if (!([System.IO.File]::Exists($aqt_path))) {
|
||||||
|
Start-BitsTransfer -Source $aqt_url -Destination $aqt_path
|
||||||
|
}
|
||||||
|
# Invoke-WebRequest -Uri $aqt_url -OutFile $aqt_path
|
||||||
|
#
|
||||||
|
$qt_ver = "6.5.1"
|
||||||
|
$system_arch = (Get-CimInstance -Class Win32_ComputerSystem).SystemType
|
||||||
|
$qt_arch = Switch ($system_arch) {
|
||||||
|
{$_ -match "x64" } { "win64_msvc2019_64" }
|
||||||
|
{$_ -match "ARM" } { "win64_msvc2019_arm64" }
|
||||||
|
}
|
||||||
|
|
||||||
|
$aqt_install_args = @("install-qt", "windows", "desktop", $qt_ver, $qt_arch, "-m", "all", "--outputdir", $qt_path )
|
||||||
|
|
||||||
|
# call_aqt $aqt_install_args
|
||||||
|
$p = Start-Process -FilePath $aqt_path -ArgumentList $aqt_install_args -Wait
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user