mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-09-09 12:03:41 -04:00
Use Ninja for MSVC release and cross builds (#3938)
This commit is contained in:
commit
19e69b7197
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
@ -13,12 +13,12 @@ on:
|
||||
- "**.ui"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
@ -26,21 +26,23 @@ on:
|
||||
|
||||
# Workflows
|
||||
- ".github/workflows/build.yml"
|
||||
- ".github/actions/package/"
|
||||
- ".github/actions/setup-dependencies/"
|
||||
- ".github/actions/package/**"
|
||||
- ".github/actions/setup-dependencies/**"
|
||||
pull_request:
|
||||
paths:
|
||||
# File types
|
||||
- "**.cpp"
|
||||
- "**.h"
|
||||
- "**.java"
|
||||
- "**.ui"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
@ -48,8 +50,8 @@ on:
|
||||
|
||||
# Workflows
|
||||
- ".github/workflows/build.yml"
|
||||
- ".github/actions/package/"
|
||||
- ".github/actions/setup-dependencies/"
|
||||
- ".github/actions/package/**"
|
||||
- ".github/actions/setup-dependencies/**"
|
||||
workflow_call:
|
||||
inputs:
|
||||
build-type:
|
||||
|
34
.github/workflows/codeql.yml
vendored
34
.github/workflows/codeql.yml
vendored
@ -13,43 +13,45 @@ on:
|
||||
- "**.ui"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
- "COPYING.md"
|
||||
|
||||
# Workflows
|
||||
- ".github/codeql"
|
||||
- ".github/codeql/**"
|
||||
- ".github/workflows/codeql.yml"
|
||||
- ".github/actions/setup-dependencies/"
|
||||
- ".github/actions/setup-dependencies/**"
|
||||
pull_request:
|
||||
paths:
|
||||
# File types
|
||||
- "**.cpp"
|
||||
- "**.h"
|
||||
- "**.java"
|
||||
- "**.ui"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
- "COPYING.md"
|
||||
|
||||
# Workflows
|
||||
- ".github/codeql"
|
||||
- ".github/codeql/**"
|
||||
- ".github/workflows/codeql.yml"
|
||||
- ".github/actions/setup-dependencies/"
|
||||
- ".github/actions/setup-dependencies/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
30
.github/workflows/flatpak.yml
vendored
30
.github/workflows/flatpak.yml
vendored
@ -16,15 +16,15 @@ on:
|
||||
- "**.ui"
|
||||
|
||||
# Build files
|
||||
- "flatpak/"
|
||||
- "flatpak/**"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
@ -37,17 +37,19 @@ on:
|
||||
# File types
|
||||
- "**.cpp"
|
||||
- "**.h"
|
||||
- "**.java"
|
||||
- "**.ui"
|
||||
|
||||
# Build files
|
||||
- "flatpak/"
|
||||
- "flatpak/**"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
|
30
.github/workflows/nix.yml
vendored
30
.github/workflows/nix.yml
vendored
@ -16,16 +16,16 @@ on:
|
||||
|
||||
# Build files
|
||||
- "**.nix"
|
||||
- "nix/"
|
||||
- "nix/**"
|
||||
- "flake.lock"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
@ -38,19 +38,21 @@ on:
|
||||
# File types
|
||||
- "**.cpp"
|
||||
- "**.h"
|
||||
- "**.java"
|
||||
- "**.ui"
|
||||
|
||||
# Build files
|
||||
- "**.nix"
|
||||
- "nix/"
|
||||
- "nix/**"
|
||||
- "flake.lock"
|
||||
|
||||
# Directories
|
||||
- "buildconfig/"
|
||||
- "cmake/"
|
||||
- "launcher/"
|
||||
- "libraries/"
|
||||
- "program_info/"
|
||||
- "tests/"
|
||||
- "buildconfig/**"
|
||||
- "cmake/**"
|
||||
- "launcher/**"
|
||||
- "libraries/**"
|
||||
- "program_info/**"
|
||||
- "tests/**"
|
||||
|
||||
# Files
|
||||
- "CMakeLists.txt"
|
||||
|
@ -12,15 +12,15 @@
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
"generator": "Ninja"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_arm64_cross_base",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"windows_msvc_base"
|
||||
],
|
||||
"architecture": "arm64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_debug",
|
||||
@ -28,8 +28,7 @@
|
||||
"base_debug",
|
||||
"windows_msvc_base"
|
||||
],
|
||||
"displayName": "Windows MSVC (Debug)",
|
||||
"generator": "Ninja"
|
||||
"displayName": "Windows MSVC (Debug)"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_release",
|
||||
@ -98,11 +97,7 @@
|
||||
],
|
||||
"displayName": "Windows MSVC (Release)",
|
||||
"configurePreset": "windows_msvc_release",
|
||||
"configuration": "Release",
|
||||
"nativeToolOptions": [
|
||||
"/p:UseMultiToolTask=true",
|
||||
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||
]
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_arm64_cross_debug",
|
||||
@ -111,11 +106,7 @@
|
||||
],
|
||||
"displayName": "Windows MSVC (ARM64 cross, Debug)",
|
||||
"configurePreset": "windows_msvc_arm64_cross_debug",
|
||||
"configuration": "Debug",
|
||||
"nativeToolOptions": [
|
||||
"/p:UseMultiToolTask=true",
|
||||
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||
]
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_arm64_cross_release",
|
||||
@ -124,11 +115,7 @@
|
||||
],
|
||||
"displayName": "Windows MSVC (ARM64 cross, Release)",
|
||||
"configurePreset": "windows_msvc_arm64_cross_release",
|
||||
"configuration": "Release",
|
||||
"nativeToolOptions": [
|
||||
"/p:UseMultiToolTask=true",
|
||||
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||
]
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_ci",
|
||||
@ -137,11 +124,7 @@
|
||||
],
|
||||
"displayName": "Windows MSVC (CI)",
|
||||
"configurePreset": "windows_msvc_ci",
|
||||
"configuration": "Release",
|
||||
"nativeToolOptions": [
|
||||
"/p:UseMultiToolTask=true",
|
||||
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||
]
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc_arm64_cross_ci",
|
||||
@ -150,11 +133,7 @@
|
||||
],
|
||||
"displayName": "Windows MSVC (ARM64 cross, CI)",
|
||||
"configurePreset": "windows_msvc_arm64_cross_ci",
|
||||
"configuration": "Release",
|
||||
"nativeToolOptions": [
|
||||
"/p:UseMultiToolTask=true",
|
||||
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||
]
|
||||
"configuration": "Release"
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
|
@ -1458,6 +1458,12 @@ if(WIN32 OR (DEFINED Launcher_BUILD_FILELINKER AND Launcher_BUILD_FILELINKER))
|
||||
add_executable("${Launcher_Name}_filelink" WIN32 filelink/filelink_main.cpp)
|
||||
|
||||
target_sources("${Launcher_Name}_filelink" PRIVATE filelink/filelink.exe.manifest)
|
||||
# HACK: Fix manifest issues with Ninja in release mode (and only release mode) and MSVC
|
||||
# I have no idea why this works or why it's needed. UPDATE THIS IF YOU EDIT THE MANIFEST!!! -@getchoo
|
||||
# Thank you 2018 CMake mailing list thread https://cmake.cmake.narkive.com/LnotZXus/conflicting-msvc-manifests
|
||||
if(MSVC)
|
||||
set_property(TARGET "${Launcher_Name}_filelink" PROPERTY LINK_FLAGS "/MANIFESTUAC:level='requireAdministrator'")
|
||||
endif()
|
||||
|
||||
target_link_libraries("${Launcher_Name}_filelink" filelink_logic)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user