mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
101ff7783e | ||
|
|
9caf57c2c5 | ||
|
|
8e89187f95 | ||
|
|
3bceb39966 | ||
|
|
b720d17a97 | ||
|
|
9b76b0e2d3 | ||
|
|
030d15900d | ||
|
|
7864d76eca | ||
|
|
6fa0ac6eaa | ||
|
|
510d80038d | ||
|
|
9f02733a0d | ||
|
|
5e968eff4f | ||
|
|
867c0c5ca2 | ||
|
|
12b6830546 | ||
|
|
dd14778561 | ||
|
|
41dcd48048 | ||
|
|
c113565fe3 | ||
|
|
03f5967408 | ||
|
|
4a3d02db55 | ||
|
|
910cdf4d5c | ||
|
|
6ef36152c2 | ||
|
|
63206eb9a8 | ||
|
|
664d7ee902 | ||
|
|
cebdccfdf5 | ||
|
|
61a3b07697 | ||
|
|
6cf5dc9a56 | ||
|
|
0afa2d75aa | ||
|
|
b5963afbb5 | ||
|
|
9a60979242 | ||
|
|
d4879da95c | ||
|
|
b47b38448c | ||
|
|
694b9ec495 | ||
|
|
08db65bd5a | ||
|
|
13aa0a4fd0 | ||
|
|
4c6f22ba39 | ||
|
|
3349d7b424 | ||
|
|
680beaaf21 | ||
|
|
168ecf8825 | ||
|
|
1ce629126a | ||
|
|
b8462cec8b | ||
|
|
0e0602e8d9 | ||
|
|
cf598e38c1 | ||
|
|
6dda53e84f | ||
|
|
045a059742 | ||
|
|
76313fc238 | ||
|
|
1e851fe7e2 | ||
|
|
f032088902 | ||
|
|
6cdb6eed17 | ||
|
|
4eaa600b57 | ||
|
|
4d1be950e3 | ||
|
|
b752d2eddd | ||
|
|
0a1985e481 | ||
|
|
e20bfd00ec | ||
|
|
f8b5024c09 | ||
|
|
e5d7d5d173 | ||
|
|
0030fa44a5 | ||
|
|
5a69505d13 | ||
|
|
728bd3178b | ||
|
|
391334d64e | ||
|
|
917b80941e | ||
|
|
0ed4fdcd78 | ||
|
|
f2ec0b4083 | ||
|
|
a54a3ec74e | ||
|
|
4ed18a65c3 | ||
|
|
1373c76eb9 | ||
|
|
14d6fb0987 | ||
|
|
f8297eeb44 | ||
|
|
33167196d9 | ||
|
|
8dd1688ca7 | ||
|
|
d22901be1c | ||
|
|
1a1de370e4 | ||
|
|
f3c70e69b4 | ||
|
|
76126e69b2 | ||
|
|
afb08f23e2 | ||
|
|
8c617a39b7 | ||
|
|
ef1ce59931 | ||
|
|
4ed38a28b9 | ||
|
|
f5972dfbb0 | ||
|
|
68fa5b32a1 | ||
|
|
719ee90b27 | ||
|
|
b1e92f1779 | ||
|
|
86e1a2227c | ||
|
|
a3b1af4e3d | ||
|
|
b1844a8753 | ||
|
|
d3a7b3b5a6 | ||
|
|
b8d4cf5b29 | ||
|
|
d8da8a54a6 | ||
|
|
e147c1b4a6 | ||
|
|
0630e8d845 | ||
|
|
527ee3aea5 | ||
|
|
15b71c57dd | ||
|
|
dff782eb0d | ||
|
|
7d461d1658 | ||
|
|
584938d8f3 | ||
|
|
60074c440d | ||
|
|
2d42c885da | ||
|
|
86c0a8f698 | ||
|
|
1fba15a4c5 | ||
|
|
5b9483f7d8 | ||
|
|
c065d22dda | ||
|
|
d94ecfe078 | ||
|
|
f51a51df3b | ||
|
|
0f24b0663e | ||
|
|
454b587e36 | ||
|
|
96dcc7c82e | ||
|
|
07ce5b0aa6 | ||
|
|
ef61361b87 | ||
|
|
01c58555f3 | ||
|
|
8459cd928c | ||
|
|
5cba1a1185 | ||
|
|
664e6684b8 | ||
|
|
ca78b92718 | ||
|
|
fb76d714f2 | ||
|
|
29f3845ae5 | ||
|
|
e524a6c16d | ||
|
|
b2b79b4844 | ||
|
|
1cb2d4e5ee | ||
|
|
19a0a3a359 | ||
|
|
723fd8cbef | ||
|
|
049677508f | ||
|
|
2a45636f7a | ||
|
|
ebcff2e319 | ||
|
|
974edaa649 | ||
|
|
a2abffd37b | ||
|
|
fb0c36f714 | ||
|
|
7b1f74b3d5 | ||
|
|
00327129b7 | ||
|
|
a3b9a45239 | ||
|
|
1d3f62a09c | ||
|
|
62ef3ea493 | ||
|
|
3d6d9341f6 | ||
|
|
3b2cab2cf4 | ||
|
|
b1760c344c | ||
|
|
c8d22473e1 | ||
|
|
999c25db3c | ||
|
|
8b7738f0ab | ||
|
|
be0f062de8 | ||
|
|
98bfe57af0 | ||
|
|
1f86daa55d | ||
|
|
cdba95d92f | ||
|
|
c41d57c456 | ||
|
|
5ae3c56de8 | ||
|
|
ede1afd3ee | ||
|
|
0507e1ac89 | ||
|
|
0e7389ee83 | ||
|
|
560a2e536f | ||
|
|
736d529ea5 |
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report / Feature Request
|
||||||
|
about: Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with Cemu or you are requesting a feature you believe would make Cemu better.
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!---
|
||||||
|
Please keep in mind Cemu is EXPERIMENTAL SOFTWARE.
|
||||||
|
|
||||||
|
Please read the FAQ:
|
||||||
|
https://cemu.info/faq.html/
|
||||||
|
|
||||||
|
THIS IS NOT A SUPPORT FORUM, FOR SUPPORT GO TO:
|
||||||
|
https://discord.com/invite/5psYsup/
|
||||||
|
|
||||||
|
If the FAQ does not answer your question, please go to:
|
||||||
|
https://discord.com/invite/5psYsup/
|
||||||
|
|
||||||
|
When submitting an issue, please check the following:
|
||||||
|
|
||||||
|
- You have read the above.
|
||||||
|
- You have provided the version (commit hash) of Cemu you are using.
|
||||||
|
- You have provided sufficient detail for the issue to be reproduced.
|
||||||
|
- You have provided system specs (if relevant).
|
||||||
|
- Please also provide:
|
||||||
|
- For any issues, a log file
|
||||||
|
- For crashes, a backtrace.
|
||||||
|
- For graphical issues, comparison screenshots with real hardware.
|
||||||
|
- For emulation inaccuracies, a test-case (if able).
|
||||||
|
|
||||||
|
-->
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Cemu Discord
|
||||||
|
url: https://discord.com/invite/5psYsup
|
||||||
|
about: If you are experiencing an issue with Cemu, and you need tech support, or if you have a general question, try asking in the official Cemu Discord linked here. Piracy is not allowed.
|
||||||
+96
-67
@@ -1,19 +1,14 @@
|
|||||||
name: Build Cemu
|
name: Build Cemu
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
deploymode:
|
deploymode:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
experimentalversion:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VCPKG_ROOT: "${{github.workspace}}/dependencies/vcpkg"
|
VCPKG_ROOT: "${{github.workspace}}/dependencies/vcpkg"
|
||||||
@@ -22,9 +17,6 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-ubuntu:
|
build-ubuntu:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
install_vulkan_folder: "$GITHUB_WORKSPACE/vulkan_sdk"
|
|
||||||
install_vulkan_version: "1.3.216.0"
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repo"
|
- name: "Checkout repo"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -35,9 +27,8 @@ jobs:
|
|||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
||||||
echo "BUILD_FLAGS=-DPUBLIC_RELEASE=ON" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
echo "Build mode is release"
|
echo "Build mode is release"
|
||||||
|
|
||||||
- name: Setup debug mode parameters (for continous build)
|
- name: Setup debug mode parameters (for continous build)
|
||||||
if: ${{ inputs.deploymode != 'release' }}
|
if: ${{ inputs.deploymode != 'release' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -45,17 +36,18 @@ jobs:
|
|||||||
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
echo "Build mode is debug"
|
echo "Build mode is debug"
|
||||||
|
|
||||||
|
- name: Setup version for experimental
|
||||||
|
if: ${{ inputs.experimentalversion != '' }}
|
||||||
|
run: |
|
||||||
|
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
||||||
|
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: "Install system dependencies"
|
- name: "Install system dependencies"
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -y ninja-build cmake libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm
|
sudo apt install -y ninja-build cmake libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm
|
||||||
wget https://sdk.lunarg.com/sdk/download/${{ env.install_vulkan_version }}/linux/vulkansdk-linux-x86_64-${{ env.install_vulkan_version }}.tar.gz -q -O vulkansdk.tar.gz
|
|
||||||
mkdir -p "${{ env.install_vulkan_folder }}"
|
|
||||||
tar -xf vulkansdk.tar.gz --directory ${{ env.install_vulkan_folder }}
|
|
||||||
|
|
||||||
- name: "Bootstrap vcpkg"
|
- name: "Bootstrap vcpkg"
|
||||||
run: |
|
run: |
|
||||||
export VULKAN_SDK="${{ env.install_vulkan_folder }}/${{ env.install_vulkan_version }}/x86_64"
|
|
||||||
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
||||||
|
|
||||||
- name: 'Setup NuGet Credentials for vcpkg'
|
- name: 'Setup NuGet Credentials for vcpkg'
|
||||||
@@ -74,7 +66,6 @@ jobs:
|
|||||||
|
|
||||||
- name: "cmake"
|
- name: "cmake"
|
||||||
run: |
|
run: |
|
||||||
export VULKAN_SDK="${{ env.install_vulkan_folder }}/${{ env.install_vulkan_version }}/x86_64"
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
|
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
|
||||||
@@ -83,7 +74,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
|
run: mv bin/Cemu_release bin/Cemu
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
@@ -94,9 +89,6 @@ jobs:
|
|||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
env:
|
|
||||||
install_vulkan_folder: "$GITHUB_WORKSPACE/vulkan_sdk"
|
|
||||||
install_vulkan_version: "1.3.216.0"
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repo"
|
- name: "Checkout repo"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -107,7 +99,7 @@ jobs:
|
|||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_MODE=release" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
echo "BUILD_MODE=release" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
echo "BUILD_FLAGS=-DPUBLIC_RELEASE=ON" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
echo "BUILD_FLAGS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
echo "Build mode is release"
|
echo "Build mode is release"
|
||||||
|
|
||||||
- name: Setup debug mode parameters (for continous build)
|
- name: Setup debug mode parameters (for continous build)
|
||||||
@@ -116,44 +108,12 @@ jobs:
|
|||||||
echo "BUILD_MODE=debug" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
echo "BUILD_MODE=debug" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
echo "BUILD_FLAGS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
echo "BUILD_FLAGS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
echo "Build mode is debug"
|
echo "Build mode is debug"
|
||||||
|
- name: Setup version for experimental
|
||||||
- name: Prepare Vulkan SDK
|
if: ${{ inputs.experimentalversion != '' }}
|
||||||
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
|
||||||
with:
|
|
||||||
vulkan-query-version: 1.3.216.0
|
|
||||||
vulkan-components: Vulkan-Headers, Vulkan-Loader
|
|
||||||
vulkan-use-cache: false
|
|
||||||
|
|
||||||
- name: Workaround
|
|
||||||
run: |
|
run: |
|
||||||
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
|
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
||||||
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
|
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
$componentsToRemove= @(
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM64"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM64.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.x86.x64"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.x86.x64.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM64"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM64.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM.Spectre"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM64"
|
|
||||||
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM64.Spectre"
|
|
||||||
)
|
|
||||||
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
|
|
||||||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
|
|
||||||
# should be run twice
|
|
||||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
|
||||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
|
||||||
|
|
||||||
- name: Configure MSVC
|
- name: Configure MSVC
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
with:
|
with:
|
||||||
@@ -183,20 +143,89 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }}
|
echo "[INFO] BUILD_FLAGS: ${{ env.BUILD_FLAGS }}"
|
||||||
|
echo "[INFO] BUILD_MODE: ${{ env.BUILD_MODE }}"
|
||||||
- name: "Free up space"
|
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DVCPKG_INSTALL_OPTIONS="--clean-after-build"
|
||||||
run: |
|
|
||||||
Remove-Item './dependencies/vcpkg/downloads' -Recurse
|
|
||||||
|
|
||||||
- name: "Build Cemu"
|
- name: "Build Cemu"
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake --build . --config ${{ env.BUILD_MODE }} -j 2
|
cmake --build . --config ${{ env.BUILD_MODE }} -j 2
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
|
run: Rename-Item bin/Cemu_release.exe Cemu.exe
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
with:
|
with:
|
||||||
name: cemu-bin-windows-x64
|
name: cemu-bin-windows-x64
|
||||||
path: ./bin/Cemu.exe
|
path: ./bin/Cemu.exe
|
||||||
|
build-macos:
|
||||||
|
runs-on: macos-12
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repo"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: "recursive"
|
||||||
|
- name: Setup release mode parameters (for deploy)
|
||||||
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
|
run: |
|
||||||
|
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
||||||
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
|
echo "Build mode is release"
|
||||||
|
- name: Setup debug mode parameters (for continous build)
|
||||||
|
if: ${{ inputs.deploymode != 'release' }}
|
||||||
|
run: |
|
||||||
|
echo "BUILD_MODE=debug" >> $GITHUB_ENV
|
||||||
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
|
echo "Build mode is debug"
|
||||||
|
|
||||||
|
- name: Setup version for experimental
|
||||||
|
if: ${{ inputs.experimentalversion != '' }}
|
||||||
|
run: |
|
||||||
|
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
||||||
|
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: "Install system dependencies"
|
||||||
|
run: |
|
||||||
|
brew install llvm@14 ninja nasm molten-vk
|
||||||
|
- name: "Bootstrap vcpkg"
|
||||||
|
run: |
|
||||||
|
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
||||||
|
|
||||||
|
- name: 'Setup NuGet Credentials for vcpkg'
|
||||||
|
shell: 'bash'
|
||||||
|
run: |
|
||||||
|
mono `./dependencies/vcpkg/vcpkg fetch nuget | tail -n 1` \
|
||||||
|
sources add \
|
||||||
|
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
|
||||||
|
-storepasswordincleartext \
|
||||||
|
-name "GitHub" \
|
||||||
|
-username "${{ github.repository_owner }}" \
|
||||||
|
-password "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
mono `./dependencies/vcpkg/vcpkg fetch nuget | tail -n 1` \
|
||||||
|
setapikey "${{ secrets.GITHUB_TOKEN }}" \
|
||||||
|
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
|
||||||
|
|
||||||
|
- name: "cmake"
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++ -G Ninja
|
||||||
|
|
||||||
|
- name: "Build Cemu"
|
||||||
|
run: |
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
|
run: chmod a+x bin/Cemu_release && mv bin/Cemu_release bin/Cemu
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
|
with:
|
||||||
|
name: cemu-bin-macos-x64
|
||||||
|
path: ./bin/Cemu
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
name: Build check
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
with:
|
||||||
|
deploymode: release
|
||||||
|
experimentalversion: 999999
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
name: Deploy experimental release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-release-build:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
with:
|
||||||
|
deploymode: release
|
||||||
|
experimentalversion: ${{ github.run_number }}
|
||||||
|
deploy:
|
||||||
|
name: Deploy experimental release
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: call-release-build
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-linux-x64
|
||||||
|
path: cemu-bin-linux-x64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-windows-x64
|
||||||
|
path: cemu-bin-windows-x64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-macos-x64
|
||||||
|
path: cemu-bin-macos-x64
|
||||||
|
|
||||||
|
- name: Initialize
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
sudo apt install zip
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
run: |
|
||||||
|
echo "Experimental version: ${{ github.run_number }}"
|
||||||
|
ls
|
||||||
|
gcc -o getversion .github/getversion.cpp
|
||||||
|
./getversion
|
||||||
|
echo "Cemu CI version: $(./getversion)"
|
||||||
|
echo "CEMU_FOLDER_NAME=Cemu_$(./getversion)-${{ github.run_number }}" >> $GITHUB_ENV
|
||||||
|
echo "CEMU_VERSION=$(./getversion)-${{ github.run_number }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create release from windows-bin
|
||||||
|
run: |
|
||||||
|
ls ./
|
||||||
|
ls ./bin/
|
||||||
|
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
|
||||||
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create release from linux-bin
|
||||||
|
run: |
|
||||||
|
ls ./
|
||||||
|
ls ./bin/
|
||||||
|
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
||||||
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-20.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create release from macos-bin
|
||||||
|
run: |
|
||||||
|
ls ./
|
||||||
|
ls ./bin/
|
||||||
|
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
mv cemu-bin-macos-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
||||||
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-macos-12-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
run: |
|
||||||
|
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz
|
||||||
|
tar xvzf ghr.tar.gz; rm ghr.tar.gz
|
||||||
|
echo "[INFO] Release tag: v${{ env.CEMU_VERSION }}"
|
||||||
|
ghr_v0.15.0_linux_amd64/ghr -prerelease -t ${{ secrets.GITHUB_TOKEN }} -n "Cemu ${{ env.CEMU_VERSION }} (Experimental)" -b "Cemu experimental release" "v${{ env.CEMU_VERSION }}" ./upload
|
||||||
@@ -27,6 +27,11 @@ jobs:
|
|||||||
name: cemu-bin-windows-x64
|
name: cemu-bin-windows-x64
|
||||||
path: cemu-bin-windows-x64
|
path: cemu-bin-windows-x64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-macos-x64
|
||||||
|
path: cemu-bin-macos-x64
|
||||||
|
|
||||||
- name: Initialize
|
- name: Initialize
|
||||||
run: |
|
run: |
|
||||||
mkdir upload
|
mkdir upload
|
||||||
@@ -61,7 +66,16 @@ jobs:
|
|||||||
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
||||||
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-20.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-20.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create release from macos-bin
|
||||||
|
run: |
|
||||||
|
ls ./
|
||||||
|
ls ./bin/
|
||||||
|
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
mv cemu-bin-macos-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
||||||
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-macos-12-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
run: |
|
run: |
|
||||||
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz
|
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
name: Generate translation template
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-pot:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repo"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Install gettext"
|
||||||
|
run: |
|
||||||
|
sudo apt update -qq
|
||||||
|
sudo apt install -y gettext
|
||||||
|
|
||||||
|
- name: "Generate POT file using xgettext"
|
||||||
|
run: >
|
||||||
|
find src -name *.cpp -o -name *.hpp -o -name *.h |
|
||||||
|
xargs xgettext --from-code=utf-8
|
||||||
|
-k_ -kwxTRANSLATE -w 100
|
||||||
|
--check=space-ellipsis --omit-header
|
||||||
|
-o cemu.pot
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: POT file
|
||||||
|
path: ./cemu.pot
|
||||||
|
if-no-files-found: error
|
||||||
+25
-2
@@ -13,10 +13,33 @@
|
|||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
.vs
|
.vs
|
||||||
|
.idea/
|
||||||
|
|
||||||
build/
|
build/
|
||||||
out/
|
out/
|
||||||
|
.cache/
|
||||||
|
bin/Cemu_*
|
||||||
|
bin/Cemu_*.exe
|
||||||
|
|
||||||
# Cemu bin files
|
# Cemu bin files
|
||||||
otp.bin
|
bin/otp.bin
|
||||||
seeprom.bin
|
bin/seeprom.bin
|
||||||
|
bin/log.txt
|
||||||
|
bin/Cemu_*.pdb
|
||||||
|
bin/Cemu_*.ilk
|
||||||
|
bin/Cemu.exe.backup
|
||||||
|
bin/mlc01/*
|
||||||
|
bin/settings.xml
|
||||||
|
bin/title_list_cache.xml
|
||||||
|
bin/debugger/*
|
||||||
|
bin/sdcard/*
|
||||||
|
|
||||||
|
!bin/shaderCache/info.txt
|
||||||
|
bin/shaderCache/*
|
||||||
|
|
||||||
|
bin/controllerProfiles/*
|
||||||
|
|
||||||
|
!bin/gameProfiles/default/*
|
||||||
|
bin/gameProfiles/*
|
||||||
|
|
||||||
|
bin/graphicPacks/*
|
||||||
|
|||||||
@@ -10,3 +10,6 @@
|
|||||||
path = dependencies/vcpkg
|
path = dependencies/vcpkg
|
||||||
url = https://github.com/microsoft/vcpkg
|
url = https://github.com/microsoft/vcpkg
|
||||||
shallow = true
|
shallow = true
|
||||||
|
[submodule "dependencies/Vulkan-Headers"]
|
||||||
|
path = dependencies/Vulkan-Headers
|
||||||
|
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
# Build instructions
|
||||||
|
|
||||||
|
## Windows
|
||||||
|
|
||||||
|
Prerequisites:
|
||||||
|
- A recent version of Visual Studio 2022 (recommended but not required) with the following additional components:
|
||||||
|
- C++ CMake tools for Windows
|
||||||
|
- Windows 10/11 SDK
|
||||||
|
- git
|
||||||
|
|
||||||
|
Instructions:
|
||||||
|
|
||||||
|
1. Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||||
|
2. Launch `Cemu/generate_vs_solution.bat`.
|
||||||
|
- If you installed VS to a custom location or use VS 2019, you may need to manually change the path inside the .bat file.
|
||||||
|
3. Wait until it's done, then open `Cemu/build/Cemu.sln` in Visual Studio.
|
||||||
|
4. Then build the solution and once finished you can run and debug it, or build it and check the /bin folder for the final Cemu_release.exe.
|
||||||
|
|
||||||
|
You can also skip steps 3-5 and open the root folder of the cloned repo directly in Visual Studio (as a folder) and use the built-in CMake support but be warned that cmake support in VS can be a bit finicky.
|
||||||
|
|
||||||
|
## Linux
|
||||||
|
|
||||||
|
To compile Cemu, a recent enough compiler and STL with C++20 support is required! clang-12 or higher is what we recommend.
|
||||||
|
|
||||||
|
### Installing dependencies
|
||||||
|
|
||||||
|
#### For Ubuntu and derivatives:
|
||||||
|
`sudo apt install -y git curl cmake ninja-build nasm libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev libpulse-dev`
|
||||||
|
|
||||||
|
*Additionally, for Ubuntu 22.04 only:*
|
||||||
|
- `sudo apt install -y clang-12`
|
||||||
|
- At step 3 while building, use
|
||||||
|
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`
|
||||||
|
|
||||||
|
#### For Arch and derivatives:
|
||||||
|
`sudo pacman -S git cmake clang ninja nasm base-devel linux-headers gtk3 libsecret libgcrypt systemd freeglut zip unzip libpulse`
|
||||||
|
|
||||||
|
#### For Fedora and derivatives:
|
||||||
|
`sudo dnf install git cmake clang ninja-build nasm kernel-headers gtk3-devel libsecret-devel libgcrypt-devel systemd-devel freeglut-devel perl-core zlib-devel cubeb-devel`
|
||||||
|
|
||||||
|
### Build Cemu using cmake and clang
|
||||||
|
1. `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||||
|
2. `cd Cemu`
|
||||||
|
3. `cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -G Ninja`
|
||||||
|
4. `cmake --build build`
|
||||||
|
5. You should now have a Cemu executable file in the /bin folder, which you can run using `./bin/Cemu_release`.
|
||||||
|
|
||||||
|
#### Using GCC
|
||||||
|
While we use and test Cemu using clang, using GCC might work better with your distro (they should be fairly similar performance/issues wise and should only be considered if compilation is the issue).
|
||||||
|
You can use it by replacing the step 3 with the following:
|
||||||
|
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -G Ninja`
|
||||||
|
|
||||||
|
#### Troubleshooting steps
|
||||||
|
- If step 3 gives you an error about not being able to find ninja, try appending `-DCMAKE_MAKE_PROGRAM=/usr/bin/ninja` to the command and running it again.
|
||||||
|
- If step 3 fails while compiling the boost-build dependency, it means you don't have a working/good standard library installation. Check the integrity of your system headers and making sure that C++ related packages are installed and intact.
|
||||||
|
- If step 3 gives a random error, read the `[package-name-and-platform]-out.log` and `[package-name-and-platform]-err.log` for the actual reason to see if you might be lacking the headers from a dependency.
|
||||||
|
- If step 3 is still failing or if you're not able to find the cause, please make an issue on our Github about it!
|
||||||
|
- If step 4 gives you an error that contains something like `main.cpp.o: in function 'std::__cxx11::basic_string...`, you likely are experiencing a clang-14 issue. This can only be fixed by either lowering the clang version or using GCC, see below.
|
||||||
|
- If step 4 gives you a different error, you could report it to this repo or try using GCC. Just make sure your standard library and compilers are updated since Cemu uses a lot of modern features!
|
||||||
|
- If step 4 gives you undefined libdecor_xx, you are likely experiencing an issue with sdl2 package that comes with vcpkg. Delete sdl2 from vcpkg.json in source file and recompile.
|
||||||
|
|
||||||
|
## MacOS
|
||||||
|
|
||||||
|
To compile Cemu, a recent enough compiler and STL with C++20 support is required! LLVM 13 and
|
||||||
|
below, built in LLVM, and Xcode LLVM don't support the C++20 feature set required. Currently,
|
||||||
|
LLVM 15 isn't supported due to compatibility issues with Boost dependency. The OpenGL graphics
|
||||||
|
API isn't support on MacOS, Vulkan must be used. Additionally Vulkan must be used through the
|
||||||
|
Molten-VK compatibility layer.
|
||||||
|
|
||||||
|
### Installing dependencies
|
||||||
|
`brew install git cmake llvm@14 ninja nasm molten-vk`
|
||||||
|
|
||||||
|
### Build Cemu using cmake and clang
|
||||||
|
1. `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||||
|
2. `cd Cemu`
|
||||||
|
3. `cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DPUBLIC_RELEASE=ON
|
||||||
|
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++ -G Ninja`
|
||||||
|
4. `cmake --build build`
|
||||||
|
5. You should now have a Cemu executable file in the /bin folder, which you can run using `./bin/Cemu_release`.
|
||||||
|
|
||||||
|
#### Troubleshooting steps
|
||||||
|
- If step 3 gives you an error about not being able to find ninja, try appending `-DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja` to the command and running it again.
|
||||||
|
|
||||||
|
## Updating Cemu and source code
|
||||||
|
1. To update your Cemu local repository, use the command `git pull --recurse-submodules` (run this command on the Cemu root).
|
||||||
|
- This should update your local copy of Cemu and all of its dependencies.
|
||||||
|
2. Then, you can rebuild Cemu using the steps listed above, according to whether you use Linux or Windows.
|
||||||
|
|
||||||
|
If CMake complains about Cemu already being compiled or another similar error, try deleting the `CMakeCache.txt` file inside the `build` folder and retry building.
|
||||||
+100
-70
@@ -1,116 +1,146 @@
|
|||||||
cmake_minimum_required(VERSION 3.21.1)
|
cmake_minimum_required(VERSION 3.21.1)
|
||||||
|
|
||||||
option(PUBLIC_RELEASE "Compile with debug asserts disabled and no console" OFF)
|
option(ENABLE_VCPKG "Enable the vcpkg package manager" ON)
|
||||||
|
set(EXPERIMENTAL_VERSION "" CACHE STRING "") # used by CI script to set experimental version
|
||||||
|
|
||||||
if (PUBLIC_RELEASE)
|
if (EXPERIMENTAL_VERSION)
|
||||||
add_definitions(-DPUBLIC_RELEASE)
|
add_definitions(-DEMULATOR_VERSION_MINOR=${EXPERIMENTAL_VERSION})
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) # enable LTO
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if (ENABLE_VCPKG)
|
||||||
set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "")
|
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||||
|
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||||
|
CACHE STRING "Vcpkg toolchain file")
|
||||||
|
# Set this so that all the various find_package() calls don't need an explicit
|
||||||
|
# CONFIG option
|
||||||
|
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
|
||||||
|
if (WIN32)
|
||||||
|
set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
project(Cemu VERSION 2.0)
|
||||||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
||||||
CACHE STRING "Vcpkg toolchain file")
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
project(Cemu VERSION 0.1)
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
add_compile_definitions($<$<CONFIG:Debug>:CEMU_DEBUG_ASSERT>) # if build type is debug, set CEMU_DEBUG_ASSERT
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
IF(MSVC)
|
# enable link time optimization for release builds
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # floating point model: precise
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GT") # fiber safe optimizations
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(MSVC AND PUBLIC_RELEASE)
|
if (MSVC)
|
||||||
message(STATUS "Using additional optimization flags for MSVC")
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CemuBin)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Oi /Ot") # enable intrinsic functions, favor speed
|
# floating point model: precise, fiber safe optimizations
|
||||||
ENDIF()
|
add_compile_options(/EHsc /fp:precise)
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
# Speeds up static linking (especially helpful in incremental compilation)
|
||||||
|
if((CMAKE_LINKER MATCHES ".*lld-link.*") AND (CMAKE_AR MATCHES ".*llvm-lib.*"))
|
||||||
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY STATIC_LIBRARY_OPTIONS /llvmlibthin)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_compile_options(/GT)
|
||||||
|
endif()
|
||||||
|
# enable additional optimization flags for release builds
|
||||||
|
add_compile_options($<$<CONFIG:Release,RelWithDebInfo>:/Oi>) # enable intrinsic functions
|
||||||
|
add_compile_options($<$<CONFIG:Release,RelWithDebInfo>:/Ot>) # favor speed
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
enable_language(OBJC OBJCXX)
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
||||||
option(ENABLE_VULKAN "Enables the Vulkan backend" ON)
|
option(ENABLE_VULKAN "Enables the Vulkan backend" ON)
|
||||||
option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
|
option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
option(ENABLE_CEMUHOOK "Enables Cemuhook compatibility" ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# input backends
|
# input backends
|
||||||
if(WIN32)
|
if (WIN32)
|
||||||
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
|
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
|
||||||
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
|
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
|
||||||
add_definitions(-DHAS_DIRECTINPUT)
|
add_compile_definitions(HAS_DIRECTINPUT)
|
||||||
endif()
|
endif()
|
||||||
option(ENABLE_SDL "Enables the SDLController backend" ON)
|
option(ENABLE_SDL "Enables the SDLController backend" ON)
|
||||||
|
|
||||||
# audio backends
|
# audio backends
|
||||||
if(WIN32)
|
if (WIN32)
|
||||||
option(ENABLE_DIRECTAUDIO "Enables the directaudio backend" ON)
|
option(ENABLE_DIRECTAUDIO "Enables the directaudio backend" ON)
|
||||||
option(ENABLE_XAUDIO "Enables the xaudio backend" ON)
|
option(ENABLE_XAUDIO "Enables the xaudio backend" ON)
|
||||||
endif()
|
endif()
|
||||||
option(ENABLE_CUBEB "Enabled cubeb backend" ON)
|
option(ENABLE_CUBEB "Enabled cubeb backend" ON)
|
||||||
|
|
||||||
option(ENABLE_WXWIDGETS "Build with wxWidgets UI (Currently required)" ON)
|
option(ENABLE_WXWIDGETS "Build with wxWidgets UI (Currently required)" ON)
|
||||||
|
|
||||||
find_package(SDL2 CONFIG REQUIRED)
|
set(THREADS_PREFER_PTHREAD_FLAG true)
|
||||||
find_package(CURL CONFIG REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
find_package(pugixml CONFIG REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
find_package(imgui CONFIG REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
find_package(RapidJSON CONFIG REQUIRED)
|
find_package(pugixml REQUIRED)
|
||||||
|
find_package(imgui REQUIRED)
|
||||||
|
find_package(RapidJSON REQUIRED)
|
||||||
find_package(Boost COMPONENTS program_options filesystem nowide REQUIRED)
|
find_package(Boost COMPONENTS program_options filesystem nowide REQUIRED)
|
||||||
find_package(libzip REQUIRED)
|
find_package(libzip REQUIRED)
|
||||||
find_package(glslang REQUIRED)
|
find_package(glslang REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(zstd CONFIG REQUIRED)
|
find_package(zstd MODULE REQUIRED) # MODULE so that zstd::zstd is available
|
||||||
|
find_package(OpenSSL COMPONENTS Crypto SSL REQUIRED)
|
||||||
|
find_package(glm REQUIRED)
|
||||||
|
find_package(fmt 9.1.0 REQUIRED)
|
||||||
|
find_package(PNG REQUIRED)
|
||||||
|
|
||||||
if(ENABLE_VULKAN)
|
# glslang versions older than 11.11.0 define targets without a namespace
|
||||||
find_package(Vulkan REQUIRED)
|
if (NOT TARGET glslang::SPIRV AND TARGET SPIRV)
|
||||||
include_directories("${Vulkan_INCLUDE_DIRS}")
|
add_library(glslang::SPIRV ALIAS SPIRV)
|
||||||
endif()
|
|
||||||
if(ENABLE_OPENGL)
|
|
||||||
find_package(OpenGL REQUIRED)
|
|
||||||
endif()
|
|
||||||
if(ENABLE_DISCORD_RPC)
|
|
||||||
add_definitions(-DENABLE_DISCORD_RPC)
|
|
||||||
add_subdirectory(dependencies/discord-rpc EXCLUDE_FROM_ALL)
|
|
||||||
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_WXWIDGETS)
|
if (UNIX AND NOT APPLE)
|
||||||
find_package(wxWidgets CONFIG REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(OpenSSL REQUIRED)
|
if (ENABLE_VULKAN)
|
||||||
find_package(X11)
|
include_directories("dependencies/Vulkan-Headers/include")
|
||||||
|
|
||||||
# find a better way to handle this
|
|
||||||
link_libraries(${Boost_LIBRARIES})
|
|
||||||
link_libraries(${X11_LIBRARIES})
|
|
||||||
link_libraries(SDL2::SDL2 SDL2::SDL2main SDL2::SDL2-static)
|
|
||||||
if(ENABLE_WXWIDGETS)
|
|
||||||
link_libraries(wx::core wx::base)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUBEB)
|
if (ENABLE_OPENGL)
|
||||||
option(BUILD_TESTS "" OFF)
|
find_package(OpenGL REQUIRED)
|
||||||
option(BUILD_TOOLS "" OFF)
|
|
||||||
option(BUNDLE_SPEEX "" OFF)
|
|
||||||
set(USE_WINMM OFF CACHE BOOL "")
|
|
||||||
add_subdirectory(dependencies/cubeb)
|
|
||||||
set_property(TARGET cubeb PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|
||||||
link_libraries(cubeb)
|
|
||||||
add_compile_definitions(HAS_CUBEB=1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(dependencies/ih264d)
|
if (ENABLE_DISCORD_RPC)
|
||||||
add_subdirectory(dependencies/ZArchive)
|
add_compile_definitions(ENABLE_DISCORD_RPC)
|
||||||
|
add_subdirectory(dependencies/discord-rpc EXCLUDE_FROM_ALL)
|
||||||
|
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_WXWIDGETS)
|
||||||
|
find_package(wxWidgets 3.2 REQUIRED COMPONENTS base core gl propgrid xrc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_CUBEB)
|
||||||
|
find_package(cubeb)
|
||||||
|
if (NOT cubeb_FOUND)
|
||||||
|
option(BUILD_TESTS "" OFF)
|
||||||
|
option(BUILD_TOOLS "" OFF)
|
||||||
|
option(BUNDLE_SPEEX "" OFF)
|
||||||
|
set(USE_WINMM OFF CACHE BOOL "")
|
||||||
|
add_subdirectory("dependencies/cubeb" EXCLUDE_FROM_ALL)
|
||||||
|
set_property(TARGET cubeb PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
add_library(cubeb::cubeb ALIAS cubeb)
|
||||||
|
endif()
|
||||||
|
add_compile_definitions("HAS_CUBEB=1")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory("dependencies/ih264d" EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
find_package(ZArchive)
|
||||||
|
if (NOT ZArchive_FOUND)
|
||||||
|
add_subdirectory("dependencies/ZArchive" EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
|||||||
+14
-23
@@ -1,37 +1,28 @@
|
|||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "x64-Debug",
|
"name": "RelWithDebInfo",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Release",
|
||||||
|
"configurationType": "Release",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"configurationType": "Debug",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x64-Release",
|
"name": "Debug",
|
||||||
|
"configurationType": "Debug",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"configurationType": "RelWithDebInfo",
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
"installRoot": "${projectDir}\\out\\install\\${name}"
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "x64-Public-Release",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "-DPUBLIC_RELEASE=ON",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# **Cemu - Wii U emulator**
|
||||||
|
|
||||||
|
[](https://github.com/cemu-project/Cemu/actions/workflows/build.yml)
|
||||||
|
[](https://discord.gg/5psYsup)
|
||||||
|
[](https://matrix.to/#/#cemu:cemu.info)
|
||||||
|
|
||||||
|
This is the code repository of Cemu, a Wii U emulator that is able to run most Wii U games and homebrew in a playable state.
|
||||||
|
It's written in C/C++ and is being actively developed with new features and fixes to increase compatibility, convenience and usability.
|
||||||
|
|
||||||
|
Cemu is currently only available for 64-bit Windows and Linux devices.
|
||||||
|
|
||||||
|
### Links:
|
||||||
|
- [Original 2.0 announcement post](https://www.reddit.com/r/cemu/comments/wwa22c/cemu_20_announcement_linux_builds_opensource_and/)
|
||||||
|
- [Official Website](https://cemu.info)
|
||||||
|
- [Compatibility List/Wiki](https://wiki.cemu.info/wiki/Main_Page)
|
||||||
|
- [Official Subreddit](https://reddit.com/r/Cemu)
|
||||||
|
- [Official Discord](https://discord.gg/5psYsup)
|
||||||
|
- [Official Matrix Server](https://matrix.to/#/#cemu:cemu.info)
|
||||||
|
- [Unofficial Setup Guide](https://cemu.cfw.guide)
|
||||||
|
|
||||||
|
#### Other relevant repositories:
|
||||||
|
- [Cemu-Language](https://github.com/cemu-project/Cemu-Language)
|
||||||
|
- [Cemu's Community Graphic Packs](https://github.com/ActualMandM/cemu_graphic_packs)
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
You can download the latest Cemu releases from the [GitHub Releases](https://github.com/cemu-project/Cemu/releases/) or from [Cemu's website](https://cemu.info).
|
||||||
|
|
||||||
|
Cemu is currently only available in a portable format so no installation is required besides extracting it in a safe place.
|
||||||
|
|
||||||
|
The native Linux build is currently a work-in-progress. See [Current State Of Linux builds](https://github.com/cemu-project/Cemu/issues/107) for more information about the things to be aware of.
|
||||||
|
|
||||||
|
Pre-2.0 releases can be found on Cemu's [changelog page](https://cemu.info/changelog.html).
|
||||||
|
|
||||||
|
## Build Instructions
|
||||||
|
|
||||||
|
To compile Cemu yourself on Windows or Linux, view the [BUILD.md file](/BUILD.md).
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
Issues with the emulator should be filed using [GitHub Issues](https://github.com/cemu-project/Cemu/issues).
|
||||||
|
The old bug tracker can be found at [bugs.cemu.info](https://bugs.cemu.info) and still contains relevant issues and feature suggestions.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Pull requests are very welcome. For easier coordination you can visit the developer discussion channel on [Discord](https://discord.gg/5psYsup) or alternatively the [Matrix Server](https://matrix.to/#/#cemu:cemu.info).
|
||||||
|
|
||||||
|
If coding isn't your thing, testing games and making detailed bug reports or updating the (usually outdated) compatibility wiki is also appreciated!
|
||||||
|
|
||||||
|
Questions about Cemu's software architecture can also be answered on Discord (through the Matrix bridge).
|
||||||
|
|
||||||
|
## License
|
||||||
|
Cemu is licensed under [Mozilla Public License 2.0](/LICENSE.txt). Exempt from this are all files in the dependencies directory for which the licenses of the original code apply as well as some individual files in the src folder, as specified in those file headers respectively.
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# This is an example configuration file. You can use this file as a guideline on how to create your own game profiles.
|
|
||||||
|
|
||||||
# Overview:
|
|
||||||
# The filename of the game profile can be found by looking at log.txt after a game was launched in Cemu.
|
|
||||||
# A '#' character starts a one-line comment. Any text afterwards will be ignored.
|
|
||||||
# If an option is not given in the .ini file, Cemu will use the value from the global settings instead.
|
|
||||||
|
|
||||||
[General]
|
|
||||||
loadSharedLibraries = true # If set to true, system rpl files will be loaded from /cafeLibs/ if present. Default value is true
|
|
||||||
useRDTSC = true # Use RDTSC instruction as timer source for emulated CPU, OS and audio
|
|
||||||
|
|
||||||
[Graphics]
|
|
||||||
accurateShaderMul = true # If set to true, Cemu will correctly emulate the non-IEEE behavior of the shader MUL instruction. Can fix graphic issues but also decreases shader performance and increases shader compile time. Default value is true.
|
|
||||||
# Since Cemu 1.7.5 the option accurateShaderMul also supports a third mode, enabled by using the value 'min' (e.g. accurateShaderMul = min). In this mode, Cemu will emulate non-ieee MUL instructions in a more GPU-friendly way which generates less complex shaders. However, this mode might not be 100% accurate
|
|
||||||
|
|
||||||
disableGPUFence = false # If set to true, GPU fence operations will be skipped. Default value is false. Enabling this option can lead to instability and crashes
|
|
||||||
|
|
||||||
GPUBufferCacheAccuracy = 0 # Controls the accuracy of vertex and uniform data caching. A higher accuracy means more expensive checks which can slow down rendering. Possible values: 0 = high, 1 = medium, 2 = low
|
|
||||||
|
|
||||||
streamoutBufferCacheSize = 24 # buffer cache size of the streamout buffer in MB.
|
|
||||||
|
|
||||||
extendedTextureReadback = false # If set to true, Cemu will try to mirror data written by GPU operations to CPU RAM (but only if access by CPU is assumed to be likely) Default value is false
|
|
||||||
|
|
||||||
[CPU]
|
|
||||||
cpuTimer = cycleCounter # Timer source for OS and CPU time. Supported values are 'hostBased' (timers are based on actual OS time) and 'cycleCounter' (timers are based on speed of emulated CPU).
|
|
||||||
emulateSinglePrecision = true # If set to false, the recompiler won't correctly round the result of single-precision instructions in certain situations. This can introduce gameplay bugs, but might also improve performance.
|
|
||||||
cpuMode = Singlecore-Recompiler # CPU mode. Possible values: Singlecore-Interpreter, Singlecore-Recompiler, Dualcore-Recompiler, Triplecore-Recompiler
|
|
||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
# Build instructions
|
|
||||||
|
|
||||||
## Windows
|
|
||||||
|
|
||||||
Prerequisites:
|
|
||||||
- A recent version of Visual Studio 2022 with CMake tools component
|
|
||||||
- git
|
|
||||||
- Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/)). Don't forget to restart after installing.
|
|
||||||
|
|
||||||
Instructions:
|
|
||||||
|
|
||||||
1) Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
|
||||||
2) Launch `Cemu/build_vs_solution.bat`. If you installed VS to a custom location you may need to manually adjust the path inside the bat file
|
|
||||||
3) Wait until done, then open build/Cemu.sln in Visual Studio
|
|
||||||
4) Right click 'CemuBin' project -> Set as startup project
|
|
||||||
5) Then build the solution and once finished you can run and debug it
|
|
||||||
|
|
||||||
You can also skip steps 3-5 and open the root folder of the cloned repo directly in Visual Studio (as a folder) and use the inbuilt cmake support, but be warned that cmake support in VS can be a bit finicky.
|
|
||||||
|
|
||||||
## Linux
|
|
||||||
|
|
||||||
To compile Cemu, a recent enough compiler and STL with C++20 support is required! We use clang 12, other compilers may work as well.
|
|
||||||
|
|
||||||
For ubuntu and most derivatives:
|
|
||||||
|
|
||||||
1) Make sure vulkansdk is installed and the VULKAN_SDK environment variable is set correctly.
|
|
||||||
2) `sudo apt install -y libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm`
|
|
||||||
3) Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
|
||||||
4) `cd Cemu`
|
|
||||||
5) `mkdir build && cd build`
|
|
||||||
6) `cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`
|
|
||||||
|
|
||||||
Build instructions for other distributions will be added in the future!
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
|
||||||
|
# SPDX-License-Identifier: ISC
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(zarchive IMPORTED_TARGET GLOBAL zarchive)
|
||||||
|
if (zarchive_FOUND)
|
||||||
|
add_library(ZArchive::zarchive ALIAS PkgConfig::zarchive)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(ZArchive
|
||||||
|
REQUIRED_VARS
|
||||||
|
zarchive_LINK_LIBRARIES
|
||||||
|
zarchive_FOUND
|
||||||
|
VERSION_VAR
|
||||||
|
zarchive_VERSION
|
||||||
|
)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
|
||||||
|
# SPDX-License-Identifier: ISC
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package(imgui CONFIG)
|
||||||
|
if (imgui_FOUND)
|
||||||
|
# Use upstream imguiConfig.cmake if possible
|
||||||
|
find_package_handle_standard_args(imgui CONFIG_MODE)
|
||||||
|
else()
|
||||||
|
# Fallback to pkg-config otherwise
|
||||||
|
find_package(PkgConfig)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(imgui IMPORTED_TARGET GLOBAL imgui)
|
||||||
|
if (imgui_FOUND)
|
||||||
|
add_library(imgui::imgui ALIAS PkgConfig::imgui)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(imgui
|
||||||
|
REQUIRED_VARS
|
||||||
|
imgui_LINK_LIBRARIES
|
||||||
|
imgui_FOUND
|
||||||
|
VERSION_VAR
|
||||||
|
imgui_VERSION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
|
||||||
|
# SPDX-License-Identifier: ISC
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package(wxWidgets CONFIG COMPONENTS ${wxWidgets_FIND_COMPONENTS})
|
||||||
|
|
||||||
|
if (wxWidgets_FOUND)
|
||||||
|
# Use upstream wxWidgetsConfig.cmake if possible
|
||||||
|
find_package_handle_standard_args(wxWidgets CONFIG_MODE)
|
||||||
|
else()
|
||||||
|
# Fall back to CMake's FindwxWidgets
|
||||||
|
# Temporarily unset CMAKE_MODULE_PATH to avoid calling the current find
|
||||||
|
# module recursively
|
||||||
|
set(_tmp_module_path "${CMAKE_MODULE_PATH}")
|
||||||
|
set(CMAKE_MODULE_PATH "")
|
||||||
|
|
||||||
|
find_package(wxWidgets MODULE QUIET COMPONENTS ${wxWidgets_FIND_COMPONENTS})
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH "${_tmp_module_path}")
|
||||||
|
unset(_tmp_module_path)
|
||||||
|
|
||||||
|
if (wxWidgets_FOUND)
|
||||||
|
add_library(wx::base IMPORTED INTERFACE)
|
||||||
|
target_include_directories(wx::base INTERFACE ${wxWidgets_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(wx::base INTERFACE ${wxWidgets_LIBRARIES})
|
||||||
|
target_link_directories(wx::base INTERFACE ${wxWidgets_LIBRARY_DIRS})
|
||||||
|
target_compile_definitions(wx::base INTERFACE ${wxWidgets_DEFINITIONS})
|
||||||
|
target_compile_options(wx::base INTERFACE ${wxWidgets_CXX_FLAGS})
|
||||||
|
|
||||||
|
# FindwxWidgets sets everything into a single set of variables, so it is
|
||||||
|
# impossible to tell what libraries are required for what component.
|
||||||
|
# To be compatible with wxWidgetsConfig, we create an alias for each
|
||||||
|
# component so that the user can still use target_link_libraries(wx::gl)
|
||||||
|
foreach(component ${wxWidgets_FIND_COMPONENTS})
|
||||||
|
if (NOT component STREQUAL "base")
|
||||||
|
# don't alias base to itself
|
||||||
|
add_library(wx::${component} ALIAS wx::base)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(wxWidgets
|
||||||
|
REQUIRED_VARS
|
||||||
|
wxWidgets_LIBRARIES
|
||||||
|
wxWidgets_FOUND
|
||||||
|
VERSION_VAR
|
||||||
|
wxWidgets_VERSION_STRING
|
||||||
|
)
|
||||||
|
endif()
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
|
||||||
|
# SPDX-License-Identifier: ISC
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package(zstd CONFIG)
|
||||||
|
if (zstd_FOUND)
|
||||||
|
# Use upstream zstdConfig.cmake if possible
|
||||||
|
if (NOT TARGET zstd::zstd)
|
||||||
|
if (TARGET zstd::libzstd_static)
|
||||||
|
add_library(zstd::zstd ALIAS zstd::libzstd_static)
|
||||||
|
elseif (TARGET zstd::libzstd_shared)
|
||||||
|
add_library(zstd::zstd ALIAS zstd::libzstd_shared)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
find_package_handle_standard_args(zstd CONFIG_MODE)
|
||||||
|
else()
|
||||||
|
# Fallback to pkg-config otherwise
|
||||||
|
find_package(PkgConfig)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(libzstd IMPORTED_TARGET GLOBAL libzstd)
|
||||||
|
if (libzstd_FOUND)
|
||||||
|
add_library(zstd::zstd ALIAS PkgConfig::libzstd)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(zstd
|
||||||
|
REQUIRED_VARS
|
||||||
|
libzstd_LINK_LIBRARIES
|
||||||
|
libzstd_FOUND
|
||||||
|
VERSION_VAR libzstd_VERSION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user