mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00
Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
88156cff05 | |||
1b7065d8b4 | |||
909f36017b | |||
631df2d903 | |||
789045e1b2 | |||
19551fb864 | |||
449e28f9a6 | |||
45db281360 | |||
cb38303531 | |||
1310052bd7 | |||
9d786b6440 | |||
9734e39530 | |||
ed4318b949 | |||
21a240547e | |||
cfd83be9a1 | |||
620c263582 | |||
559bfa3112 | |||
dff7aa5ed6 | |||
8d826b4f62 | |||
f77140336d | |||
29cb2ddd87 | |||
88af328437 | |||
318abc4ece | |||
d4ba991dd3 | |||
9ea17949ef | |||
fc74ce36c6 | |||
d42a27937d |
@ -1,27 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{c,cpp,h,java}]
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 100
|
||||
|
||||
[{CMakeLists.txt,*.cmake}]
|
||||
indent_style = tab
|
||||
|
||||
[.editorconfig]
|
||||
insert_final_newline = true
|
||||
|
||||
[*.gradle]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
|
||||
[*.xml]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
@ -1,67 +0,0 @@
|
||||
# This file can be used for git blame using --ignore-revs-file
|
||||
# or by setting blame.ignoreRevsFile in the git config.
|
||||
|
||||
# Remove unnecessary Src/ folders
|
||||
34692ab826abc8f8faa61bdb2280b742424528f1
|
||||
|
||||
# Reformat C++ code
|
||||
3570c7f03a2aa90aa634f96c0af1969af610f14d
|
||||
|
||||
# Reformat Android code
|
||||
248ee12aed057acd0bdd310359c328e8d4fd5e5a
|
||||
|
||||
# Enum and struct indentation cleanup
|
||||
40182a48a56b8e294e126c64f5f37910a40c67cd
|
||||
ebb48d019eec1c29a37a406e2db16d7565367faa
|
||||
|
||||
# SVN line-ending conversion
|
||||
30c883bcfc65761dc9fb61fea16a25fb61a7e220
|
||||
3b36e0657140a8f54729f55f94ad108547362ed5
|
||||
473cd01181be6c8160ce477f25ca6bd39f8cc083
|
||||
49cfded60bb5b444d1828190eacc52bbb49a9cb8
|
||||
4a0c8fc0c9b6666e7933683260e2befbc81917ff
|
||||
4b5b9ad05c10d95c9af43502ecc6877d6e680c4d
|
||||
4b68a543ba30ec18e79c93b742bc6f110ccd4561
|
||||
4f889ca1a3cb66ff78f11aa6864edf8ce51b8c93
|
||||
578c402d2ce5e6a7b6e42a4c7449d9aeac61e5e2
|
||||
5e81298ef0147bf36c4aaafa35accc2700777bd3
|
||||
7efbc879e544cba7f205b3eeaeff050f46fd9607
|
||||
7f4ebed1ddb7ca9aaa49172946fc1f7dc2dc3c75
|
||||
8151b21ec75107b73a5863177f29d6f69b7174fc
|
||||
8fca9a8e8d547653581ecb4aac12a09a4311eba3
|
||||
901fe7c00fec5e2aaf55d184edbcb6d092345d52
|
||||
90bac5731cc4b15f40be9cf3a51a2c88ca6b53bf
|
||||
9146b9b261c34f476c9f83934e6da6a463ad51c7
|
||||
a41c1b2d0a9fab51f8a75ccdb7dba0890f766820
|
||||
a524cecfabbd4e321485e0cbac9325efde2123ef
|
||||
ab76cbf2fcf31b059edf10c220800150313ddf18
|
||||
bbb98d8e2e8259213cc231041eba922471555eb9
|
||||
e6fe5ec42f025a710918c1aaf8643da36a13bb3e
|
||||
fc1c7c31a08d55be4c756a1ed599d6afeedd9a11
|
||||
|
||||
# Trailing whitespace
|
||||
c579637eafb9e9eb7f83711569254bd8da6d09d2
|
||||
664c8d30a055f4762a2a60be77c1c8eaec1a5d85
|
||||
84ae817c180556badd1a810fceff4c4168672541
|
||||
8da425b008b46ef90d649e55c6c0d4a0bc2b556b
|
||||
8f7c6286f4d4b3e1dccc7076012fe6e593e78c8b
|
||||
|
||||
# Additional reformatting
|
||||
40bb9974f21878e64fb03d70e717cb996bf13a29
|
||||
|
||||
# Tabs vs spaces
|
||||
0e3d8e2e9f1b3eab593b09be986c4ff12a0221e2
|
||||
16a74a9557779cd15890b0a3bb2924cb4b00ad6f
|
||||
1db10b139cb1f9b92b2e90eb86f236dcd30333b4
|
||||
1de39a4a6e6b5ef3ec55bd717d4ba02c02ff8d29
|
||||
2316cb6876e6d79584ce0cc50771d2fb8495fe45
|
||||
2d4c3c7c918877c844babaa5ac4c23f8a441fb64
|
||||
31f037b187525d72c10b83695f780ede1ad9db68
|
||||
3c6d0fc7106131098fe1a79d2deb0f39671c5252
|
||||
3fd87a7636ff434118a5d7f7334550be8db55c0b
|
||||
71ef0a02451393b32fc2304008f87d5b29b61444
|
||||
7ab0cca6455830a838b1b1e38e2c3f265e4e5d0b
|
||||
d800b5fb74c077522ef7a0752e49968df46e745e
|
||||
edd9d0e0ef6898a0528ac6389e93e9fca6132ff6
|
||||
ee61bd6f2e4db8df8e92be6f92c02b808aa92234
|
||||
ef85b9af45922c6ca364930d40f8aacf1a6dfe64
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
||||
*.sln text eol=crlf
|
45
.gitignore
vendored
45
.gitignore
vendored
@ -1,45 +0,0 @@
|
||||
# Ignore image thumbnail files created by windows
|
||||
Thumbs.db
|
||||
# Ignore Finder view option files created by OS X
|
||||
.DS_Store
|
||||
# Ignore autogenerated source files
|
||||
Externals/mGBA/version.c
|
||||
Source/Core/Common/scmrev.h
|
||||
# Ignore files output by build
|
||||
/cmake-build-debug
|
||||
/cmake-build-release
|
||||
/[Bb]uild*/
|
||||
/[Bb]inary*/
|
||||
/obj/
|
||||
# Ignore files output by Android cmake build
|
||||
/Source/Android/app/.cxx/
|
||||
/libs/
|
||||
# Ignore various files created by visual studio/msbuild
|
||||
*.ipch
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.suo
|
||||
*.vcxproj.user
|
||||
*.obj
|
||||
*.tlog
|
||||
*.VC.opendb
|
||||
*.VC.db
|
||||
.vs*/
|
||||
/Source/enc_temp_folder/
|
||||
# Ignore build info file created by QtCreator
|
||||
CMakeLists.txt.user
|
||||
# Ignore files created by posix people
|
||||
*~
|
||||
# Ignore vim swapfiles
|
||||
*.swp
|
||||
# Ignore emacs temp files
|
||||
\#*\#
|
||||
.\#*
|
||||
# Ignore kdevelop files/dirs
|
||||
*.kdev4
|
||||
# Ignore IDEA/Clion files/dirs
|
||||
.idea/
|
||||
# Ignore Visual Studio Code's working dir
|
||||
/.vscode/
|
||||
# Ignore flatpak-builder's cache dir
|
||||
.flatpak-builder
|
108
.gitmodules
vendored
108
.gitmodules
vendored
@ -1,108 +0,0 @@
|
||||
[submodule "Externals/Qt"]
|
||||
path = Externals/Qt
|
||||
url = https://github.com/dolphin-emu/ext-win-qt.git
|
||||
shallow = true
|
||||
[submodule "Externals/mGBA/mgba"]
|
||||
path = Externals/mGBA/mgba
|
||||
url = https://github.com/mgba-emu/mgba.git
|
||||
shallow = true
|
||||
[submodule "Externals/FFmpeg-bin"]
|
||||
path = Externals/FFmpeg-bin
|
||||
url = https://github.com/dolphin-emu/ext-win-ffmpeg.git
|
||||
shallow = true
|
||||
[submodule "libusb"]
|
||||
path = Externals/libusb/libusb
|
||||
url = https://github.com/libusb/libusb.git
|
||||
shallow = true
|
||||
[submodule "Externals/spirv_cross/SPIRV-Cross"]
|
||||
path = Externals/spirv_cross/SPIRV-Cross
|
||||
url = https://github.com/KhronosGroup/SPIRV-Cross.git
|
||||
shallow = true
|
||||
[submodule "SDL"]
|
||||
path = Externals/SDL/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
shallow = true
|
||||
[submodule "Externals/zlib-ng/zlib-ng"]
|
||||
path = Externals/zlib-ng/zlib-ng
|
||||
url = https://github.com/zlib-ng/zlib-ng.git
|
||||
shallow = true
|
||||
[submodule "Externals/libspng/libspng"]
|
||||
path = Externals/libspng/libspng
|
||||
url = https://github.com/randy408/libspng.git
|
||||
shallow = true
|
||||
[submodule "Externals/VulkanMemoryAllocator"]
|
||||
path = Externals/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
shallow = true
|
||||
[submodule "Externals/cubeb/cubeb"]
|
||||
path = Externals/cubeb/cubeb
|
||||
url = https://github.com/mozilla/cubeb.git
|
||||
shallow = true
|
||||
[submodule "Externals/implot/implot"]
|
||||
path = Externals/implot/implot
|
||||
url = https://github.com/epezent/implot.git
|
||||
shallow = true
|
||||
[submodule "Externals/gtest"]
|
||||
path = Externals/gtest
|
||||
url = https://github.com/google/googletest.git
|
||||
shallow = true
|
||||
[submodule "Externals/rcheevos/rcheevos"]
|
||||
path = Externals/rcheevos/rcheevos
|
||||
url = https://github.com/RetroAchievements/rcheevos.git
|
||||
shallow = true
|
||||
[submodule "Externals/libadrenotools"]
|
||||
path = Externals/libadrenotools
|
||||
url = https://github.com/bylaws/libadrenotools.git
|
||||
shallow = true
|
||||
[submodule "Externals/curl/curl"]
|
||||
path = Externals/curl/curl
|
||||
url = https://github.com/curl/curl.git
|
||||
shallow = true
|
||||
[submodule "Externals/fmt/fmt"]
|
||||
path = Externals/fmt/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
shallow = true
|
||||
[submodule "Externals/lz4/lz4"]
|
||||
path = Externals/lz4/lz4
|
||||
url = https://github.com/lz4/lz4.git
|
||||
shallow = true
|
||||
[submodule "Externals/xxhash/xxHash"]
|
||||
path = Externals/xxhash/xxHash
|
||||
url = https://github.com/Cyan4973/xxHash.git
|
||||
shallow = true
|
||||
[submodule "Externals/enet/enet"]
|
||||
path = Externals/enet/enet
|
||||
url = https://github.com/lsalzman/enet.git
|
||||
shallow = true
|
||||
[submodule "hidapi-src"]
|
||||
path = Externals/hidapi/hidapi-src
|
||||
url = https://github.com/libusb/hidapi.git
|
||||
shallow = true
|
||||
[submodule "Externals/tinygltf/tinygltf"]
|
||||
path = Externals/tinygltf/tinygltf
|
||||
url = https://github.com/syoyo/tinygltf.git
|
||||
shallow = true
|
||||
[submodule "Externals/minizip-ng/minizip-ng"]
|
||||
path = Externals/minizip-ng/minizip-ng
|
||||
url = https://github.com/zlib-ng/minizip-ng.git
|
||||
shallow = true
|
||||
[submodule "Externals/Vulkan-Headers"]
|
||||
path = Externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
shallow = true
|
||||
[submodule "Externals/watcher/watcher"]
|
||||
path = Externals/watcher/watcher
|
||||
url = https://github.com/e-dant/watcher.git
|
||||
shallow = true
|
||||
[submodule "Externals/SFML/SFML"]
|
||||
path = Externals/SFML/SFML
|
||||
url = https://github.com/SFML/SFML.git
|
||||
shallow = true
|
||||
[submodule "Externals/zstd/zstd"]
|
||||
path = Externals/zstd/zstd
|
||||
url = https://github.com/facebook/zstd.git
|
||||
shallow = true
|
||||
[submodule "Externals/miniupnpc/miniupnp"]
|
||||
path = Externals/miniupnpc/miniupnp
|
||||
url = https://github.com/miniupnp/miniupnp.git
|
||||
shallow = true
|
54
.mailmap
54
.mailmap
@ -1,54 +0,0 @@
|
||||
# This file exists to enable "git shortlog -s" to group by person.
|
||||
Andrew de los Reyes <adlr@gmail.com> <adlr@chromium.org>
|
||||
Augustin Cavalier <waddlesplash@gmail.com> <ajcsweb@gmail.com>
|
||||
Benjamin Przybocki <buddybenj@gmail.com>
|
||||
Dolphin Bots <noreply@dolphin-emu.org> <dolphin-emu-bot@users.noreply.github.com>
|
||||
Dolphin Bots <noreply@dolphin-emu.org> <contact+i18n@dolphin-emu.org>
|
||||
Dolphin Bots <noreply@dolphin-emu.org> <buildbot@ubuntu.ubuntu.dolphin-emu.org>
|
||||
Grant Paul <git@grantpaul.com> <chpwn@chpwn.com>
|
||||
Henrik Rydgård <hrydgard@gmail.com>
|
||||
Jack Frost <bhaal@0x1337.org> <j4ck.fr0st@gmail.com>
|
||||
James Dunne <james.jdunne@gmail.com>
|
||||
John Chadwick <johnwchadwick@gmail.com> <johnwchadwick>
|
||||
John Peterson <john.s.peterson@live.com>
|
||||
John Peterson <john.s.peterson@live.com> <jpeterson57@gmail.com>
|
||||
Jordan Cristiano <jordan.cristi@gmail.com> <jordan.cristi AT [Google mail]>
|
||||
Jordan Cristiano <jordan.cristi@gmail.com> <jordan.cristi [AT] gmail.com>
|
||||
Jordan Woyak <jordan.woyak@gmail.com> <jordan@bill-laptop.lan>
|
||||
Jordan Woyak <jordan.woyak@gmail.com> <Billiard26@gmail.com>
|
||||
Jules Blok <jules.blok@gmail.com> Armada <jules.blok@gmail.com>
|
||||
Lioncash <mathew1800@gmail.com>
|
||||
Lioncash <mathew1800@gmail.com> Lioncash <nope>
|
||||
Lioncash <mathew1800@gmail.com> <mathew1900@hotmail.com>
|
||||
Maarten ter Huurne <maarten@treewalker.org> <mth@lexx-9122.trinair2002>
|
||||
Marcos Vitali <marcosvitali@gmail.com>
|
||||
Markus Wick <markus+github@selfnet.de> <wickmarkus@web.de>
|
||||
Matthew Parlane <parlane@gmail.com>
|
||||
Matthew Parlane <parlane@gmail.com> <matthew@phantuntu.(none)>
|
||||
Oussama Danba <Shadoxfix@gmail.com>
|
||||
Pascal Jouy <pascal.jouy@hotmail.fr>
|
||||
Pierre <pierre@pirsoft.de>
|
||||
Pierre Bourdon <delroth@gmail.com> <delroth@lse.epita.fr>
|
||||
Rodolfo Bogado <rodolfoosvaldobogado@gmail.com>
|
||||
Rog <rdragoon@optonline.net>
|
||||
RolandMunsil <roland@munsil.com> <RolandMunsil@users.noreply.github.com>
|
||||
Runo <i.am.runo@hotmail.com>
|
||||
Ryan Houdek <sonicadvance1@gmail.com>
|
||||
Ryan Houdek <sonicadvance1@gmail.com> <Sonicadvance1@gmail.com>
|
||||
Ryan Houdek <sonicadvance1@gmail.com> <ryan.houdek@codethink.co.uk>
|
||||
Ryan Houdek <sonicadvance1@gmail.com> <sonicadvance1@Ryan-Desktop.(none)>
|
||||
Sacha <xsacha@gmail.com>
|
||||
Sean Maas <seanmaas27@gmail.com>
|
||||
Shawn Hoffman <godisgovernment@gmail.com>
|
||||
Steven V. <Stevoisiak@gmail.com>
|
||||
Steven V. <Stevoisiak@gmail.com> <S.Vascellaro@gmail.com>
|
||||
Tony Wasserka <neobrainx@gmail.com> <NeoBrainX@googlemail.com>
|
||||
Tony Wasserka <neobrainx@gmail.com> <NeoBrainX@gmail.com>
|
||||
TotalNerd <xtrafear@gmail.com>
|
||||
booto <remornicus@gmail.com> <booto+dolphin@justanothercoder.com>
|
||||
i418c <starfield94@aol.com> <i418c@users.noreply.github.com>
|
||||
luisr142004 <luisr142004@gmail.com> <luisr142004@yahoo.com>
|
||||
magumagu <magumagu9@gmail.com>
|
||||
masken <masken3@gmail.com> <masken@emulation64.com>
|
||||
nitsuja <nitsuja-@hotmail.com>
|
||||
skidau <skidau@gmail.com>
|
@ -1,8 +0,0 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:dolphinemu:p:dolphin-emu:r:emulator]
|
||||
file_filter = Languages/po/<lang>.po
|
||||
source_file = Languages/po/dolphin-emu.pot
|
||||
source_lang = en-US
|
||||
type = PO
|
@ -1,26 +0,0 @@
|
||||
# How to Set Up an Android Development Environment
|
||||
|
||||
If you'd like to contribute to the Android project, but do not currently have a development environment setup, follow the instructions in this guide.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* [Android Studio](https://developer.android.com/studio/)
|
||||
|
||||
If you downloaded Android Studio, install it with the default options and open the project located in `dolphin/Source/Android`
|
||||
|
||||
## Setting Up Android Studio
|
||||
|
||||
1. Wait for background tasks to complete on the bottom of the window.
|
||||
2. Launch the Android SDK Manager by clicking on its icon in Android Studio's main toolbar:
|
||||
![Android Studio Package Icon][package-icon]
|
||||
3. Install or update the SDK Platform. Choose the API level as defined in the app module's [build.gradle](Source/Android/app/build.gradle#L7) file.
|
||||
4. Install a CMake version as defined in the app module's [build.gradle](Source/Android/app/build.gradle#L99) file. The option won't appear until you select `Show Package Details`.
|
||||
5. Select `Build Variants` on the left side of the window to choose the build variant and ABI you would like to compile for the `:app` module.
|
||||
6. Select the green hammer icon in the main toolbar to build and create the apk in `Source/Android/app/build/outputs/apk`
|
||||
|
||||
## Compiling from the Command-Line
|
||||
|
||||
For command-line users, any task may be executed with `cd Source/Android` followed by `gradlew <task-name>`. In particular, `gradlew assemble` builds debug and release versions of the application (which are placed in `Source/Android/app/build/outputs/apk`).
|
||||
|
||||
[package-icon]: https://i.imgur.com/hgmMlsM.png
|
||||
[code-style]: https://i.imgur.com/3b3UBhb.png
|
@ -1,379 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
The current tooling supported in CMake, Homebrew, and Qt5 are insufficient for
|
||||
creating macOS universal binaries automatically for applications like Dolphin
|
||||
which have more complicated build requirements (like different libraries, build
|
||||
flags and source files for each target architecture).
|
||||
|
||||
So instead, this script manages the configuration and compilation of distinct
|
||||
builds and project files for each target architecture and then merges the two
|
||||
binaries into a single universal binary.
|
||||
|
||||
Running this script will:
|
||||
1) Generate Xcode project files for the ARM build (if project files don't
|
||||
already exist)
|
||||
2) Generate Xcode project files for the x64 build (if project files don't
|
||||
already exist)
|
||||
3) Build the ARM project for the selected build_target
|
||||
4) Build the x64 project for the selected build_target
|
||||
5) Generate universal .app packages combining the ARM and x64 packages
|
||||
6) Use the lipo tool to combine the binary objects inside each of the
|
||||
packages into universal binaries
|
||||
7) Code sign the final universal binaries using the specified
|
||||
codesign_identity
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import filecmp
|
||||
import glob
|
||||
import json
|
||||
import multiprocessing
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
# The config variables listed below are the defaults, but they can be
|
||||
# overridden by command line arguments see parse_args(), or run:
|
||||
# BuildMacOSUniversalBinary.py --help
|
||||
DEFAULT_CONFIG = {
|
||||
|
||||
# Location of destination universal binary
|
||||
"dst_app": "universal/",
|
||||
# Build Target (dolphin-emu to just build the emulator and skip the tests)
|
||||
"build_target": "ALL_BUILD",
|
||||
|
||||
# Location for CMake to search for files (default is for homebrew)
|
||||
"arm64_cmake_prefix": "/opt/homebrew",
|
||||
"x86_64_cmake_prefix": "/usr/local",
|
||||
|
||||
# Locations to qt5 directories for arm and x64 libraries
|
||||
# The default values of these paths are taken from the default
|
||||
# paths used for homebrew
|
||||
"arm64_qt5_path": "/opt/homebrew/opt/qt5",
|
||||
"x86_64_qt5_path": "/usr/local/opt/qt5",
|
||||
|
||||
# Identity to use for code signing. "-" indicates that the app will not
|
||||
# be cryptographically signed/notarized but will instead just use a
|
||||
# SHA checksum to verify the integrity of the app. This doesn't
|
||||
# protect against malicious actors, but it does protect against
|
||||
# running corrupted binaries and allows for access to the extended
|
||||
# permissions needed for ARM builds
|
||||
"codesign_identity": "-",
|
||||
|
||||
# CMake Generator to use for building
|
||||
"generator": "Unix Makefiles",
|
||||
"build_type": "Release",
|
||||
|
||||
"run_unit_tests": False,
|
||||
|
||||
# Whether our autoupdate functionality is enabled or not.
|
||||
"autoupdate": True,
|
||||
|
||||
# The distributor for this build.
|
||||
"distributor": "None"
|
||||
}
|
||||
|
||||
# Architectures to build for. This is explicitly left out of the command line
|
||||
# config options for several reasons:
|
||||
# 1) Adding new architectures will generally require more code changes
|
||||
# 2) Single architecture builds should utilize the normal generated cmake
|
||||
# project files rather than this wrapper script
|
||||
|
||||
ARCHITECTURES = ["x86_64", "arm64"]
|
||||
|
||||
|
||||
def parse_args(conf=DEFAULT_CONFIG):
|
||||
"""
|
||||
Parses the command line arguments into a config dictionary.
|
||||
"""
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument(
|
||||
"--target",
|
||||
help="Build target in generated project files",
|
||||
default=conf["build_target"],
|
||||
dest="build_target")
|
||||
parser.add_argument(
|
||||
"-G",
|
||||
help="CMake Generator to use for creating project files",
|
||||
default=conf["generator"],
|
||||
dest="generator")
|
||||
parser.add_argument(
|
||||
"--build_type",
|
||||
help="CMake build type [Debug, Release, RelWithDebInfo, MinSizeRel]",
|
||||
default=conf["build_type"],
|
||||
dest="build_type")
|
||||
parser.add_argument(
|
||||
"--dst_app",
|
||||
help="Directory where universal binary will be stored",
|
||||
default=conf["dst_app"])
|
||||
|
||||
parser.add_argument("--run_unit_tests", action="store_true",
|
||||
default=conf["run_unit_tests"])
|
||||
|
||||
parser.add_argument(
|
||||
"--autoupdate",
|
||||
help="Enables our autoupdate functionality",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=conf["autoupdate"])
|
||||
|
||||
parser.add_argument(
|
||||
"--distributor",
|
||||
help="Sets the distributor for this build",
|
||||
default=conf["distributor"])
|
||||
|
||||
parser.add_argument(
|
||||
"--codesign",
|
||||
help="Code signing identity to use to sign the applications",
|
||||
default=conf["codesign_identity"],
|
||||
dest="codesign_identity")
|
||||
|
||||
for arch in ARCHITECTURES:
|
||||
parser.add_argument(
|
||||
f"--{arch}_cmake_prefix",
|
||||
help="Folder for cmake to search for packages",
|
||||
default=conf[arch+"_cmake_prefix"],
|
||||
dest=arch+"_cmake_prefix")
|
||||
|
||||
parser.add_argument(
|
||||
f"--{arch}_qt5_path",
|
||||
help=f"Install path for {arch} qt5 libraries",
|
||||
default=conf[arch+"_qt5_path"])
|
||||
|
||||
return vars(parser.parse_args())
|
||||
|
||||
|
||||
def lipo(path0, path1, dst):
|
||||
if subprocess.call(["lipo", "-create", "-output", dst, path0, path1]) != 0:
|
||||
print(f"WARNING: {path0} and {path1} cannot be lipo'd")
|
||||
|
||||
shutil.copy(path0, dst)
|
||||
|
||||
|
||||
def recursive_merge_binaries(src0, src1, dst):
|
||||
"""
|
||||
Merges two build trees together for different architectures into a single
|
||||
universal binary.
|
||||
|
||||
The rules for merging are:
|
||||
|
||||
1) Files that exist in either src tree are copied into the dst tree
|
||||
2) Files that exist in both trees and are identical are copied over
|
||||
unmodified
|
||||
3) Files that exist in both trees and are non-identical are lipo'd
|
||||
4) Symlinks are created in the destination tree to mirror the hierarchy in
|
||||
the source trees
|
||||
"""
|
||||
|
||||
# Check that all files present in the folder are of the same type and that
|
||||
# links link to the same relative location
|
||||
for newpath0 in glob.glob(src0+"/*"):
|
||||
filename = os.path.basename(newpath0)
|
||||
newpath1 = os.path.join(src1, filename)
|
||||
if not os.path.exists(newpath1):
|
||||
continue
|
||||
|
||||
if os.path.islink(newpath0) and os.path.islink(newpath1):
|
||||
if os.path.relpath(newpath0, src0) == os.path.relpath(newpath1, src1):
|
||||
continue
|
||||
|
||||
if os.path.isdir(newpath0) and os.path.isdir(newpath1):
|
||||
continue
|
||||
|
||||
# isfile() can be true for links so check that both are not links
|
||||
# before checking if they are both files
|
||||
if (not os.path.islink(newpath0)) and (not os.path.islink(newpath1)):
|
||||
if os.path.isfile(newpath0) and os.path.isfile(newpath1):
|
||||
continue
|
||||
|
||||
raise Exception(f"{newpath0} and {newpath1} cannot be " +
|
||||
"merged into a universal binary because they are of " +
|
||||
"incompatible types. Perhaps the installed libraries" +
|
||||
" are from different versions for each architecture")
|
||||
|
||||
for newpath0 in glob.glob(src0+"/*"):
|
||||
filename = os.path.basename(newpath0)
|
||||
newpath1 = os.path.join(src1, filename)
|
||||
new_dst_path = os.path.join(dst, filename)
|
||||
if os.path.islink(newpath0):
|
||||
# Symlinks will be fixed after files are resolved
|
||||
continue
|
||||
|
||||
if not os.path.exists(newpath1):
|
||||
if os.path.isdir(newpath0):
|
||||
shutil.copytree(newpath0, new_dst_path)
|
||||
else:
|
||||
shutil.copy(newpath0, new_dst_path)
|
||||
|
||||
continue
|
||||
|
||||
if os.path.isdir(newpath1):
|
||||
os.mkdir(new_dst_path)
|
||||
recursive_merge_binaries(newpath0, newpath1, new_dst_path)
|
||||
continue
|
||||
|
||||
if filecmp.cmp(newpath0, newpath1):
|
||||
shutil.copy(newpath0, new_dst_path)
|
||||
else:
|
||||
lipo(newpath0, newpath1, new_dst_path)
|
||||
|
||||
# Loop over files in src1 and copy missing things over to dst
|
||||
for newpath1 in glob.glob(src1+"/*"):
|
||||
filename = os.path.basename(newpath1)
|
||||
newpath0 = os.path.join(src0, filename)
|
||||
new_dst_path = os.path.join(dst, filename)
|
||||
if (not os.path.exists(newpath0)) and (not os.path.islink(newpath1)):
|
||||
if os.path.isdir(newpath1):
|
||||
shutil.copytree(newpath1, new_dst_path)
|
||||
else:
|
||||
shutil.copy(newpath1, new_dst_path)
|
||||
|
||||
# Fix up symlinks for path0
|
||||
for newpath0 in glob.glob(src0+"/*"):
|
||||
filename = os.path.basename(newpath0)
|
||||
new_dst_path = os.path.join(dst, filename)
|
||||
if os.path.islink(newpath0):
|
||||
relative_path = os.path.relpath(os.path.realpath(newpath0), src0)
|
||||
os.symlink(relative_path, new_dst_path)
|
||||
# Fix up symlinks for path1
|
||||
for newpath1 in glob.glob(src1+"/*"):
|
||||
filename = os.path.basename(newpath1)
|
||||
new_dst_path = os.path.join(dst, filename)
|
||||
newpath0 = os.path.join(src0, filename)
|
||||
if os.path.islink(newpath1) and not os.path.exists(newpath0):
|
||||
relative_path = os.path.relpath(os.path.realpath(newpath1), src1)
|
||||
os.symlink(relative_path, new_dst_path)
|
||||
|
||||
def python_to_cmake_bool(boolean):
|
||||
return "ON" if boolean else "OFF"
|
||||
|
||||
def build(config):
|
||||
"""
|
||||
Builds the project with the parameters specified in config.
|
||||
"""
|
||||
|
||||
print("Building config:")
|
||||
print(json.dumps(config, indent=4))
|
||||
|
||||
# Configure and build single architecture builds for each architecture
|
||||
for arch in ARCHITECTURES:
|
||||
if not os.path.exists(arch):
|
||||
os.mkdir(arch)
|
||||
|
||||
# Place Qt on the prefix path.
|
||||
prefix_path = config[arch+"_qt5_path"]+';'+config[arch+"_cmake_prefix"]
|
||||
|
||||
env = os.environ.copy()
|
||||
env["CMAKE_OSX_ARCHITECTURES"] = arch
|
||||
env["CMAKE_PREFIX_PATH"] = prefix_path
|
||||
|
||||
# Add the other architecture's prefix path to the ignore path so that
|
||||
# CMake doesn't try to pick up the wrong architecture's libraries when
|
||||
# cross compiling.
|
||||
ignore_path = ""
|
||||
for a in ARCHITECTURES:
|
||||
if a != arch:
|
||||
ignore_path = config[a+"_cmake_prefix"]
|
||||
|
||||
subprocess.check_call([
|
||||
"cmake", "../../", "-G", config["generator"],
|
||||
"-DCMAKE_BUILD_TYPE=" + config["build_type"],
|
||||
'-DCMAKE_CXX_FLAGS="-DMACOS_UNIVERSAL_BUILD=1"',
|
||||
'-DCMAKE_C_FLAGS="-DMACOS_UNIVERSAL_BUILD=1"',
|
||||
# System name needs to be specified for CMake to use
|
||||
# the specified CMAKE_SYSTEM_PROCESSOR
|
||||
"-DCMAKE_SYSTEM_NAME=Darwin",
|
||||
"-DCMAKE_PREFIX_PATH="+prefix_path,
|
||||
"-DCMAKE_SYSTEM_PROCESSOR="+arch,
|
||||
"-DCMAKE_IGNORE_PATH="+ignore_path,
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0.0",
|
||||
"-DMACOS_CODE_SIGNING_IDENTITY="
|
||||
+ config["codesign_identity"],
|
||||
'-DMACOS_CODE_SIGNING="ON"',
|
||||
"-DENABLE_AUTOUPDATE="
|
||||
+ python_to_cmake_bool(config["autoupdate"]),
|
||||
'-DDISTRIBUTOR=' + config['distributor'],
|
||||
# Always use libraries from Externals to prevent any libraries
|
||||
# installed by Homebrew from leaking in to the app
|
||||
"-DUSE_SYSTEM_LIBS=OFF",
|
||||
# However, we should still use the macOS provided versions of
|
||||
# iconv, bzip2, and curl
|
||||
"-DUSE_SYSTEM_ICONV=ON",
|
||||
"-DUSE_SYSTEM_BZIP2=ON",
|
||||
"-DUSE_SYSTEM_CURL=ON"
|
||||
],
|
||||
env=env, cwd=arch)
|
||||
|
||||
threads = multiprocessing.cpu_count()
|
||||
subprocess.check_call(["cmake", "--build", ".",
|
||||
"--config", config["build_type"],
|
||||
"--parallel", f"{threads}"], cwd=arch)
|
||||
|
||||
dst_app = config["dst_app"]
|
||||
|
||||
if os.path.exists(dst_app):
|
||||
shutil.rmtree(dst_app)
|
||||
|
||||
# Create and codesign the universal binary/
|
||||
os.mkdir(dst_app)
|
||||
|
||||
# Source binary trees to merge together
|
||||
src_app0 = ARCHITECTURES[0]+"/Binaries/"
|
||||
src_app1 = ARCHITECTURES[1]+"/Binaries/"
|
||||
|
||||
recursive_merge_binaries(src_app0, src_app1, dst_app)
|
||||
|
||||
if config["autoupdate"]:
|
||||
subprocess.check_call([
|
||||
"../Tools/mac-codesign.sh",
|
||||
"-t",
|
||||
"-e", "preserve",
|
||||
config["codesign_identity"],
|
||||
dst_app+"/Dolphin.app/Contents/Helpers/Dolphin Updater.app"])
|
||||
|
||||
subprocess.check_call([
|
||||
"../Tools/mac-codesign.sh",
|
||||
"-t",
|
||||
"-e", "preserve",
|
||||
config["codesign_identity"],
|
||||
dst_app+"/Dolphin.app"])
|
||||
|
||||
print("Built Universal Binary successfully!")
|
||||
|
||||
# Build and run unit tests for each architecture
|
||||
unit_test_results = {}
|
||||
if config["run_unit_tests"]:
|
||||
for arch in ARCHITECTURES:
|
||||
if not os.path.exists(arch):
|
||||
os.mkdir(arch)
|
||||
|
||||
print(f"Building and running unit tests for: {arch}")
|
||||
unit_test_results[arch] = \
|
||||
subprocess.call(["cmake", "--build", ".",
|
||||
"--config", config["build_type"],
|
||||
"--target", "unittests",
|
||||
"--parallel", f"{threads}"], cwd=arch)
|
||||
|
||||
passed_unit_tests = True
|
||||
for a in unit_test_results:
|
||||
code = unit_test_results[a]
|
||||
passed = code == 0
|
||||
|
||||
status_string = "PASSED"
|
||||
if not passed:
|
||||
passed_unit_tests = False
|
||||
status_string = f"FAILED ({code})"
|
||||
|
||||
print(a + " Unit Tests: " + status_string)
|
||||
|
||||
if not passed_unit_tests:
|
||||
exit(-1)
|
||||
|
||||
print("Passed all unit tests")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
conf = parse_args()
|
||||
build(conf)
|
@ -1,17 +0,0 @@
|
||||
find_program(CCACHE_BIN NAMES ccache sccache)
|
||||
if(CCACHE_BIN)
|
||||
# Official ccache recommendation is to set CMAKE_C(XX)_COMPILER_LAUNCHER
|
||||
if (NOT CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache")
|
||||
list(INSERT CMAKE_C_COMPILER_LAUNCHER 0 "${CCACHE_BIN}")
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache")
|
||||
list(INSERT CMAKE_CXX_COMPILER_LAUNCHER 0 "${CCACHE_BIN}")
|
||||
endif()
|
||||
|
||||
# ccache uses -I when compiling without preprocessor, which makes clang complain.
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
endif()
|
||||
endif()
|
@ -1,58 +0,0 @@
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# check_add_add_flag(<variable> <flag> [DEBUG_ONLY | RELEASE_ONLY])
|
||||
#
|
||||
# Add a C or C++ compilation flag to the current scope
|
||||
#
|
||||
# Can optionally add the flag to Debug or Release configurations only, use this when
|
||||
# targeting multi-configuration generators like Visual Studio or Xcode.
|
||||
# Release configurations means NOT Debug, so it will work for RelWithDebInfo or MinSizeRel too.
|
||||
#
|
||||
# If the flag is added successfully, the variables FLAG_C_<variable> and FLAG_CXX_<variable>
|
||||
# may be set to ON.
|
||||
#
|
||||
# Examples:
|
||||
# check_and_add_flag(FOO -foo)
|
||||
# check_and_add_flag(ONLYDEBUG -onlydebug DEBUG_ONLY)
|
||||
# check_and_add_flag(OPTMAX -O9001 RELEASE_ONLY)
|
||||
|
||||
function(check_and_add_flag var flag)
|
||||
set(genexp_config_test "1")
|
||||
if(ARGV2 STREQUAL "DEBUG_ONLY")
|
||||
set(genexp_config_test "$<CONFIG:Debug>")
|
||||
elseif(ARGV2 STREQUAL "NO_DEBINFO_ONLY")
|
||||
set(genexp_config_test "$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>>")
|
||||
elseif(ARGV2 STREQUAL "RELEASE_ONLY")
|
||||
set(genexp_config_test "$<NOT:$<CONFIG:Debug>>")
|
||||
elseif(ARGV2)
|
||||
message(FATAL_ERROR "check_and_add_flag called with incorrect arguments: ${ARGN}")
|
||||
endif()
|
||||
|
||||
set(is_c "$<COMPILE_LANGUAGE:C>")
|
||||
set(is_cxx "$<COMPILE_LANGUAGE:CXX>")
|
||||
set(test_flags_c)
|
||||
set(test_flags_cxx)
|
||||
|
||||
# The Visual Studio generators don't support COMPILE_LANGUAGE
|
||||
# So we fail all the C flags and only actually test CXX ones
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
set(is_c "0")
|
||||
set(is_cxx "1")
|
||||
else()
|
||||
# Otherwise assume the compile follows GCC syntax
|
||||
# and fail when the option is known but invalid.
|
||||
set(test_flags_c "${test_flags_c}-Werror ")
|
||||
set(test_flags_cxx "${test_flags_cxx}-Werror ")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag("${test_flags_c}${flag}" FLAG_C_${var})
|
||||
if(FLAG_C_${var})
|
||||
add_compile_options("$<$<AND:${is_c},${genexp_config_test}>:${flag}>")
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag("${test_flags_cxx}${flag}" FLAG_CXX_${var})
|
||||
if(FLAG_CXX_${var})
|
||||
add_compile_options("$<$<AND:${is_cxx},${genexp_config_test}>:${flag}>")
|
||||
endif()
|
||||
endfunction()
|
@ -1,58 +0,0 @@
|
||||
find_package(PkgConfig)
|
||||
|
||||
macro(_internal_message msg)
|
||||
if(NOT ${_is_quiet})
|
||||
message(STATUS "${msg}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(check_lib var pc lib)
|
||||
set(_is_required 0)
|
||||
set(_is_quiet 0)
|
||||
set(_arg_list ${ARGN})
|
||||
foreach(_arg ${ARGN})
|
||||
if(_arg STREQUAL "REQUIRED")
|
||||
list(REMOVE_ITEM _arg_list "REQUIRED")
|
||||
set(_is_required 1)
|
||||
endif()
|
||||
if(_arg STREQUAL "QUIET")
|
||||
list(REMOVE_ITEM _arg_list "QUIET")
|
||||
set(_is_quiet 1)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(PKG_CONFIG_FOUND AND NOT ${var}_FOUND)
|
||||
pkg_search_module(${var} QUIET ${pc})
|
||||
endif()
|
||||
|
||||
if(${var}_FOUND)
|
||||
if(${var}_INCLUDE_DIRS)
|
||||
include_directories(${${var}_INCLUDE_DIRS})
|
||||
endif()
|
||||
# Make sure include directories for headers found using find_path below
|
||||
# are re-added when reconfiguring
|
||||
if(${var}_INCLUDE)
|
||||
include_directories(${${var}_INCLUDE})
|
||||
endif()
|
||||
_internal_message("${lib} found")
|
||||
else()
|
||||
find_library(${var} ${lib})
|
||||
if(_arg_list)
|
||||
find_path(${var}_INCLUDE ${_arg_list})
|
||||
else()
|
||||
set(${var}_INCLUDE FALSE)
|
||||
endif()
|
||||
if(${var} AND ${var}_INCLUDE)
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_internal_message("${lib} found")
|
||||
set(${var}_FOUND 1 CACHE INTERNAL "")
|
||||
else()
|
||||
if(_is_required)
|
||||
message(FATAL_ERROR "${lib} is required but not found")
|
||||
else()
|
||||
_internal_message("${lib} not found")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Add C or C++ compile definitions to the current scope
|
||||
#
|
||||
# dolphin_compile_definitions(def [def ...] [DEBUG_ONLY | RELEASE_ONLY])
|
||||
#
|
||||
# Can optionally add the definitions to Debug or Release configurations only, use this so we can
|
||||
# target multi-configuration generators like Visual Studio or Xcode.
|
||||
# Release configurations means NOT Debug, so it will work for RelWithDebInfo or MinSizeRel too.
|
||||
# The definitions are added to the COMPILE_DEFINITIONS folder property.
|
||||
# Supports generator expressions, unlike add_definitions()
|
||||
#
|
||||
# Examples:
|
||||
# dolphin_compile_definitions(FOO) -> -DFOO
|
||||
# dolphin_compile_definitions(_DEBUG DEBUG_ONLY) -> -D_DEBUG
|
||||
# dolphin_compile_definitions(NDEBUG RELEASE_ONLY) -> -DNDEBUG
|
||||
# dolphin_compile_definitions($<$<COMPILE_LANGUAGE:C>:THISISONLYFORC>)
|
||||
|
||||
function(dolphin_compile_definitions)
|
||||
set(defs ${ARGN})
|
||||
|
||||
list(GET defs -1 last_def)
|
||||
list(REMOVE_AT defs -1)
|
||||
|
||||
set(genexp_config_test "1")
|
||||
if(last_def STREQUAL "DEBUG_ONLY")
|
||||
set(genexp_config_test "$<CONFIG:Debug>")
|
||||
elseif(last_def STREQUAL "RELEASE_ONLY")
|
||||
set(genexp_config_test "$<NOT:$<CONFIG:Debug>>")
|
||||
else()
|
||||
list(APPEND defs ${last_def})
|
||||
endif()
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
"$<${genexp_config_test}:${defs}>")
|
||||
endfunction()
|
@ -1,20 +0,0 @@
|
||||
include(RemoveCompileFlag)
|
||||
|
||||
macro(dolphin_disable_warnings _target)
|
||||
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS)
|
||||
if (_target_cxx_flags)
|
||||
set(new_flags "")
|
||||
foreach(flag IN LISTS _target_cxx_flags)
|
||||
# all warning flags start with "/W" or "/w" or "-W" or "-w"
|
||||
if (NOT "${flag}" MATCHES "^[-/][Ww]")
|
||||
list(APPEND new_flags "${flag}")
|
||||
endif()
|
||||
endforeach()
|
||||
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${new_flags}")
|
||||
endif()
|
||||
if (MSVC)
|
||||
target_compile_options(${_target} PRIVATE "/W0")
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
target_compile_options(${_target} PRIVATE "-w")
|
||||
endif()
|
||||
endmacro()
|
@ -1,24 +0,0 @@
|
||||
function(dolphin_inject_version_info target)
|
||||
set(INFO_PLIST_PATH "$<TARGET_BUNDLE_DIR:${target}>/Contents/Info.plist")
|
||||
add_custom_command(TARGET ${target}
|
||||
POST_BUILD
|
||||
|
||||
COMMAND /usr/libexec/PlistBuddy -c
|
||||
"Delete :CFBundleShortVersionString"
|
||||
"${INFO_PLIST_PATH}"
|
||||
|| true
|
||||
|
||||
COMMAND /usr/libexec/PlistBuddy -c
|
||||
"Delete :CFBundleLongVersionString"
|
||||
"${INFO_PLIST_PATH}"
|
||||
|| true
|
||||
|
||||
COMMAND /usr/libexec/PlistBuddy -c
|
||||
"Delete :CFBundleVersion"
|
||||
"${INFO_PLIST_PATH}"
|
||||
|| true
|
||||
|
||||
COMMAND /usr/libexec/PlistBuddy -c
|
||||
"Merge '${CMAKE_BINARY_DIR}/Source/Core/VersionInfo.plist'"
|
||||
"${INFO_PLIST_PATH}")
|
||||
endfunction()
|
@ -1,94 +0,0 @@
|
||||
# like add_library(new ALIAS old) but avoids add_library cannot create ALIAS target "new" because target "old" is imported but not globally visible. on older cmake
|
||||
# This can be replaced with a direct alias call once our minimum is cmake 3.18
|
||||
function(dolphin_alias_library new old)
|
||||
string(REPLACE "::" "" library_no_namespace ${old})
|
||||
if (NOT TARGET _alias_${library_no_namespace})
|
||||
add_library(_alias_${library_no_namespace} INTERFACE)
|
||||
target_link_libraries(_alias_${library_no_namespace} INTERFACE ${old})
|
||||
endif()
|
||||
add_library(${new} ALIAS _alias_${library_no_namespace})
|
||||
endfunction()
|
||||
|
||||
# Makes an imported target if it doesn't exist. Useful for when find scripts from older versions of cmake don't make the targets you need
|
||||
function(dolphin_make_imported_target_if_missing target lib)
|
||||
if(${lib}_FOUND AND NOT TARGET ${target})
|
||||
add_library(_${lib} INTERFACE)
|
||||
target_link_libraries(_${lib} INTERFACE "${${lib}_LIBRARIES}")
|
||||
target_include_directories(_${lib} INTERFACE "${${lib}_INCLUDE_DIRS}")
|
||||
add_library(${target} ALIAS _${lib})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(dolphin_optional_system_library out_use_system library)
|
||||
string(TOUPPER ${library} upperlib)
|
||||
set(USE_SYSTEM_${upperlib} "" CACHE STRING "Use system ${library} instead of bundled. ON - Always use system and fail if unavailable, OFF - Always use bundled, AUTO - Use system if available, otherwise use bundled, blank - Delegate to USE_SYSTEM_LIBS. Default is blank.")
|
||||
if("${USE_SYSTEM_${upperlib}}" STREQUAL "")
|
||||
if(APPROVED_VENDORED_DEPENDENCIES)
|
||||
string(TOLOWER ${library} lowerlib)
|
||||
if(lowerlib IN_LIST APPROVED_VENDORED_DEPENDENCIES)
|
||||
set(${out_use_system} AUTO PARENT_SCOPE)
|
||||
else()
|
||||
set(${out_use_system} ON PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
set(${out_use_system} ${USE_SYSTEM_LIBS} PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
set(${out_use_system} ${USE_SYSTEM_${upperlib}} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(dolphin_add_bundled_library library use_system bundled_path)
|
||||
if (${use_system} STREQUAL "AUTO")
|
||||
message(STATUS "No system ${library} was found. Using static ${library} from Externals.")
|
||||
else()
|
||||
message(STATUS "Using static ${library} from Externals")
|
||||
endif()
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${bundled_path}/CMakeLists.txt")
|
||||
message(FATAL_ERROR "No bundled ${library} was found. Did you forget to checkout submodules?")
|
||||
endif()
|
||||
add_subdirectory(${bundled_path} EXCLUDE_FROM_ALL)
|
||||
endfunction()
|
||||
|
||||
function(dolphin_find_optional_system_library library bundled_path)
|
||||
dolphin_optional_system_library(use_system ${library})
|
||||
string(TOUPPER ${library} upperlib)
|
||||
if(use_system)
|
||||
find_package(${library} ${ARGN})
|
||||
# Yay for cmake packages being inconsistent
|
||||
if(DEFINED ${library}_FOUND)
|
||||
set(prefix ${library})
|
||||
else()
|
||||
set(prefix ${upperlib})
|
||||
endif()
|
||||
if((NOT ${prefix}_FOUND) AND (NOT ${use_system} STREQUAL "AUTO"))
|
||||
message(FATAL_ERROR "No system ${library} was found. Please install it or set USE_SYSTEM_${upperlib} to AUTO or OFF.")
|
||||
endif()
|
||||
endif()
|
||||
if(${prefix}_FOUND)
|
||||
message(STATUS "Using system ${library}")
|
||||
set(${prefix}_TYPE "System" PARENT_SCOPE)
|
||||
else()
|
||||
dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
|
||||
set(${prefix}_TYPE "Bundled" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(dolphin_find_optional_system_library_pkgconfig library search alias bundled_path)
|
||||
dolphin_optional_system_library(use_system ${library})
|
||||
string(TOUPPER ${library} upperlib)
|
||||
if(use_system)
|
||||
pkg_search_module(${library} ${search} ${ARGN} IMPORTED_TARGET)
|
||||
if((NOT ${library}_FOUND) AND (NOT ${use_system} STREQUAL "AUTO"))
|
||||
message(FATAL_ERROR "No system ${library} was found. Please install it or set USE_SYSTEM_${upperlib} to AUTO or OFF.")
|
||||
endif()
|
||||
endif()
|
||||
if(${library}_FOUND)
|
||||
message(STATUS "Using system ${library}")
|
||||
dolphin_alias_library(${alias} PkgConfig::${library})
|
||||
set(${library}_TYPE "System" PARENT_SCOPE)
|
||||
else()
|
||||
dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
|
||||
set(${library}_TYPE "Bundled" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
@ -1,45 +0,0 @@
|
||||
# This module can be used in two different ways.
|
||||
#
|
||||
# When invoked as `cmake -P DolphinPostprocessBundle.cmake`, it fixes up an
|
||||
# application folder to be standalone. It bundles all required libraries from
|
||||
# the system and fixes up library IDs. Any additional shared libraries, like
|
||||
# plugins, that are found under Contents/MacOS/ will be made standalone as well.
|
||||
#
|
||||
# When called with `include(DolphinPostprocessBundle)`, it defines a helper
|
||||
# function `dolphin_postprocess_bundle` that sets up the command form of the
|
||||
# module as a post-build step.
|
||||
|
||||
if(CMAKE_GENERATOR)
|
||||
# Being called as include(DolphinPostprocessBundle), so define a helper function.
|
||||
set(_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION "${CMAKE_CURRENT_LIST_FILE}")
|
||||
function(dolphin_postprocess_bundle target)
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} "-D" "DOLPHIN_BUNDLE_PATH=$<TARGET_BUNDLE_DIR:${target}>"
|
||||
-P "${_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION}"
|
||||
)
|
||||
endfunction()
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Fixing up application bundle: ${DOLPHIN_BUNDLE_PATH}")
|
||||
|
||||
# Make sure to fix up any additional shared libraries (like plugins) that are
|
||||
# needed.
|
||||
file(GLOB_RECURSE extra_libs "${DOLPHIN_BUNDLE_PATH}/Contents/MacOS/*.dylib")
|
||||
|
||||
# BundleUtilities doesn't support DYLD_FALLBACK_LIBRARY_PATH behavior, which
|
||||
# makes it sometimes break on libraries that do weird things with @rpath. Specify
|
||||
# equivalent search directories until https://gitlab.kitware.com/cmake/cmake/issues/16625
|
||||
# is fixed and in our minimum CMake version.
|
||||
set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib")
|
||||
|
||||
# BundleUtilities is overly verbose, so disable most of its messages
|
||||
function(message)
|
||||
if(NOT ARGV MATCHES "^STATUS;")
|
||||
_message(${ARGV})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
include(BundleUtilities)
|
||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||
fixup_bundle("${DOLPHIN_BUNDLE_PATH}" "${extra_libs}" "${extra_dirs}")
|
@ -1,59 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindALSA
|
||||
# --------
|
||||
#
|
||||
# Find alsa
|
||||
#
|
||||
# Find the alsa libraries (asound)
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# ALSA_FOUND - True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found
|
||||
# ALSA_LIBRARIES - Set when ALSA_LIBRARY is found
|
||||
# ALSA_INCLUDE_DIRS - Set when ALSA_INCLUDE_DIR is found
|
||||
#
|
||||
#
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ALSA_INCLUDE_DIR - where to find asoundlib.h, etc.
|
||||
# ALSA_LIBRARY - the asound library
|
||||
# ALSA_VERSION_STRING - the version of alsa found (since CMake 2.8.8)
|
||||
|
||||
find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h
|
||||
DOC "The ALSA (asound) include directory"
|
||||
)
|
||||
|
||||
find_library(ALSA_LIBRARY NAMES asound
|
||||
DOC "The ALSA (asound) library"
|
||||
)
|
||||
|
||||
if(ALSA_INCLUDE_DIR AND EXISTS "${ALSA_INCLUDE_DIR}/alsa/version.h")
|
||||
file(STRINGS "${ALSA_INCLUDE_DIR}/alsa/version.h" alsa_version_str REGEX "^#define[\t ]+SND_LIB_VERSION_STR[\t ]+\".*\"")
|
||||
|
||||
string(REGEX REPLACE "^.*SND_LIB_VERSION_STR[\t ]+\"([^\"]*)\".*$" "\\1" ALSA_VERSION_STRING "${alsa_version_str}")
|
||||
unset(alsa_version_str)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA
|
||||
REQUIRED_VARS ALSA_LIBRARY ALSA_INCLUDE_DIR
|
||||
VERSION_VAR ALSA_VERSION_STRING)
|
||||
|
||||
if(ALSA_FOUND)
|
||||
set( ALSA_LIBRARIES ${ALSA_LIBRARY} )
|
||||
set( ALSA_INCLUDE_DIRS ${ALSA_INCLUDE_DIR} )
|
||||
if(NOT TARGET ALSA::ALSA)
|
||||
add_library(ALSA::ALSA UNKNOWN IMPORTED)
|
||||
set_target_properties(ALSA::ALSA PROPERTIES
|
||||
IMPORTED_LOCATION ${ALSA_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(ALSA_INCLUDE_DIR ALSA_LIBRARY)
|
@ -1,122 +0,0 @@
|
||||
#.rst:
|
||||
# FindBacktrace
|
||||
# -------------
|
||||
#
|
||||
# Find provider for backtrace(3).
|
||||
#
|
||||
# Checks if OS supports backtrace(3) via either libc or custom library.
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ``Backtrace_HEADER``
|
||||
# The header file needed for backtrace(3). Cached.
|
||||
# Could be forcibly set by user.
|
||||
# ``Backtrace_INCLUDE_DIRS``
|
||||
# The include directories needed to use backtrace(3) header.
|
||||
# ``Backtrace_LIBRARIES``
|
||||
# The libraries (linker flags) needed to use backtrace(3), if any.
|
||||
# ``Backtrace_FOUND``
|
||||
# Is set if and only if backtrace(3) support detected.
|
||||
#
|
||||
# The following cache variables are also available to set or use:
|
||||
#
|
||||
# ``Backtrace_LIBRARY``
|
||||
# The external library providing backtrace, if any.
|
||||
# ``Backtrace_INCLUDE_DIR``
|
||||
# The directory holding the backtrace(3) header.
|
||||
#
|
||||
# Typical usage is to generate of header file using configure_file() with the
|
||||
# contents like the following::
|
||||
#
|
||||
# #cmakedefine01 Backtrace_FOUND
|
||||
# #if Backtrace_FOUND
|
||||
# # include <${Backtrace_HEADER}>
|
||||
# #endif
|
||||
#
|
||||
# And then reference that generated header file in actual source.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2013 Vadim Zhukov
|
||||
# Copyright 2000-2016 Kitware, Inc.
|
||||
# Copyright 2000-2011 Insight Software Consortium
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||
# nor the names of their contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
include(CMakePushCheckState)
|
||||
include(CheckSymbolExists)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# List of variables to be provided to find_package_handle_standard_args()
|
||||
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
|
||||
|
||||
if(Backtrace_HEADER)
|
||||
set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
|
||||
else(Backtrace_HEADER)
|
||||
set(_Backtrace_HEADER_TRY "execinfo.h")
|
||||
endif(Backtrace_HEADER)
|
||||
|
||||
find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
|
||||
set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
||||
|
||||
if (NOT DEFINED Backtrace_LIBRARY)
|
||||
# First, check if we already have backtrace(), e.g., in libc
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY})
|
||||
check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
|
||||
cmake_pop_check_state()
|
||||
endif()
|
||||
|
||||
if(_Backtrace_SYM_FOUND)
|
||||
# Avoid repeating the message() call below each time CMake is run.
|
||||
if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY)
|
||||
message(STATUS "backtrace facility detected in default set of libraries")
|
||||
endif()
|
||||
set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries")
|
||||
else()
|
||||
# Check for external library, for non-glibc systems
|
||||
if(Backtrace_INCLUDE_DIR)
|
||||
# OpenBSD has libbacktrace renamed to libexecinfo
|
||||
find_library(Backtrace_LIBRARY "execinfo")
|
||||
elseif() # respect user wishes
|
||||
set(_Backtrace_HEADER_TRY "backtrace.h")
|
||||
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
|
||||
find_library(Backtrace_LIBRARY "backtrace")
|
||||
endif()
|
||||
|
||||
# Prepend list with library path as it's more common practice
|
||||
set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
|
||||
endif()
|
||||
|
||||
set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
|
||||
set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
|
||||
|
||||
find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
|
||||
mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)
|
@ -1,42 +0,0 @@
|
||||
# - Find BlueZ library
|
||||
# This module defines
|
||||
# BlueZ_INCLUDE_DIR
|
||||
# BlueZ_LIBRARIES
|
||||
# BlueZ_FOUND
|
||||
#
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules (BlueZ_PKG QUIET bluez)
|
||||
|
||||
find_path(BlueZ_INCLUDE_DIR NAMES bluetooth/bluetooth.h
|
||||
PATHS
|
||||
${BlueZ_PKG_INCLUDE_DIRS}
|
||||
/usr/include/bluetooth
|
||||
/usr/include
|
||||
/usr/local/include/bluetooth
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(BlueZ_LIBRARIES NAMES bluetooth
|
||||
PATHS
|
||||
${BlueZ_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BlueZ
|
||||
REQUIRED_VARS BlueZ_LIBRARIES BlueZ_INCLUDE_DIR)
|
||||
|
||||
if(BlueZ_FOUND)
|
||||
if(NOT TARGET BlueZ::BlueZ)
|
||||
add_library(BlueZ::BlueZ UNKNOWN IMPORTED)
|
||||
set_target_properties(BlueZ::BlueZ PROPERTIES
|
||||
IMPORTED_LOCATION ${BlueZ_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${BlueZ_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(BlueZ_INCLUDE_DIR BlueZ_LIBRARIES)
|
@ -1,15 +0,0 @@
|
||||
find_path(CUBEB_INCLUDE_DIR cubeb.h PATH_SUFFIXES cubeb)
|
||||
find_library(CUBEB_LIBRARY cubeb)
|
||||
mark_as_advanced(CUBEB_INCLUDE_DIR CUBEB_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CUBEB DEFAULT_MSG
|
||||
CUBEB_INCLUDE_DIR CUBEB_LIBRARY)
|
||||
|
||||
if(CUBEB_FOUND AND NOT TARGET cubeb::cubeb)
|
||||
add_library(cubeb::cubeb UNKNOWN IMPORTED)
|
||||
set_target_properties(cubeb::cubeb PROPERTIES
|
||||
IMPORTED_LOCATION "${CUBEB_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CUBEB_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
@ -1,54 +0,0 @@
|
||||
# from https://raw.githubusercontent.com/WebKit/webkit/master/Source/cmake/FindEGL.cmake
|
||||
# - Try to Find EGL
|
||||
# Once done, this will define
|
||||
#
|
||||
# EGL_FOUND - system has EGL installed.
|
||||
# EGL_INCLUDE_DIRS - directories which contain the EGL headers.
|
||||
# EGL_LIBRARIES - libraries required to link against EGL.
|
||||
# EGL_DEFINITIONS - Compiler switches required for using EGL.
|
||||
#
|
||||
# Copyright (C) 2012 Intel Corporation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(PC_EGL egl)
|
||||
|
||||
if (PC_EGL_FOUND)
|
||||
set(EGL_DEFINITIONS ${PC_EGL_CFLAGS_OTHER})
|
||||
endif ()
|
||||
|
||||
find_path(EGL_INCLUDE_DIRS NAMES EGL/egl.h
|
||||
HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(EGL_NAMES ${EGL_NAMES} egl EGL)
|
||||
find_library(EGL_LIBRARIES NAMES ${EGL_NAMES}
|
||||
HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_INCLUDE_DIRS EGL_LIBRARIES)
|
||||
|
||||
mark_as_advanced(EGL_INCLUDE_DIRS EGL_LIBRARIES)
|
@ -1,165 +0,0 @@
|
||||
# FindFFmpeg
|
||||
# ----------
|
||||
#
|
||||
# Find the native FFmpeg includes and libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# FFmpeg_INCLUDE_<component>: where to find <component>.h
|
||||
# FFmpeg_LIBRARY_<component>: where to find the <component> library
|
||||
# FFmpeg_INCLUDES: aggregate all the include paths
|
||||
# FFmpeg_LIBRARIES: aggregate all the paths to the libraries
|
||||
# FFmpeg_FOUND: True if all components have been found
|
||||
#
|
||||
# This module defines the following targets, which are preferred over variables:
|
||||
#
|
||||
# FFmpeg::<component>: Target to use <component> directly, with include path,
|
||||
# library and dependencies set up. If you are using a static build, you are
|
||||
# responsible for adding any external dependencies (such as zlib, bzlib...).
|
||||
#
|
||||
# <component> can be one of:
|
||||
# avcodec
|
||||
# avdevice
|
||||
# avfilter
|
||||
# avformat
|
||||
# postproc
|
||||
# swresample
|
||||
# swscale
|
||||
#
|
||||
|
||||
set(_FFmpeg_ALL_COMPONENTS
|
||||
avcodec
|
||||
avdevice
|
||||
avfilter
|
||||
avformat
|
||||
avutil
|
||||
postproc
|
||||
swresample
|
||||
swscale
|
||||
)
|
||||
|
||||
set(_FFmpeg_DEPS_avcodec avutil)
|
||||
set(_FFmpeg_DEPS_avdevice avcodec avformat avutil)
|
||||
set(_FFmpeg_DEPS_avfilter avutil)
|
||||
set(_FFmpeg_DEPS_avformat avcodec avutil)
|
||||
set(_FFmpeg_DEPS_postproc avutil)
|
||||
set(_FFmpeg_DEPS_swresample avutil)
|
||||
set(_FFmpeg_DEPS_swscale avutil)
|
||||
|
||||
function(find_ffmpeg LIBNAME)
|
||||
if(DEFINED ENV{FFMPEG_DIR})
|
||||
set(FFMPEG_DIR $ENV{FFMPEG_DIR})
|
||||
endif()
|
||||
|
||||
if(FFMPEG_DIR)
|
||||
list(APPEND INCLUDE_PATHS
|
||||
${FFMPEG_DIR}
|
||||
${FFMPEG_DIR}/ffmpeg
|
||||
${FFMPEG_DIR}/lib${LIBNAME}
|
||||
${FFMPEG_DIR}/include/lib${LIBNAME}
|
||||
${FFMPEG_DIR}/include/ffmpeg
|
||||
${FFMPEG_DIR}/include
|
||||
NO_DEFAULT_PATH
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
list(APPEND LIB_PATHS
|
||||
${FFMPEG_DIR}
|
||||
${FFMPEG_DIR}/lib
|
||||
${FFMPEG_DIR}/lib${LIBNAME}
|
||||
NO_DEFAULT_PATH
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
else()
|
||||
list(APPEND INCLUDE_PATHS
|
||||
/usr/local/include/ffmpeg
|
||||
/usr/local/include/lib${LIBNAME}
|
||||
/usr/include/ffmpeg
|
||||
/usr/include/lib${LIBNAME}
|
||||
/usr/include/ffmpeg/lib${LIBNAME}
|
||||
)
|
||||
|
||||
list(APPEND LIB_PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(FFmpeg_INCLUDE_${LIBNAME} lib${LIBNAME}/${LIBNAME}.h
|
||||
HINTS ${INCLUDE_PATHS}
|
||||
)
|
||||
|
||||
find_library(FFmpeg_LIBRARY_${LIBNAME} ${LIBNAME}
|
||||
HINTS ${LIB_PATHS}
|
||||
)
|
||||
|
||||
if(NOT FFMPEG_DIR AND (NOT FFmpeg_LIBRARY_${LIBNAME} OR NOT FFmpeg_INCLUDE_${LIBNAME}))
|
||||
# Didn't find it in the usual paths, try pkg-config
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(FFmpeg_PKGCONFIG_${LIBNAME} QUIET lib${LIBNAME})
|
||||
|
||||
find_path(FFmpeg_INCLUDE_${LIBNAME} lib${LIBNAME}/${LIBNAME}.h
|
||||
${FFmpeg_PKGCONFIG_${LIBNAME}_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(FFmpeg_LIBRARY_${LIBNAME} ${LIBNAME}
|
||||
${FFmpeg_PKGCONFIG_${LIBNAME}_LIBRARY_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(FFmpeg_INCLUDE_${LIBNAME} AND FFmpeg_LIBRARY_${LIBNAME})
|
||||
set(FFmpeg_INCLUDE_${LIBNAME} "${FFmpeg_INCLUDE_${LIBNAME}}" PARENT_SCOPE)
|
||||
set(FFmpeg_LIBRARY_${LIBNAME} "${FFmpeg_LIBRARY_${LIBNAME}}" PARENT_SCOPE)
|
||||
set(FFmpeg_${c}_FOUND TRUE PARENT_SCOPE)
|
||||
if(NOT FFmpeg_FIND_QUIETLY)
|
||||
message("-- Found ${LIBNAME}: ${FFmpeg_INCLUDE_${LIBNAME}} ${FFmpeg_LIBRARY_${LIBNAME}}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
foreach(c ${_FFmpeg_ALL_COMPONENTS})
|
||||
find_ffmpeg(${c})
|
||||
endforeach()
|
||||
|
||||
foreach(c ${_FFmpeg_ALL_COMPONENTS})
|
||||
if(FFmpeg_${c}_FOUND)
|
||||
list(APPEND FFmpeg_INCLUDES ${FFmpeg_INCLUDE_${c}})
|
||||
list(APPEND FFmpeg_LIBRARIES ${FFmpeg_LIBRARY_${c}})
|
||||
|
||||
add_library(FFmpeg::${c} IMPORTED UNKNOWN)
|
||||
set_target_properties(FFmpeg::${c} PROPERTIES
|
||||
IMPORTED_LOCATION ${FFmpeg_LIBRARY_${c}}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FFmpeg_INCLUDE_${c}}
|
||||
)
|
||||
if(_FFmpeg_DEPS_${c})
|
||||
set(deps)
|
||||
foreach(dep ${_FFmpeg_DEPS_${c}})
|
||||
list(APPEND deps FFmpeg::${dep})
|
||||
endforeach()
|
||||
|
||||
set_target_properties(FFmpeg::${c} PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "${deps}"
|
||||
)
|
||||
unset(deps)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(FFmpeg_INCLUDES)
|
||||
list(REMOVE_DUPLICATES FFmpeg_INCLUDES)
|
||||
endif()
|
||||
|
||||
foreach(c ${FFmpeg_FIND_COMPONENTS})
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS FFmpeg_INCLUDE_${c} FFmpeg_LIBRARY_${c})
|
||||
endforeach()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(FFmpeg
|
||||
REQUIRED_VARS ${_FFmpeg_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
|
||||
foreach(c ${_FFmpeg_ALL_COMPONENTS})
|
||||
unset(_FFmpeg_DEPS_${c})
|
||||
endforeach()
|
||||
unset(_FFmpeg_ALL_COMPONENTS)
|
||||
unset(_FFmpeg_REQUIRED_VARS)
|
@ -1,17 +0,0 @@
|
||||
find_path(HIDAPI_INCLUDE_DIR NAMES hidapi.h PATH_SUFFIXES hidapi)
|
||||
find_library(HIDAPI_LIBRARY NAMES hidapi hidapi-hidraw hidapi-libusb)
|
||||
set(HIDAPI_LIBRARIES ${HIDAPI_LIBRARY})
|
||||
set(HIDAPI_INCLUDE_DIRS ${HIDAPI_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(HIDAPI DEFAULT_MSG HIDAPI_LIBRARY HIDAPI_INCLUDE_DIR)
|
||||
|
||||
if(HIDAPI_FOUND AND NOT TARGET Hidapi::Hidapi)
|
||||
add_library(Hidapi::Hidapi UNKNOWN IMPORTED)
|
||||
set_target_properties(Hidapi::Hidapi PROPERTIES
|
||||
IMPORTED_LOCATION ${HIDAPI_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${HIDAPI_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
|
@ -1,101 +0,0 @@
|
||||
# Based on CMake's FindIconv.cmake
|
||||
# Modified to prefer non-built-in iconv over the built-in one
|
||||
# See https://gitlab.kitware.com/cmake/cmake/-/issues/24695 for details
|
||||
# This file can be deleted once that issue has been closed and the fix has
|
||||
# made it into a satisfactory number of cmake versions. FreeBSD is the only
|
||||
# system known to hit this so far, so "satisfactory" can probably be defined
|
||||
# as "enough that most FreeBSD users have a fixed cmake".
|
||||
|
||||
find_path(Iconv_INCLUDE_DIR
|
||||
NAMES "iconv.h"
|
||||
DOC "iconv include directory")
|
||||
mark_as_advanced(Iconv_INCLUDE_DIR)
|
||||
|
||||
find_library(Iconv_LIBRARY
|
||||
NAMES iconv libiconv
|
||||
NAMES_PER_DIR
|
||||
DOC "iconv library (if not in the C library)")
|
||||
mark_as_advanced(Iconv_LIBRARY)
|
||||
|
||||
# iconv can only be provided in libc on a POSIX system.
|
||||
if(UNIX AND (NOT Iconv_INCLUDE_DIR OR NOT Iconv_LIBRARY))
|
||||
include(CMakePushCheckState)
|
||||
include(CheckCXXSourceCompiles)
|
||||
cmake_push_check_state(RESET)
|
||||
# We always suppress the message here: Otherwise on supported systems
|
||||
# not having iconv in their C library (e.g. those using libiconv)
|
||||
# would always display a confusing "Looking for iconv - not found" message
|
||||
set(CMAKE_FIND_QUIETLY TRUE)
|
||||
# The following code will not work, but it's sufficient to see if it compiles.
|
||||
# Note: libiconv will define the iconv functions as macros, so CheckSymbolExists
|
||||
# will not yield correct results.
|
||||
set(Iconv_IMPLICIT_TEST_CODE
|
||||
"
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main() {
|
||||
char *a, *b;
|
||||
size_t i, j;
|
||||
iconv_t ic;
|
||||
ic = iconv_open(\"to\", \"from\");
|
||||
iconv(ic, &a, &i, &b, &j);
|
||||
iconv_close(ic);
|
||||
}
|
||||
"
|
||||
)
|
||||
check_cxx_source_compiles("${Iconv_IMPLICIT_TEST_CODE}" Iconv_IS_BUILT_IN)
|
||||
cmake_pop_check_state()
|
||||
if(Iconv_IS_BUILT_IN)
|
||||
unset(Iconv_INCLUDE_DIR)
|
||||
unset(Iconv_LIBRARY)
|
||||
endif()
|
||||
else()
|
||||
set(Iconv_IS_BUILT_IN FALSE)
|
||||
endif()
|
||||
|
||||
set(_Iconv_REQUIRED_VARS)
|
||||
if(Iconv_IS_BUILT_IN)
|
||||
set(_Iconv_REQUIRED_VARS _Iconv_IS_BUILT_IN_MSG)
|
||||
set(_Iconv_IS_BUILT_IN_MSG "built in to C library")
|
||||
else()
|
||||
set(_Iconv_REQUIRED_VARS Iconv_LIBRARY Iconv_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# NOTE: glibc's iconv.h does not define _LIBICONV_VERSION
|
||||
if(Iconv_INCLUDE_DIR AND EXISTS "${Iconv_INCLUDE_DIR}/iconv.h")
|
||||
file(STRINGS ${Iconv_INCLUDE_DIR}/iconv.h Iconv_VERSION_DEFINE REGEX "_LIBICONV_VERSION (.*)")
|
||||
|
||||
if(Iconv_VERSION_DEFINE MATCHES "(0x[A-Fa-f0-9]+)")
|
||||
set(Iconv_VERSION_NUMBER "${CMAKE_MATCH_1}")
|
||||
# encoding -> version number: (major<<8) + minor
|
||||
math(EXPR Iconv_VERSION_MAJOR "${Iconv_VERSION_NUMBER} >> 8" OUTPUT_FORMAT HEXADECIMAL)
|
||||
math(EXPR Iconv_VERSION_MINOR "${Iconv_VERSION_NUMBER} - (${Iconv_VERSION_MAJOR} << 8)" OUTPUT_FORMAT HEXADECIMAL)
|
||||
|
||||
math(EXPR Iconv_VERSION_MAJOR "${Iconv_VERSION_MAJOR}" OUTPUT_FORMAT DECIMAL)
|
||||
math(EXPR Iconv_VERSION_MINOR "${Iconv_VERSION_MINOR}" OUTPUT_FORMAT DECIMAL)
|
||||
set(Iconv_VERSION "${Iconv_VERSION_MAJOR}.${Iconv_VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
unset(Iconv_VERSION_DEFINE)
|
||||
unset(Iconv_VERSION_NUMBER)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Iconv
|
||||
REQUIRED_VARS ${_Iconv_REQUIRED_VARS}
|
||||
VERSION_VAR Iconv_VERSION)
|
||||
|
||||
if(Iconv_FOUND)
|
||||
if(Iconv_IS_BUILT_IN)
|
||||
set(Iconv_INCLUDE_DIRS "")
|
||||
set(Iconv_LIBRARIES "")
|
||||
else()
|
||||
set(Iconv_INCLUDE_DIRS "${Iconv_INCLUDE_DIR}")
|
||||
set(Iconv_LIBRARIES "${Iconv_LIBRARY}")
|
||||
endif()
|
||||
if(NOT TARGET Iconv::Iconv)
|
||||
add_library(Iconv::Iconv INTERFACE IMPORTED)
|
||||
set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${Iconv_INCLUDE_DIRS}")
|
||||
set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_LINK_LIBRARIES "${Iconv_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
@ -1,33 +0,0 @@
|
||||
# - Try to find libevdev
|
||||
# Once done this will define
|
||||
# LIBEVDEV_FOUND - System has libevdev
|
||||
# LIBEVDEV_INCLUDE_DIRS - The libevdev include directories
|
||||
# LIBEVDEV_LIBRARIES - The libraries needed to use libevdev
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_LIBEVDEV QUIET libevdev)
|
||||
|
||||
FIND_PATH(
|
||||
LIBEVDEV_INCLUDE_DIR libevdev/libevdev.h
|
||||
HINTS ${PC_LIBEVDEV_INCLUDEDIR} ${PC_LIBEVDEV_INCLUDE_DIRS}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
${LIBEVDEV_PATH_INCLUDES}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
LIBEVDEV_LIBRARY
|
||||
NAMES evdev libevdev
|
||||
HINTS ${PC_LIBEVDEV_LIBDIR} ${PC_LIBEVDEV_LIBRARY_DIRS}
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
${LIBEVDEV_PATH_LIB}
|
||||
)
|
||||
|
||||
set(LIBEVDEV_LIBRARIES ${LIBEVDEV_LIBRARY} )
|
||||
set(LIBEVDEV_INCLUDE_DIRS ${LIBEVDEV_INCLUDE_DIR} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBEVDEV DEFAULT_MSG
|
||||
LIBEVDEV_LIBRARY LIBEVDEV_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBEVDEV_INCLUDE_DIR LIBEVDEV_LIBRARY )
|
@ -1,15 +0,0 @@
|
||||
find_path(LIBMGBA_INCLUDE_DIR mgba/flags.h)
|
||||
find_library(LIBMGBA_LIBRARY mgba)
|
||||
mark_as_advanced(LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBMGBA DEFAULT_MSG
|
||||
LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
|
||||
|
||||
if(LIBMGBA_FOUND AND NOT mGBA::mgba)
|
||||
add_library(mGBA::mgba UNKNOWN IMPORTED)
|
||||
set_target_properties(mGBA::mgba PROPERTIES
|
||||
IMPORTED_LOCATION "${LIBMGBA_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBMGBA_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
@ -1,28 +0,0 @@
|
||||
# - Try to find LIBUDEV
|
||||
# Once done this will define
|
||||
# LIBUDEV_FOUND - System has LIBUDEV
|
||||
# LIBUDEV_INCLUDE_DIRS - The LIBUDEV include directories
|
||||
# LIBUDEV_LIBRARIES - The libraries needed to use LIBUDEV
|
||||
|
||||
FIND_PATH(
|
||||
LIBUDEV_INCLUDE_DIR libudev.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
${LIBUDEV_PATH_INCLUDES}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
LIBUDEV_LIBRARY
|
||||
NAMES udev libudev
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
${LIBUDEV_PATH_LIB}
|
||||
)
|
||||
|
||||
set(LIBUDEV_LIBRARIES ${LIBUDEV_LIBRARY} )
|
||||
set(LIBUDEV_INCLUDE_DIRS ${LIBUDEV_INCLUDE_DIR} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBUDEV DEFAULT_MSG
|
||||
LIBUDEV_LIBRARY LIBUDEV_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBUDEV_INCLUDE_DIR LIBUDEV_LIBRARY )
|
@ -1,15 +0,0 @@
|
||||
find_path(LZO_INCLUDE_DIR lzo/lzo1x.h)
|
||||
find_library(LZO_LIBRARY lzo2)
|
||||
mark_as_advanced(LZO_INCLUDE_DIR LZO_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LZO DEFAULT_MSG
|
||||
LZO_INCLUDE_DIR LZO_LIBRARY)
|
||||
|
||||
if(LZO_FOUND AND NOT TARGET LZO::LZO)
|
||||
add_library(LZO::LZO UNKNOWN IMPORTED)
|
||||
set_target_properties(LZO::LZO PROPERTIES
|
||||
IMPORTED_LOCATION "${LZO_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LZO_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
@ -1,50 +0,0 @@
|
||||
# - Find libusb-1.0 library
|
||||
# This module defines
|
||||
# LIBUSB_INCLUDE_DIR, where to find bluetooth.h
|
||||
# LIBUSB_LIBRARIES, the libraries needed to use libusb-1.0.
|
||||
# LIBUSB_FOUND, If false, do not try to use libusb-1.0.
|
||||
#
|
||||
# Copyright (c) 2009, Michal Cihar, <michal@cihar.com>
|
||||
#
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
if(ANDROID)
|
||||
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
|
||||
message(STATUS "libusb-1.0 not found.")
|
||||
elseif (NOT LIBUSB_FOUND)
|
||||
pkg_check_modules (LIBUSB_PKG libusb-1.0)
|
||||
|
||||
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h
|
||||
PATHS
|
||||
${LIBUSB_PKG_INCLUDE_DIRS}
|
||||
/usr/include/libusb-1.0
|
||||
/usr/include
|
||||
/usr/local/include/libusb-1.0
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb
|
||||
PATHS
|
||||
${LIBUSB_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
||||
set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found")
|
||||
message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}")
|
||||
else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
||||
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
|
||||
message(STATUS "libusb-1.0 not found.")
|
||||
endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
||||
|
||||
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
|
||||
endif ()
|
||||
if(LIBUSB_FOUND AND NOT TARGET LibUSB::LibUSB)
|
||||
add_library(LibUSB::LibUSB UNKNOWN IMPORTED)
|
||||
set_target_properties(LibUSB::LibUSB PROPERTIES
|
||||
IMPORTED_LOCATION "${LIBUSB_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBUSB_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
@ -1,59 +0,0 @@
|
||||
find_path(MBEDTLS_INCLUDE_DIR mbedtls/ssl.h PATH_SUFFIXES mbedtls2)
|
||||
|
||||
find_library(MBEDTLS_LIBRARY mbedtls PATH_SUFFIXES mbedtls2)
|
||||
find_library(MBEDX509_LIBRARY mbedx509 PATH_SUFFIXES mbedtls2)
|
||||
find_library(MBEDCRYPTO_LIBRARY mbedcrypto PATH_SUFFIXES mbedtls2)
|
||||
|
||||
set(MBEDTLS_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR})
|
||||
set(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY})
|
||||
|
||||
if(NOT MBEDTLS_INCLUDE_DIR STREQUAL "MBEDTLS_INCLUDE_DIR-NOTFOUND")
|
||||
if(EXISTS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h)
|
||||
file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h MBEDTLS_VERSION_STR REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*")
|
||||
else()
|
||||
file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h MBEDTLS_VERSION_STR REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*")
|
||||
endif()
|
||||
string(REGEX REPLACE "^#define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"([.0-9]+)\".*" "\\1" MBEDTLS_VERSION ${MBEDTLS_VERSION_STR})
|
||||
endif()
|
||||
|
||||
if(NOT MBEDTLS_INCLUDE_DIR STREQUAL "MBEDTLS_INCLUDE_DIR-NOTFOUND" AND MBEDTLS_VERSION VERSION_GREATER_EQUAL 3)
|
||||
# Once CMake 3.19 is required, we can enable HANDLE_VERSION_RANGE and use that
|
||||
if(MBEDTLS_FIND_REQUIRED)
|
||||
set(type FATAL_ERROR)
|
||||
else()
|
||||
set(type STATUS)
|
||||
endif()
|
||||
if(MBEDTLS_FIND_REQUIRED OR NOT MBEDTLS_FIND_QUIETLY)
|
||||
message(${type} "Could NOT find MBEDTLS: Found unsuitable version \"${MBEDTLS_VERSION}\", but a 2.x version is required (found ${MBEDTLS_INCLUDE_DIR})")
|
||||
endif()
|
||||
set(MBEDTLS_FOUND FALSE)
|
||||
else()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MBEDTLS
|
||||
REQUIRED_VARS MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY
|
||||
VERSION_VAR MBEDTLS_VERSION)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||
|
||||
if(MBEDTLS_FOUND)
|
||||
add_library(MbedTLS::mbedcrypto UNKNOWN IMPORTED)
|
||||
set_target_properties(MbedTLS::mbedcrypto PROPERTIES
|
||||
IMPORTED_LOCATION "${MBEDCRYPTO_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
add_library(MbedTLS::mbedx509 UNKNOWN IMPORTED)
|
||||
set_target_properties(MbedTLS::mbedx509 PROPERTIES
|
||||
IMPORTED_LOCATION "${MBEDX509_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES MbedTLS::mbedcrypto
|
||||
)
|
||||
|
||||
add_library(MbedTLS::mbedtls UNKNOWN IMPORTED)
|
||||
set_target_properties(MbedTLS::mbedtls PROPERTIES
|
||||
IMPORTED_LOCATION "${MBEDTLS_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES MbedTLS::mbedx509
|
||||
)
|
||||
endif()
|
@ -1,30 +0,0 @@
|
||||
# This file only works for MiniUPnPc 1.7 or later (it requires MINIUPNPC_API_VERSION).
|
||||
# TODO Find out if any distribution still ships with /usr/include/miniupnpc.h (i.e. not in a separate directory).
|
||||
|
||||
find_path(MINIUPNPC_INCLUDE_DIR miniupnpc.h PATH_SUFFIXES miniupnpc)
|
||||
find_library(MINIUPNPC_LIBRARY miniupnpc)
|
||||
|
||||
if(MINIUPNPC_INCLUDE_DIR)
|
||||
file(STRINGS "${MINIUPNPC_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_VERSION[\t ]+.*")
|
||||
if(MINIUPNPC_VERSION_STR)
|
||||
string(REGEX REPLACE "^#define[\t ]+MINIUPNPC_VERSION[\t ]+\"([.0-9]+)\"" "\\1" MINIUPNPC_VERSION ${MINIUPNPC_VERSION_STR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MINIUPNPC
|
||||
REQUIRED_VARS MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY
|
||||
VERSION_VAR MINIUPNPC_VERSION
|
||||
)
|
||||
|
||||
set(MINIUPNPC_LIBRARIES ${MINIUPNPC_LIBRARY})
|
||||
set(MINIUPNPC_INCLUDE_DIRS ${MINIUPNPC_INCLUDE_DIR})
|
||||
mark_as_advanced(MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY MINIUPNPC_API_VERSION_STR)
|
||||
|
||||
if (MINIUPNPC_FOUND AND NOT TARGET miniupnpc)
|
||||
add_library(Miniupnpc::miniupnpc UNKNOWN IMPORTED)
|
||||
set_target_properties(Miniupnpc::miniupnpc PROPERTIES
|
||||
IMPORTED_LOCATION ${MINIUPNPC_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${MINIUPNPC_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
@ -1,31 +0,0 @@
|
||||
# - Try to find OProfile
|
||||
# Once done this will define
|
||||
# OPROFILE_FOUND - System has OProfile
|
||||
# OPROFILE_INCLUDE_DIRS - The OProfile include directories
|
||||
# OPROFILE_LIBRARIES - The libraries needed to use OProfile
|
||||
|
||||
find_path(OPROFILE_INCLUDE_DIR opagent.h)
|
||||
|
||||
find_library(OPROFILE_LIBRARY opagent
|
||||
PATH_SUFFIXES oprofile
|
||||
)
|
||||
|
||||
set(OPROFILE_INCLUDE_DIRS ${OPROFILE_INCLUDE_DIR})
|
||||
set(OPROFILE_LIBRARIES ${OPROFILE_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OProfile DEFAULT_MSG
|
||||
OPROFILE_LIBRARY OPROFILE_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if (OPROFILE_FOUND)
|
||||
if (NOT TARGET OProfile::OProfile)
|
||||
add_library(OProfile::OProfile UNKNOWN IMPORTED)
|
||||
set_target_properties(OProfile::OProfile PROPERTIES
|
||||
IMPORTED_LOCATION ${OPROFILE_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OPROFILE_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OPROFILE_INCLUDE_DIR OPROFILE_LIBRARY)
|
@ -1,118 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindOpenAL
|
||||
# ----------
|
||||
#
|
||||
#
|
||||
#
|
||||
# Locate OpenAL This module defines OPENAL_LIBRARY OPENAL_FOUND, if
|
||||
# false, do not try to link to OpenAL OPENAL_INCLUDE_DIR, where to find
|
||||
# the headers
|
||||
#
|
||||
# $OPENALDIR is an environment variable that would correspond to the
|
||||
# ./configure --prefix=$OPENALDIR used in building OpenAL.
|
||||
#
|
||||
# Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
# module.
|
||||
|
||||
# This makes the presumption that you are include al.h like
|
||||
# #include "al.h"
|
||||
# and not
|
||||
# #include <AL/al.h>
|
||||
# The reason for this is that the latter is not entirely portable.
|
||||
# Windows/Creative Labs does not by default put their headers in AL/ and
|
||||
# OS X uses the convention <OpenAL/al.h>.
|
||||
#
|
||||
# For Windows, Creative Labs seems to have added a registry key for their
|
||||
# OpenAL 1.1 installer. I have added that key to the list of search paths,
|
||||
# however, the key looks like it could be a little fragile depending on
|
||||
# if they decide to change the 1.00.0000 number for bug fix releases.
|
||||
# Also, they seem to have laid down groundwork for multiple library platforms
|
||||
# which puts the library in an extra subdirectory. Currently there is only
|
||||
# Win32 and I have hardcoded that here. This may need to be adjusted as
|
||||
# platforms are introduced.
|
||||
# The OpenAL 1.0 installer doesn't seem to have a useful key I can use.
|
||||
# I do not know if the Nvidia OpenAL SDK has a registry key.
|
||||
#
|
||||
# For OS X, remember that OpenAL was added by Apple in 10.4 (Tiger).
|
||||
# To support the framework, I originally wrote special framework detection
|
||||
# code in this module which I have now removed with CMake's introduction
|
||||
# of native support for frameworks.
|
||||
# In addition, OpenAL is open source, and it is possible to compile on Panther.
|
||||
# Furthermore, due to bugs in the initial OpenAL release, and the
|
||||
# transition to OpenAL 1.1, it is common to need to override the built-in
|
||||
# framework.
|
||||
# Per my request, CMake should search for frameworks first in
|
||||
# the following order:
|
||||
# ~/Library/Frameworks/OpenAL.framework/Headers
|
||||
# /Library/Frameworks/OpenAL.framework/Headers
|
||||
# /System/Library/Frameworks/OpenAL.framework/Headers
|
||||
#
|
||||
# On OS X, this will prefer the Framework version (if found) over others.
|
||||
# People will have to manually change the cache values of
|
||||
# OPENAL_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
|
||||
find_path(OPENAL_INCLUDE_DIR al.h
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATH_SUFFIXES include/AL include/OpenAL include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_OpenAL_ARCH_DIR libs/Win64)
|
||||
else()
|
||||
set(_OpenAL_ARCH_DIR libs/Win32)
|
||||
endif()
|
||||
|
||||
find_library(OPENAL_LIBRARY
|
||||
NAMES OpenAL al openal OpenAL32
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs ${_OpenAL_ARCH_DIR}
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
|
||||
)
|
||||
|
||||
unset(_OpenAL_ARCH_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
||||
|
||||
if(OPENAL_FOUND)
|
||||
if(NOT TARGET OpenAL::OpenAL)
|
||||
add_library(OpenAL::OpenAL UNKNOWN IMPORTED)
|
||||
if(OPENAL_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
||||
set(_al_fw "${OPENAL_LIBRARY}/${CMAKE_MATCH_1}")
|
||||
if(EXISTS "${_al_fw}.tbd")
|
||||
set(_al_fw "${_al_fw}.tbd")
|
||||
endif()
|
||||
set_target_properties(OpenAL::OpenAL PROPERTIES
|
||||
IMPORTED_LOCATION "${_al_fw}")
|
||||
else()
|
||||
set_target_properties(OpenAL::OpenAL PROPERTIES
|
||||
IMPORTED_LOCATION "${OPENAL_LIBRARY}")
|
||||
endif()
|
||||
set_target_properties(OpenAL::OpenAL PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
@ -1,30 +0,0 @@
|
||||
# - Try to find OpenSLES
|
||||
# Once done this will define
|
||||
# OPENSLES_FOUND - System has OpenSLES
|
||||
# OPENSLES_INCLUDE_DIR - The OpenSLES include directory
|
||||
# OPENSLES_LIBRARY - The library needed to use OpenSLES
|
||||
# An imported target OpenSLES::OpenSLES is also created, prefer this
|
||||
|
||||
find_path(OPENSLES_INCLUDE_DIR
|
||||
NAMES SLES/OpenSLES.h
|
||||
)
|
||||
|
||||
find_library(OPENSLES_LIBRARY
|
||||
NAMES OpenSLES
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenSLES DEFAULT_MSG
|
||||
OPENSLES_LIBRARY OPENSLES_INCLUDE_DIR)
|
||||
|
||||
if(OpenSLES_FOUND)
|
||||
if(NOT TARGET OpenSLES::OpenSLES)
|
||||
add_library(OpenSLES::OpenSLES UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenSLES::OpenSLES PROPERTIES
|
||||
IMPORTED_LOCATION ${OPENSLES_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OPENSLES_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OPENSLES_INCLUDE_DIR OPENSLES_LIBRARY )
|
@ -1,4 +0,0 @@
|
||||
find_program(POWERSHELL_EXE NAMES powershell)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PowerShell DEFAULT_MSG POWERSHELL_EXE)
|
@ -1,42 +0,0 @@
|
||||
# - Find PulseAudio library
|
||||
# This module defines
|
||||
# PulseAudio_INCLUDE_DIR
|
||||
# PulseAudio_LIBRARIES
|
||||
# PulseAudio_FOUND
|
||||
#
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules (PulseAudio_PKG QUIET libpulse)
|
||||
|
||||
find_path(PulseAudio_INCLUDE_DIR NAMES pulse/pulseaudio.h
|
||||
PATHS
|
||||
${PulseAudio_PKG_INCLUDE_DIRS}
|
||||
/usr/include/pulse
|
||||
/usr/include
|
||||
/usr/local/include/pulse
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(PulseAudio_LIBRARIES NAMES pulse
|
||||
PATHS
|
||||
${PulseAudio_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PulseAudio
|
||||
REQUIRED_VARS PulseAudio_LIBRARIES PulseAudio_INCLUDE_DIR)
|
||||
|
||||
if(PulseAudio_FOUND)
|
||||
if(NOT TARGET PulseAudio::PulseAudio)
|
||||
add_library(PulseAudio::PulseAudio UNKNOWN IMPORTED)
|
||||
set_target_properties(PulseAudio::PulseAudio PROPERTIES
|
||||
IMPORTED_LOCATION ${PulseAudio_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${PulseAudio_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PulseAudio_INCLUDE_DIR PulseAudio_LIBRARIES)
|
@ -1,230 +0,0 @@
|
||||
# This script locates the SFML library
|
||||
# ------------------------------------
|
||||
#
|
||||
# Usage
|
||||
# -----
|
||||
#
|
||||
# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main).
|
||||
# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up linking to nothing.
|
||||
# example:
|
||||
# find_package(SFML COMPONENTS graphics window system) // find the graphics, window and system modules
|
||||
#
|
||||
# You can enforce a specific version, either MAJOR.MINOR or only MAJOR.
|
||||
# If nothing is specified, the version won't be checked (ie. any version will be accepted).
|
||||
# example:
|
||||
# find_package(SFML COMPONENTS ...) // no specific version required
|
||||
# find_package(SFML 2 COMPONENTS ...) // any 2.x version
|
||||
# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater
|
||||
#
|
||||
# By default, the dynamic libraries of SFML will be found. To find the static ones instead,
|
||||
# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...).
|
||||
# In case of static linking, the SFML_STATIC macro will also be defined by this script.
|
||||
# example:
|
||||
# set(SFML_STATIC_LIBRARIES TRUE)
|
||||
# find_package(SFML 2 COMPONENTS network system)
|
||||
#
|
||||
# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless
|
||||
# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details.
|
||||
# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which
|
||||
# are available for both release and debug modes.
|
||||
#
|
||||
# If SFML is not installed in a standard path, you can use the SFML_ROOT CMake (or environment) variable
|
||||
# to tell CMake where SFML is.
|
||||
#
|
||||
# Output
|
||||
# ------
|
||||
#
|
||||
# This script defines the following variables:
|
||||
# - For each specified module XXX (system, window, graphics, network, audio, main):
|
||||
# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found)
|
||||
# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found)
|
||||
# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module (includes both debug and optimized names if necessary)
|
||||
# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found
|
||||
# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules
|
||||
# - SFML_FOUND: true if all the required modules are found
|
||||
# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
|
||||
#
|
||||
# example:
|
||||
# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED)
|
||||
# include_directories(${SFML_INCLUDE_DIR})
|
||||
# add_executable(myapp ...)
|
||||
# target_link_libraries(myapp ${SFML_LIBRARIES})
|
||||
|
||||
# define the SFML_STATIC macro if static build was chosen
|
||||
if(SFML_STATIC_LIBRARIES)
|
||||
add_definitions(-DSFML_STATIC)
|
||||
endif()
|
||||
|
||||
# deduce the libraries suffix from the options
|
||||
set(FIND_SFML_LIB_SUFFIX "")
|
||||
if(SFML_STATIC_LIBRARIES)
|
||||
set(FIND_SFML_LIB_SUFFIX "${FIND_SFML_LIB_SUFFIX}-s")
|
||||
endif()
|
||||
|
||||
# find the SFML include directory
|
||||
find_path(SFML_INCLUDE_DIR SFML/Config.hpp
|
||||
PATH_SUFFIXES include
|
||||
PATHS
|
||||
${SFML_ROOT}
|
||||
$ENV{SFML_ROOT}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/
|
||||
/usr/
|
||||
/sw # Fink
|
||||
/opt/local/ # DarwinPorts
|
||||
/opt/csw/ # Blastwave
|
||||
/opt/)
|
||||
|
||||
# check the version number
|
||||
set(SFML_VERSION_OK TRUE)
|
||||
if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
|
||||
# extract the major and minor version numbers from SFML/Config.hpp
|
||||
# we have to handle framework a little bit differently :
|
||||
if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework")
|
||||
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp")
|
||||
else()
|
||||
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
|
||||
endif()
|
||||
FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
|
||||
STRING(REGEX MATCH "#define SFML_VERSION_MAJOR[ \t]+([0-9]+)" SFML_VERSION_MAJOR_MATCH "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX MATCH "#define SFML_VERSION_MINOR[ \t]+([0-9]+)" SFML_VERSION_MINOR_MATCH "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE "#define SFML_VERSION_MAJOR[ \t]+([0-9]+)" "\\1" SFML_VERSION_MAJOR "${SFML_VERSION_MAJOR_MATCH}")
|
||||
STRING(REGEX REPLACE "#define SFML_VERSION_MINOR[ \t]+([0-9]+)" "\\1" SFML_VERSION_MINOR "${SFML_VERSION_MINOR_MATCH}")
|
||||
math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10 + ${SFML_FIND_VERSION_MINOR}")
|
||||
|
||||
# if we could extract them, compare with the requested version number
|
||||
if (SFML_VERSION_MAJOR)
|
||||
# transform version numbers to an integer
|
||||
math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10 + ${SFML_VERSION_MINOR}")
|
||||
|
||||
# compare them
|
||||
if(SFML_VERSION LESS SFML_REQUESTED_VERSION)
|
||||
set(SFML_VERSION_OK FALSE)
|
||||
endif()
|
||||
else()
|
||||
# SFML version is < 3.0
|
||||
if (SFML_REQUESTED_VERSION GREATER 29)
|
||||
set(SFML_VERSION_OK FALSE)
|
||||
if (SFML_REQUESTED_VERSION GREATER 19)
|
||||
set(SFML_VERSION_MAJOR 1)
|
||||
else()
|
||||
set(SFML_VERSION_MAJOR 2)
|
||||
endif()
|
||||
set(SFML_VERSION_MINOR x)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# find the requested modules
|
||||
set(SFML_FOUND TRUE) # will be set to false if one of the required modules is not found
|
||||
set(FIND_SFML_LIB_PATHS
|
||||
${SFML_ROOT}
|
||||
$ENV{SFML_ROOT}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt)
|
||||
foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
|
||||
string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER)
|
||||
string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER)
|
||||
set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER}${FIND_SFML_LIB_SUFFIX})
|
||||
|
||||
# no suffix for sfml-main, it is always a static library
|
||||
if(FIND_SFML_COMPONENT_LOWER STREQUAL "main")
|
||||
set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER})
|
||||
endif()
|
||||
|
||||
# debug library
|
||||
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
|
||||
NAMES ${FIND_SFML_COMPONENT_NAME}-d
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ${FIND_SFML_LIB_PATHS})
|
||||
|
||||
# release library
|
||||
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
|
||||
NAMES ${FIND_SFML_COMPONENT_NAME}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ${FIND_SFML_LIB_PATHS})
|
||||
|
||||
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
|
||||
# library found
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE)
|
||||
|
||||
# if both are found, set SFML_XXX_LIBRARY to contain both
|
||||
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}
|
||||
optimized ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
|
||||
# if only one debug/release variant is found, set the other to be equal to the found one
|
||||
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
|
||||
# debug and not release
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
|
||||
endif()
|
||||
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG)
|
||||
# release and not debug
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
else()
|
||||
# library not found
|
||||
set(SFML_FOUND FALSE)
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND FALSE)
|
||||
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY "")
|
||||
set(FIND_SFML_MISSING "${FIND_SFML_MISSING} SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY")
|
||||
endif()
|
||||
|
||||
# mark as advanced
|
||||
MARK_AS_ADVANCED(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY
|
||||
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
|
||||
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG)
|
||||
|
||||
# add to the global list of libraries
|
||||
set(SFML_LIBRARIES ${SFML_LIBRARIES} "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}")
|
||||
endforeach()
|
||||
|
||||
# handle errors
|
||||
if(NOT SFML_VERSION_OK)
|
||||
# SFML version not ok
|
||||
set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR})")
|
||||
set(SFML_FOUND FALSE)
|
||||
elseif(NOT SFML_FOUND)
|
||||
# include directory or library not found
|
||||
set(FIND_SFML_ERROR "Could NOT find SFML (missing: ${FIND_SFML_MISSING})")
|
||||
endif()
|
||||
if (NOT SFML_FOUND)
|
||||
if(SFML_FIND_REQUIRED)
|
||||
# fatal error
|
||||
message(FATAL_ERROR ${FIND_SFML_ERROR})
|
||||
elseif(NOT SFML_FIND_QUIETLY)
|
||||
# error but continue
|
||||
message(STATUS "${FIND_SFML_ERROR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# handle success
|
||||
if(SFML_FOUND)
|
||||
message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR} in ${SFML_INCLUDE_DIR}")
|
||||
foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
|
||||
string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER)
|
||||
string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER)
|
||||
if(NOT TARGET sfml-${FIND_SFML_COMPONENT_LOWER})
|
||||
add_library(sfml-${FIND_SFML_COMPONENT_LOWER} UNKNOWN IMPORTED)
|
||||
set_target_properties(sfml-${FIND_SFML_COMPONENT_LOWER} PROPERTIES
|
||||
IMPORTED_LOCATION "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SFML_INCLUDE_DIR}"
|
||||
)
|
||||
if(NOT ${FIND_SFML_COMPONENT_LOWER} STREQUAL system)
|
||||
set_target_properties(sfml-${FIND_SFML_COMPONENT_LOWER} PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES sfml-system
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
@ -1,29 +0,0 @@
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_SYSTEMD QUIET "libsystemd")
|
||||
|
||||
if (PC_SYSTEMD_FOUND)
|
||||
add_definitions(${PC_SYSTEMD_CFLAGS} ${PC_SYSTEMD_CFLAGS_OTHER})
|
||||
endif(PC_SYSTEMD_FOUND)
|
||||
|
||||
find_path(
|
||||
SYSTEMD_INCLUDE_DIRS
|
||||
NAMES systemd/sd-daemon.h
|
||||
HINTS ${PC_SYSTEMD_INCLUDEDIR} ${PC_SYSTEMD_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(
|
||||
SYSTEMD_LIBRARIES
|
||||
NAMES systemd
|
||||
HINTS ${PC_SYSTEMD_LIBDIR} ${PC_SYSTEMD_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
SYSTEMD
|
||||
REQUIRED_VARS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS
|
||||
)
|
||||
mark_as_advanced(
|
||||
SYSTEMD_FOUND
|
||||
SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS
|
||||
)
|
@ -1,14 +0,0 @@
|
||||
find_path(pugixml_INCLUDE_DIRS pugixml.hpp)
|
||||
find_library(pugixml_LIBRARIES NAMES pugixml)
|
||||
mark_as_advanced(pugixml_INCLUDE_DIRS pugixml_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(pugixml REQUIRED_VARS pugixml_LIBRARIES pugixml_INCLUDE_DIRS)
|
||||
|
||||
if(pugixml_FOUND AND NOT TARGET pugixml)
|
||||
add_library(pugixml UNKNOWN IMPORTED)
|
||||
set_target_properties(pugixml PROPERTIES
|
||||
IMPORTED_LOCATION "${pugixml_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${pugixml_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
@ -1,11 +0,0 @@
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# The default MSVC flags for Release and RelWithDebInfo are poorly chosen
|
||||
# (see issue https://gitlab.kitware.com/cmake/cmake/-/issues/20812)
|
||||
# By default, inlining is disabled for RelWithDebInfo.
|
||||
# Manually redefine MSVC flags to match Visual Studio defaults
|
||||
# and ensure that Release builds generate debug info.
|
||||
foreach(f CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELEASE)
|
||||
# optimize, define NDEBUG, generate debug info
|
||||
set(${f} "/O2 /DNDEBUG /Z7")
|
||||
endforeach()
|
||||
endif()
|
@ -1,16 +0,0 @@
|
||||
# from https://stackoverflow.com/a/49216539
|
||||
# The linked answer does some weird preconfiguring by manually splitting the CMAKE_CXX_FLAGS variable and applying it to a target,
|
||||
# but as far as I can tell none of that is necessary, this works just fine as-is.
|
||||
|
||||
#
|
||||
# Removes the specified compile flag from the specified target.
|
||||
# _target - The target to remove the compile flag from
|
||||
# _flag - The compile flag to remove
|
||||
#
|
||||
macro(remove_cxx_flag_from_target _target _flag)
|
||||
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS)
|
||||
if(_target_cxx_flags)
|
||||
list(REMOVE_ITEM _target_cxx_flags ${_flag})
|
||||
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags}")
|
||||
endif()
|
||||
endmacro()
|
@ -1,75 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# for revision info
|
||||
if(GIT_FOUND)
|
||||
# defines DOLPHIN_WC_REVISION
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# defines DOLPHIN_WC_DESCRIBE
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# remove hash (and trailing "-0" if needed) from description
|
||||
string(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}")
|
||||
|
||||
# defines DOLPHIN_WC_BRANCH
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# defines DOLPHIN_WC_COMMITS_AHEAD_MASTER
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD ^master
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_COMMITS_AHEAD_MASTER
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# defines DOLPHIN_WC_TAG
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --exact-match HEAD
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
endif()
|
||||
|
||||
string(TIMESTAMP DOLPHIN_WC_BUILD_DATE "%Y-%m-%d" UTC)
|
||||
|
||||
# version number
|
||||
set(DOLPHIN_VERSION_MAJOR "2506")
|
||||
set(DOLPHIN_VERSION_MINOR "0")
|
||||
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
|
||||
|
||||
# If Dolphin is not built from a Git repository, default the version info to
|
||||
# reasonable values.
|
||||
if(NOT DOLPHIN_WC_REVISION)
|
||||
set(DOLPHIN_WC_DESCRIBE "${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}")
|
||||
set(DOLPHIN_WC_REVISION "${DOLPHIN_WC_DESCRIBE} (no further info)")
|
||||
set(DOLPHIN_WC_BRANCH "master")
|
||||
set(DOLPHIN_WC_COMMITS_AHEAD_MASTER 0)
|
||||
endif()
|
||||
|
||||
# If this is a tag (i.e. a release), then set the current patch version and
|
||||
# the number of commits ahead to zero.
|
||||
if(DOLPHIN_WC_TAG)
|
||||
set(DOLPHIN_VERSION_PATCH "0")
|
||||
set(DOLPHIN_WC_COMMITS_AHEAD_MASTER 0)
|
||||
endif()
|
||||
|
||||
function(configure_source_file path)
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/${path}.in"
|
||||
"${PROJECT_BINARY_DIR}/${path}.tmp"
|
||||
)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PROJECT_BINARY_DIR}/${path}.tmp" "${PROJECT_BINARY_DIR}/${path}")
|
||||
|
||||
file(REMOVE "${PROJECT_BINARY_DIR}/${path}.tmp")
|
||||
endfunction()
|
||||
|
||||
configure_source_file("Source/Core/Common/scmrev.h")
|
||||
|
||||
if(APPLE)
|
||||
configure_source_file("Source/Core/VersionInfo.plist")
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
configure_source_file("Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml")
|
||||
endif()
|
908
CMakeLists.txt
908
CMakeLists.txt
@ -1,908 +0,0 @@
|
||||
########################################
|
||||
# General setup
|
||||
#
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
cmake_policy(SET CMP0079 NEW) # let target_link_libraries() link to a target defined in a different directory
|
||||
cmake_policy(SET CMP0080 OLD) # allow using BundleUtilities at configure time
|
||||
|
||||
if (POLICY CMP0099)
|
||||
cmake_policy(SET CMP0099 NEW) # Propagate INTERFACE_LINK_OPTIONS from private dependencies, used by MacOS framework builds of SDL
|
||||
endif()
|
||||
|
||||
# Weird chicken-and-egg problem: We can't check the compiler before the project() call, but we have to set the policies before it.
|
||||
# So we do this in two steps: Set the policies if they exist, then error out afterwards if we end up being MSVC and they don't exist.
|
||||
if (POLICY CMP0117)
|
||||
cmake_policy(SET CMP0091 NEW) # MSVC runtime library flags are selected by an abstraction.
|
||||
cmake_policy(SET CMP0092 NEW) # MSVC warning flags are not in CMAKE_{C,CXX}_FLAGS by default.
|
||||
cmake_policy(SET CMP0117 NEW) # MSVC RTTI flag will not be added by default.
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0141)
|
||||
cmake_policy(SET CMP0141 NEW) # MSVC debug information format flags are selected by an abstraction.
|
||||
endif()
|
||||
|
||||
# Minimum OS X version.
|
||||
# This is inserted into the Info.plist as well.
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0.0" CACHE STRING "")
|
||||
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/CMake/FlagsOverride.cmake")
|
||||
|
||||
project(dolphin-emu)
|
||||
|
||||
if (MSVC)
|
||||
if (POLICY CMP0117)
|
||||
# cmake is a weird language. You can't do if(not POLICY)
|
||||
else()
|
||||
message(FATAL_ERROR "Please update to CMake 3.20 or higher.")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
|
||||
set(COMPILER ${CMAKE_CXX_COMPILER_ID})
|
||||
if (COMPILER STREQUAL "GNU")
|
||||
set(COMPILER "GCC") # prefer printing GCC instead of GNU
|
||||
endif()
|
||||
|
||||
# Enforce minimum compiler versions that support the c++20 features we use
|
||||
set (GCC_min_version 11)
|
||||
set (Clang_min_version 14)
|
||||
set (AppleClang_min_version 14.0.3)
|
||||
set (min_xcode_version "14.0") # corresponding xcode version for AppleClang_min_version
|
||||
set (MSVC_min_version 14.32)
|
||||
set (min_vs_version "2022 17.2.3") # corresponding Visual Studio version for MSVC_min_version
|
||||
|
||||
message(STATUS "Using ${COMPILER} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
if ("-" STREQUAL "${${COMPILER}_min_version}-")
|
||||
message(WARNING "Unknown compiler ${COMPILER}, assuming it is new enough")
|
||||
else()
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${${COMPILER}_min_version})
|
||||
message(FATAL_ERROR "Requires GCC ${GCC_min_version}, Clang ${Clang_min_version},"
|
||||
" AppleClang ${AppleClang_min_version} (Xcode ${min_xcode_version}),"
|
||||
" or MSVC ${MSVC_min_version} (Visual Studio ${min_vs_version}) or higher")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Name of the Dolphin distributor. If you redistribute Dolphin builds (forks,
|
||||
# unofficial builds) please consider identifying your distribution with a
|
||||
# unique name here.
|
||||
set(DISTRIBUTOR "None" CACHE STRING "Name of the distributor.")
|
||||
|
||||
set(DOLPHIN_DEFAULT_UPDATE_TRACK "" CACHE STRING "Name of the default update track. If empty, disables auto-update.")
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
option(ENABLE_X11 "Enables X11 Support" ON)
|
||||
endif()
|
||||
if(NOT WIN32 AND NOT APPLE AND NOT HAIKU)
|
||||
option(ENABLE_EGL "Enables EGL OpenGL Interface" ON)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
option(ENABLE_CLI_TOOL "Enable dolphin-tool, a CLI-based utility for functions such as managing disc images" ON)
|
||||
endif()
|
||||
|
||||
|
||||
set(USE_SYSTEM_LIBS "AUTO" CACHE STRING "Use system libraries instead of bundled libraries. ON - Always use system and fail if unavailable, OFF - Always use bundled, AUTO - Use system if available, otherwise use bundled. Default is AUTO")
|
||||
if(APPROVED_VENDORED_DEPENDENCIES)
|
||||
message(WARNING "APPROVED_VENDORED_DEPENDENCIES is deprecated. Please migrate to setting USE_SYSTEM_LIBS to ON and setting USE_SYSTEM_<dependency> to either AUTO or OFF to allow bundled libs.")
|
||||
endif()
|
||||
option(USE_UPNP "Enables UPnP port mapping support" ON)
|
||||
option(ENABLE_NOGUI "Enable NoGUI frontend" ON)
|
||||
option(ENABLE_QT "Enable Qt (Default)" ON)
|
||||
option(ENABLE_LTO "Enables Link Time Optimization" OFF)
|
||||
option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF)
|
||||
option(ENABLE_HEADLESS "Enables running Dolphin as a headless variant" OFF)
|
||||
option(ENABLE_ALSA "Enables ALSA sound backend" ON)
|
||||
option(ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON)
|
||||
option(ENABLE_CUBEB "Enables Cubeb sound backend" ON)
|
||||
option(ENABLE_LLVM "Enables LLVM support, for disassembly" ON)
|
||||
option(ENABLE_TESTS "Enables building the unit tests" ON)
|
||||
option(ENABLE_VULKAN "Enables vulkan video backend" ON)
|
||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current game on Discord" ON)
|
||||
option(USE_MGBA "Enables GBA controllers emulation using libmgba" ON)
|
||||
option(ENABLE_AUTOUPDATE "Enables support for automatic updates" ON)
|
||||
option(USE_RETRO_ACHIEVEMENTS "Enables integration with retroachievements.org" ON)
|
||||
|
||||
# Maintainers: if you consider blanket disabling this for your users, please
|
||||
# consider the following points:
|
||||
# * No data is being sent without explicit user approval (pop up box at first
|
||||
# launch).
|
||||
# * The Dolphin team relies on the data in order to understand the behavior
|
||||
# of our software in the wild.
|
||||
option(ENABLE_ANALYTICS "Enables opt-in Analytics collection" ON)
|
||||
|
||||
option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
|
||||
|
||||
option(ENABLE_GPROF "Enable gprof profiling (must be using Debug build)" OFF)
|
||||
option(FASTLOG "Enable all logs" OFF)
|
||||
option(OPROFILING "Enable profiling" OFF)
|
||||
|
||||
# TODO: Add DSPSpy
|
||||
option(DSPTOOL "Build dsptool" OFF)
|
||||
|
||||
# RetroAchievements developer tools require Windows hooks
|
||||
if(WIN32)
|
||||
option(RC_CLIENT_SUPPORTS_RAINTEGRATION "Enables RetroAchievements developer tools" ON)
|
||||
endif()
|
||||
|
||||
# Enable SDL by default on operating systems that aren't Android.
|
||||
if(NOT ANDROID)
|
||||
option(ENABLE_SDL "Enables SDL as a generic controller backend" ON)
|
||||
else()
|
||||
option(ENABLE_SDL "Enables SDL as a generic controller backend" OFF)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
enable_language(OBJC)
|
||||
enable_language(OBJCXX)
|
||||
option(MACOS_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF)
|
||||
option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF)
|
||||
# Enable adhoc code signing by default (otherwise makefile builds on ARM will not work)
|
||||
option(MACOS_CODE_SIGNING "Enable codesigning" ON)
|
||||
option(USE_BUNDLED_MOLTENVK "Build MoltenVK from Externals with Dolphin-specific patches" ON)
|
||||
set(MACOS_CODE_SIGNING_IDENTITY "-" CACHE STRING "The identity used for codesigning.")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
option(ENABLE_VTUNE "Enable Intel VTune integration for JIT code." OFF)
|
||||
|
||||
if(NOT ANDROID)
|
||||
option(ENABLE_HWDB "Enables the udev hardware database" ON)
|
||||
option(ENABLE_EVDEV "Enables the evdev controller backend" ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
# Builds a relocatable binary on Linux.
|
||||
# The Sys folder will need to be copied to the Binaries folder.
|
||||
option(LINUX_LOCAL_DEV "Enable relocatable binary" OFF)
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake
|
||||
)
|
||||
|
||||
# Support functions
|
||||
include(CheckAndAddFlag)
|
||||
include(CheckCCompilerFlag)
|
||||
include(DolphinCompileDefinitions)
|
||||
include(DolphinDisableWarningsMSVC)
|
||||
include(DolphinLibraryTools)
|
||||
include(GNUInstallDirs)
|
||||
include(RemoveCompileFlag)
|
||||
|
||||
# Enable folders for IDE
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Set up paths
|
||||
set(datadir ${CMAKE_INSTALL_FULL_DATADIR}/dolphin-emu CACHE PATH "datadir")
|
||||
add_definitions(-DDATA_DIR="${datadir}/")
|
||||
|
||||
if(CMAKE_SYSROOT)
|
||||
# If we should use a sysroot, tell pkg-config to search for packages in there, not on the host
|
||||
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig")
|
||||
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${CMAKE_SYSROOT}")
|
||||
endif()
|
||||
|
||||
# Set where the binary files will be built. The program will not execute from
|
||||
# here. You must run "make install" to install these to the proper location
|
||||
# as defined above.
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)
|
||||
|
||||
if (WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Binary)
|
||||
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||
string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY /x64)
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY /ARM64)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# setup CCache
|
||||
include(CCache)
|
||||
|
||||
# Architecture detection and arch specific settings
|
||||
message(STATUS "Detected architecture: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
# Detect 64bit or 32bit
|
||||
# CMake doesn't provide a simple way to determine 32bit or 64bit
|
||||
# If we ever support a architecture that is 64bit with 32bit pointers then this'll break
|
||||
# Of course the chances of that are slim(x32?) so who cares
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_ARCH_64 1)
|
||||
add_definitions(-D_ARCH_64=1)
|
||||
else()
|
||||
set(_ARCH_32 1)
|
||||
add_definitions(-D_ARCH_32=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GENERIC)
|
||||
message(STATUS "Warning! Building generic build!")
|
||||
set(_M_GENERIC 1)
|
||||
add_definitions(-D_M_GENERIC=1)
|
||||
elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||
set(_M_X86_64 1)
|
||||
add_definitions(-D_M_X86_64=1)
|
||||
check_and_add_flag(HAVE_SSE2 -msse2)
|
||||
elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
|
||||
set(_M_ARM_64 1)
|
||||
add_definitions(-D_M_ARM_64=1)
|
||||
# CRC instruction set is used in the CRC32 hash function
|
||||
check_and_add_flag(HAVE_ARCH_ARMV8 -march=armv8-a+crc)
|
||||
else()
|
||||
message(FATAL_ERROR "You're building on an unsupported platform: "
|
||||
"'${CMAKE_SYSTEM_PROCESSOR}' with ${CMAKE_SIZEOF_VOID_P}-byte pointers."
|
||||
" Enable generic build if you really want a JIT-less binary.")
|
||||
endif()
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
check_and_add_flag(DIAGNOSTICS_COLOR -fdiagnostics-color)
|
||||
elseif(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
# Only MSBuild needs this, other generators will compile one file at a time
|
||||
add_compile_options("/MP")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
check_and_add_flag(EXCEPTIONS /EHsc)
|
||||
dolphin_compile_definitions(_DEBUG DEBUG_ONLY)
|
||||
|
||||
# Disable RTTI
|
||||
add_compile_options(/GR-)
|
||||
|
||||
# Set warning level 4 (the highest)
|
||||
add_compile_options(/W4)
|
||||
|
||||
# Treat all warnings as errors
|
||||
add_compile_options(/WX)
|
||||
|
||||
# Disable some warnings
|
||||
add_compile_options(
|
||||
/wd4201 # nonstandard extension used : nameless struct/union
|
||||
/wd4127 # conditional expression is constant
|
||||
/wd4100 # 'identifier' : unreferenced formal parameter
|
||||
/wd4200 # InputCommon fix temp.
|
||||
/wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
||||
/wd4121 # 'symbol' : alignment of a member was sensitive to packing
|
||||
/wd4324 # Padding was added at the end of a structure because you specified a __declspec(align) value.
|
||||
/wd4714 # function 'function' marked as __forceinline not inlined
|
||||
/wd4351 # new behavior: elements of array 'array' will be default initialized
|
||||
# TODO: Enable this warning once possible
|
||||
/wd4245 # conversion from 'type1' to 'type2', signed/unsigned mismatch
|
||||
# Currently jits use some annoying code patterns which makes this common
|
||||
)
|
||||
|
||||
# Additional warnings
|
||||
add_compile_options(
|
||||
/w44263 # Non-virtual member function hides base class virtual function
|
||||
/w44265 # Class has virtual functions, but destructor is not virtual
|
||||
/w44946 # Reinterpret cast between related types
|
||||
)
|
||||
|
||||
# All files are encoded as UTF-8
|
||||
add_compile_options(/utf-8)
|
||||
|
||||
# Ignore warnings in external headers
|
||||
add_compile_options(/external:anglebrackets)
|
||||
add_compile_options(/external:W0)
|
||||
add_compile_options(/external:templates-)
|
||||
|
||||
# Request deterministic builds
|
||||
add_compile_options(/experimental:deterministic)
|
||||
add_link_options(/experimental:deterministic)
|
||||
|
||||
# Enable function-level linking
|
||||
add_compile_options(/Gy)
|
||||
# Generate intrinsic functions
|
||||
add_compile_options(/Oi)
|
||||
# Enable buffer security check on Debug, disable otherwise
|
||||
add_compile_options($<IF:$<CONFIG:Debug>,/GS,/GS->)
|
||||
# Remove unreferenced inline functions/data to reduce link time and catch bugs
|
||||
# Note: In msbuild build, this gets set by msbuild by default
|
||||
add_compile_options(/Zc:inline)
|
||||
# Fix various other non-conformant behaviors
|
||||
add_compile_options(/Zc:__cplusplus,enumTypes,externConstexpr,preprocessor,templateScope,throwingNew)
|
||||
# Enforce strict volatile semantics as per ISO C++
|
||||
add_compile_options(/volatile:iso)
|
||||
|
||||
# Use 'precise' floating point model
|
||||
add_compile_options(/fp:precise)
|
||||
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT")
|
||||
# Generate debug data
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /DEBUG")
|
||||
# Eliminate dead code and data
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /OPT:REF /OPT:ICF")
|
||||
else()
|
||||
add_definitions(-D_DEFAULT_SOURCE)
|
||||
|
||||
# gcc uses some optimizations which might break stuff without this flag
|
||||
check_and_add_flag(NO_STRICT_ALIASING -fno-strict-aliasing)
|
||||
check_and_add_flag(NO_EXCEPTIONS -fno-exceptions)
|
||||
|
||||
check_and_add_flag(VISIBILITY_INLINES_HIDDEN -fvisibility-inlines-hidden)
|
||||
check_and_add_flag(VISIBILITY_HIDDEN -fvisibility=hidden)
|
||||
|
||||
check_and_add_flag(FOMIT_FRAME_POINTER -fomit-frame-pointer NO_DEBINFO_ONLY)
|
||||
|
||||
dolphin_compile_definitions(_DEBUG DEBUG_ONLY)
|
||||
check_and_add_flag(GGDB -ggdb DEBUG_ONLY)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# GNU ar: Create thin archive files.
|
||||
# Requires binutils-2.19 or later.
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(NOT MACOS_USE_DEFAULT_SEARCH_PATH)
|
||||
# Hack up the path to prioritize the path to built-in OS libraries to
|
||||
# increase the chance of not depending on a bunch of copies of them
|
||||
# installed by MacPorts, Fink, Homebrew, etc, and ending up copying
|
||||
# them into the bundle. Since we optionally depend on libraries which
|
||||
# are not part of OS X (ffmpeg, etc.), however, don't remove the default
|
||||
# path entirely as was done in a previous version of this file. This is
|
||||
# still kinda evil, since it defeats the user's path settings...
|
||||
# See http://www.cmake.org/cmake/help/v3.0/command/find_program.html
|
||||
list(APPEND CMAKE_PREFIX_PATH "/usr")
|
||||
endif()
|
||||
|
||||
# Prevents Xcode from overriding the -fno-strict-aliasing flag
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO)
|
||||
|
||||
# Specify target CPUs.
|
||||
if(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||
check_and_add_flag(HAVE_MSSSE3 -mssse3)
|
||||
check_and_add_flag(HAVE_ARCH_CORE2 -march=core2)
|
||||
endif()
|
||||
# Linker flags.
|
||||
# Drop unreachable code and data.
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip,-dead_strip_dylibs")
|
||||
|
||||
# Set FMT_EXCEPTIONS = 0, for consistency with -fno-exceptions earlier.
|
||||
# If we set only -fno-exceptions, fmt fails to compile when included from
|
||||
# Objective-C++ because fmt tries try to use throw because __EXCEPTIONS is defined.
|
||||
add_definitions(-DFMT_EXCEPTIONS=0)
|
||||
|
||||
find_library(APPKIT_LIBRARY AppKit)
|
||||
find_library(APPSERV_LIBRARY ApplicationServices)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||
find_library(CORESERV_LIBRARY CoreServices)
|
||||
find_library(FORCEFEEDBACK_LIBRARY ForceFeedback)
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
find_library(IOB_LIBRARY IOBluetooth)
|
||||
find_library(IOK_LIBRARY IOKit)
|
||||
find_library(OPENGL_LIBRARY OpenGL)
|
||||
endif()
|
||||
|
||||
if(ENABLE_LTO)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
add_compile_options(/GL)
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /LTCG")
|
||||
else()
|
||||
check_and_add_flag(LTO -flto)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
set(CMAKE_AR gcc-ar)
|
||||
set(CMAKE_RANLIB gcc-ranlib)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(LINUX_LOCAL_DEV)
|
||||
add_definitions(-DLINUX_LOCAL_DEV)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# BSDs put packages in /usr/local instead of /usr, so we need to
|
||||
# force CMake to look in those directories by default, too.
|
||||
# All commands and submodule commands also need to see these
|
||||
# changes, so just setting them in the project scope via
|
||||
# include_directories and link_directories is not sufficient
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr/local")
|
||||
set(CMAKE_REQUIRED_INCLUDES "/usr/local/include")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
|
||||
# Workaround: the llvm libc++ and versions of clang earlier than 14 have a bug with consteval
|
||||
# so we define FMT_CONSTEVAL to blank to just disable consteval in fmt
|
||||
add_definitions(-DFMT_CONSTEVAL=)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Dolphin requires threads.
|
||||
find_package(Threads)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
|
||||
"Build type (Release/Debug/RelWithDebInfo/MinSizeRel)" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GPROF)
|
||||
check_and_add_flag(HAVE_PG -pg)
|
||||
if(NOT FLAG_C_HAVE_PG)
|
||||
message(FATAL_ERROR "Compiler option -pg is not supported")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
|
||||
endif()
|
||||
|
||||
if(FASTLOG)
|
||||
add_definitions(-DDEBUGFAST)
|
||||
endif()
|
||||
|
||||
if(ENABLE_VTUNE)
|
||||
set(VTUNE_DIR "/opt/intel/vtune_amplifier")
|
||||
add_definitions(-DUSE_VTUNE)
|
||||
include_directories("${VTUNE_DIR}/include")
|
||||
set(VTUNE_LIBRARIES
|
||||
"${VTUNE_DIR}/lib64/libjitprofiling.a"
|
||||
"${VTUNE_DIR}/lib64/libittnotify.a"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
message(STATUS "Building for Android")
|
||||
if(NOT ENABLE_HEADLESS)
|
||||
add_definitions(-DANDROID)
|
||||
if(ENABLE_NOGUI)
|
||||
message(STATUS "Building Android app, disabling NoGUI frontend.")
|
||||
set(ENABLE_NOGUI 0)
|
||||
endif()
|
||||
else()
|
||||
# Lie to cmake a bit. We are cross compiling to Android
|
||||
# but not as a shared library. We want an executable.
|
||||
set(ANDROID 0)
|
||||
endif()
|
||||
set(USE_UPNP 0)
|
||||
set(ENABLE_QT 0)
|
||||
set(USE_DISCORD_PRESENCE 0)
|
||||
|
||||
# We are cross compiling, search only the toolchain for libraries and includes
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HEADLESS)
|
||||
message(STATUS "Enabling Headless! Disabling GUI.")
|
||||
set(ENABLE_QT 0)
|
||||
set(USE_DISCORD_PRESENCE 0)
|
||||
endif()
|
||||
|
||||
# Set file offset size to 64 bits. On modern Unixes, this is typically already the case. Exceptions:
|
||||
#
|
||||
# glibc may default to 32 bits. This can be configured by setting _FILE_OFFSET_BITS=64.
|
||||
#
|
||||
# bionic (Android) defaults to 32 bits for 32-bit ABIs. Here too we can use _FILE_OFFSET_BITS=64,
|
||||
# but only on API 25 and up. Since we're currently supporting older API levels and 32-bit Android
|
||||
# isn't a build configuration we officially support, let's leave this as it is for now.
|
||||
# More details: https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
|
||||
if(NOT ANDROID AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
add_definitions(-D_LARGEFILE_SOURCE)
|
||||
endif()
|
||||
|
||||
########################################
|
||||
# Dependency checking
|
||||
#
|
||||
# TODO: We should have options for dependencies included in the externals to
|
||||
# override autodetection of system libraries and force the usage of the
|
||||
# externals.
|
||||
include(CheckLib)
|
||||
include(CheckCXXSourceRuns)
|
||||
|
||||
set(OpenGL_GL_PREFERENCE GLVND CACHE STRING "Linux-only: if GLVND, use the vendor-neutral GL libraries (default). If LEGACY, use the legacy ones (might be necessary to have optirun/primusrun work)")
|
||||
set_property(CACHE OpenGL_GL_PREFERENCE PROPERTY STRINGS GLVND LEGACY)
|
||||
find_package(OpenGL)
|
||||
if (OPENGL_GL)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_X11)
|
||||
pkg_check_modules(X11 x11 IMPORTED_TARGET)
|
||||
if(X11_FOUND)
|
||||
add_definitions(-DHAVE_X11=1)
|
||||
pkg_check_modules(XRANDR xrandr IMPORTED_TARGET)
|
||||
if(XRANDR_FOUND)
|
||||
add_definitions(-DHAVE_XRANDR=1)
|
||||
endif()
|
||||
pkg_check_modules(X11_INPUT REQUIRED xi>=1.5.0 IMPORTED_TARGET)
|
||||
message(STATUS "X11 support enabled")
|
||||
else()
|
||||
message(WARNING "X11 support enabled but not found. This build will not support X11.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_EGL)
|
||||
find_package(EGL)
|
||||
if(EGL_FOUND)
|
||||
add_definitions(-DHAVE_EGL=1)
|
||||
message(STATUS "EGL OpenGL interface enabled")
|
||||
else()
|
||||
message(WARNING "EGL support enabled but not found. This build will not support EGL.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENCODE_FRAMEDUMPS)
|
||||
if(WIN32)
|
||||
if(_M_X86_64)
|
||||
set(FFMPEG_DIR Externals/FFmpeg-bin/x64)
|
||||
elseif(_M_ARM_64)
|
||||
set(FFMPEG_DIR Externals/FFmpeg-bin/ARM64)
|
||||
endif()
|
||||
endif()
|
||||
find_package(FFmpeg COMPONENTS avcodec avformat avutil swresample swscale)
|
||||
if(FFmpeg_FOUND)
|
||||
if(APPLE)
|
||||
find_library(COREMEDIA_LIBRARY CoreMedia)
|
||||
find_library(VIDEOTOOLBOX_LIBRARY VideoToolbox)
|
||||
find_library(COREVIDEO_LIBRARY CoreVideo)
|
||||
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
endif()
|
||||
message(STATUS "libav/ffmpeg found, enabling AVI frame dumps")
|
||||
add_definitions(-DHAVE_FFMPEG)
|
||||
if(WIN32)
|
||||
# Our prebuilt binaries depend on Bcrypt
|
||||
set_property(TARGET FFmpeg::avutil APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES "Bcrypt.lib"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "libav/ffmpeg not found, disabling AVI frame dumps")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPROFILING)
|
||||
find_package(OProfile)
|
||||
if(OPROFILE_FOUND)
|
||||
message(STATUS "OProfile found, enabling profiling support")
|
||||
add_definitions(-DUSE_OPROFILE=1)
|
||||
else()
|
||||
message(FATAL_ERROR "OProfile not found. Can't build profiling support.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_HWDB)
|
||||
find_package(LIBUDEV REQUIRED)
|
||||
if(LIBUDEV_FOUND)
|
||||
message(STATUS "libudev found, enabling hardware database")
|
||||
add_definitions(-DHAVE_LIBUDEV=1)
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find libudev. Can't build hardware database.\nDisable ENABLE_HWDB if you wish to build without hardware database support")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_EVDEV)
|
||||
find_package(LIBUDEV REQUIRED)
|
||||
find_package(LIBEVDEV REQUIRED)
|
||||
if(LIBUDEV_FOUND AND LIBEVDEV_FOUND)
|
||||
message(STATUS "libevdev/libudev found, enabling evdev controller backend")
|
||||
add_definitions(-DHAVE_LIBUDEV=1)
|
||||
add_definitions(-DHAVE_LIBEVDEV=1)
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find libevdev and/or libudev. Can't build evdev controller backend.\nDisable ENABLE_EVDEV if you wish to build without controller support")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
message(STATUS "Using named pipes as controller inputs")
|
||||
add_definitions(-DUSE_PIPES=1)
|
||||
message(STATUS "Watching game memory for changes")
|
||||
add_definitions(-DUSE_MEMORYWATCHER=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SDL)
|
||||
dolphin_find_optional_system_library(SDL3 Externals/SDL 3.2.0)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ANALYTICS)
|
||||
message(STATUS "Enabling analytics collection (subject to end-user opt-in)")
|
||||
add_definitions(-DUSE_ANALYTICS=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_AUTOUPDATE)
|
||||
message(STATUS "Enabling automatic update support")
|
||||
add_definitions(-DAUTOUPDATE=1)
|
||||
endif()
|
||||
|
||||
########################################
|
||||
# Setup include directories (and make sure they are preferred over the Externals)
|
||||
#
|
||||
include_directories(Source/Core)
|
||||
if(ANDROID)
|
||||
include_directories(Source/Android)
|
||||
endif()
|
||||
|
||||
########################################
|
||||
# Process externals and setup their include directories
|
||||
#
|
||||
# NOTES about adding Externals:
|
||||
# - If an external provides a target, or one can be introduced with find_package, consider using it.
|
||||
# - If a target doesn't exist, consider introducing a target for it with add_library and adding all necessary
|
||||
# includes, definitions, etc, to that target. This way, only libraries that need those attributes simply
|
||||
# need to link that target in, as opposed to them being provided to every library
|
||||
# (which is the case with the directory-based include_directories, add_definitions, etc)
|
||||
#
|
||||
# - make sure to tell cmake to link them statically or dynamically (most
|
||||
# should be linked statically)
|
||||
# - place the CMakeLists.txt in the first-level subdirectory, e.g.
|
||||
# Externals/zlib/CMakeLists.txt (that is: NOT in some Src/ subdirectory)
|
||||
#
|
||||
if (_M_X86_64)
|
||||
add_subdirectory(Externals/Bochs_disasm)
|
||||
endif()
|
||||
add_subdirectory(Externals/cpp-optparse)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(FMT
|
||||
fmt>=10.1 fmt::fmt Externals/fmt
|
||||
)
|
||||
|
||||
add_subdirectory(Externals/imgui)
|
||||
add_subdirectory(Externals/implot)
|
||||
add_subdirectory(Externals/glslang)
|
||||
# SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12
|
||||
# video backends, and on Apple devices for the Metal video backend.
|
||||
if(WIN32 OR APPLE)
|
||||
add_subdirectory(Externals/spirv_cross)
|
||||
endif()
|
||||
add_subdirectory(Externals/tinygltf)
|
||||
|
||||
if(ENABLE_VULKAN)
|
||||
add_definitions(-DHAS_VULKAN)
|
||||
|
||||
if(APPLE AND USE_BUNDLED_MOLTENVK)
|
||||
add_subdirectory(Externals/MoltenVK)
|
||||
endif()
|
||||
|
||||
|
||||
if (ANDROID AND _M_ARM_64)
|
||||
add_subdirectory(Externals/libadrenotools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 OR (NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")))
|
||||
# OpenGL is available on all platforms except windows-arm64
|
||||
add_definitions(-DHAS_OPENGL)
|
||||
endif()
|
||||
|
||||
dolphin_find_optional_system_library(pugixml Externals/pugixml)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(ENET libenet>=1.3.18 enet::enet Externals/enet)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(xxhash libxxhash>=0.8.2 xxhash::xxhash Externals/xxhash)
|
||||
|
||||
dolphin_find_optional_system_library(BZip2 Externals/bzip2)
|
||||
|
||||
dolphin_find_optional_system_library(LibLZMA Externals/liblzma)
|
||||
# Imported target added in CMake 3.14
|
||||
dolphin_make_imported_target_if_missing(LibLZMA::LibLZMA LIBLZMA)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(ZSTD libzstd>=1.4.0 zstd::zstd Externals/zstd)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(ZLIB zlib>=1.3.1 ZLIB::ZLIB Externals/zlib-ng)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(minizip-ng
|
||||
"minizip-ng>=4.0.4" minizip-ng::minizip-ng Externals/minizip-ng
|
||||
)
|
||||
|
||||
dolphin_find_optional_system_library(LZO Externals/LZO)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(lz4 liblz4>=1.8 LZ4::LZ4 Externals/lz4)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(SPNG spng spng::spng Externals/libspng)
|
||||
|
||||
# Using static FreeSurround from Externals
|
||||
# There is no system FreeSurround library.
|
||||
message(STATUS "Using static FreeSurround from Externals")
|
||||
add_subdirectory(Externals/FreeSurround)
|
||||
|
||||
if (APPLE OR WIN32)
|
||||
message(STATUS "Using ed25519 from Externals")
|
||||
add_subdirectory(Externals/ed25519)
|
||||
include_directories(Externals/ed25519)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CUBEB)
|
||||
dolphin_find_optional_system_library(CUBEB Externals/cubeb)
|
||||
add_definitions(-DHAVE_CUBEB)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
dolphin_find_optional_system_library_pkgconfig(
|
||||
LibUSB libusb-1.0 LibUSB::LibUSB Externals/libusb
|
||||
)
|
||||
add_definitions(-D__LIBUSB__)
|
||||
endif()
|
||||
|
||||
dolphin_find_optional_system_library(SFML Externals/SFML 3.0 COMPONENTS Network System)
|
||||
|
||||
if(USE_UPNP)
|
||||
dolphin_find_optional_system_library(MINIUPNPC Externals/miniupnpc 1.6)
|
||||
add_definitions(-DUSE_UPNP)
|
||||
endif()
|
||||
|
||||
dolphin_find_optional_system_library(MBEDTLS Externals/mbedtls 2.28)
|
||||
|
||||
dolphin_find_optional_system_library(CURL Externals/curl)
|
||||
|
||||
if(NOT ANDROID)
|
||||
dolphin_find_optional_system_library(Iconv Externals/libiconv-1.14)
|
||||
else()
|
||||
message(STATUS "Using static iconv from Externals")
|
||||
add_subdirectory(Externals/libiconv-1.14 EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
dolphin_find_optional_system_library(HIDAPI Externals/hidapi)
|
||||
endif()
|
||||
|
||||
if(USE_DISCORD_PRESENCE)
|
||||
message(STATUS "Using static DiscordRPC from Externals")
|
||||
add_subdirectory(Externals/discord-rpc EXCLUDE_FROM_ALL)
|
||||
include_directories(Externals/discord-rpc/include)
|
||||
endif()
|
||||
|
||||
if(NOT ENABLE_QT)
|
||||
set(USE_MGBA 0)
|
||||
endif()
|
||||
if(USE_MGBA)
|
||||
dolphin_find_optional_system_library(LIBMGBA Externals/mGBA)
|
||||
endif()
|
||||
|
||||
find_package(SYSTEMD)
|
||||
if(SYSTEMD_FOUND)
|
||||
message(STATUS "libsystemd found, enabling traversal server watchdog support")
|
||||
add_definitions(-DHAVE_LIBSYSTEMD)
|
||||
else()
|
||||
message(STATUS "libsystemd not found, disabling traversal server watchdog support")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
include_directories(Externals/WIL/include)
|
||||
include_directories(Externals/OpenAL/include)
|
||||
endif()
|
||||
|
||||
include_directories(Externals/picojson)
|
||||
|
||||
add_subdirectory(Externals/expr)
|
||||
|
||||
add_subdirectory(Externals/rangeset)
|
||||
|
||||
add_subdirectory(Externals/FatFs)
|
||||
|
||||
if (USE_RETRO_ACHIEVEMENTS)
|
||||
add_subdirectory(Externals/rcheevos)
|
||||
endif()
|
||||
|
||||
add_subdirectory(Externals/watcher)
|
||||
|
||||
########################################
|
||||
# Pre-build events: Define configuration variables and write SCM info header
|
||||
#
|
||||
|
||||
# Remove in-tree revision information generated by Visual Studio
|
||||
# This is because the compiler will check in-tree first and use this, even if it is outdated
|
||||
file(REMOVE "${PROJECT_SOURCE_DIR}/Source/Core/Common/scmrev.h")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common)
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h)
|
||||
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core)
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/VersionInfo.plist)
|
||||
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/VersionInfo.plist)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Flatpak)
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml)
|
||||
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
if(NOT GIT_FOUND)
|
||||
set(GIT_EXECUTABLE "")
|
||||
endif()
|
||||
add_custom_target(
|
||||
dolphin_scmrev
|
||||
${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} -DDISTRIBUTOR=${DISTRIBUTOR} -DDOLPHIN_DEFAULT_UPDATE_TRACK=${DOLPHIN_DEFAULT_UPDATE_TRACK} -DGIT_FOUND=${GIT_FOUND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DDOLPHIN_WC_REVISION=${DOLPHIN_WC_REVISION} -DDOLPHIN_WC_DESCRIBE=${DOLPHIN_WC_DESCRIBE} -DDOLPHIN_WC_BRANCH=${DOLPHIN_WC_BRANCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/ScmRevGen.cmake
|
||||
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# This is here so #include "Common/scmrev.h" finds the generated header.
|
||||
include_directories("${PROJECT_BINARY_DIR}/Source/Core")
|
||||
|
||||
########################################
|
||||
# Unit testing.
|
||||
#
|
||||
if(ENABLE_TESTS)
|
||||
dolphin_find_optional_system_library_pkgconfig(GTEST
|
||||
gtest gtest::gtest Externals/gtest
|
||||
)
|
||||
# dolphin_find_optional_system_library_pkgconfig() doesn't add an alias if it
|
||||
# uses the bundled libraries, so we add one ourselves.
|
||||
if (NOT TARGET gtest::gtest)
|
||||
add_library(gtest::gtest ALIAS gtest)
|
||||
endif()
|
||||
# Force gtest to link the C runtime dynamically on Windows in order to avoid
|
||||
# runtime mismatches.
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
else()
|
||||
message(STATUS "Unit tests are disabled")
|
||||
endif()
|
||||
|
||||
########################################
|
||||
# Process Dolphin source now that all setup is complete
|
||||
#
|
||||
add_subdirectory(Source)
|
||||
|
||||
########################################
|
||||
# Install shared data files
|
||||
#
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN)
|
||||
endif()
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD|Darwin")
|
||||
install(FILES Data/license.txt DESTINATION ${datadir})
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD")
|
||||
# Install the application icon and menu item
|
||||
install(FILES Data/dolphin-emu.svg
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps)
|
||||
install(FILES Data/dolphin-emu.png
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps)
|
||||
install(FILES Data/dolphin-emu.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
# Install manpages
|
||||
install(FILES Data/dolphin-emu.6
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
|
||||
install(FILES Data/dolphin-emu-nogui.6
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
|
||||
endif()
|
||||
|
||||
# packaging information
|
||||
set(CPACK_PACKAGE_NAME "dolphin-emu")
|
||||
set(CPACK_PACKAGE_VENDOR "Dolphin Team")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/Data/cpack_package_description.txt)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A GameCube and Wii emulator")
|
||||
|
||||
set(CPACK_RPM_PACKAGE_GROUP System/Emulators/Other)
|
||||
set(CPACK_RPM_PACKAGE_LICENSE GPL-2.0)
|
||||
# TODO: CPACK_RESOURCE_FILE_README
|
||||
# TODO: CPACK_RESOURCE_FILE_WELCOME
|
||||
# TODO: CPACK_PACKAGE_ICON
|
||||
# TODO: CPACK_NSIS_*
|
||||
# TODO: Use CPack components for DSPSpy, etc => cpack_add_component
|
||||
|
||||
# Debian Specific. Install dpkg-dev for automatic deps generation
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "Games")
|
||||
|
||||
set(CPACK_SET_DESTDIR ON)
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP")
|
||||
set(CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~;\\\\.swp;/\\\\.git")
|
||||
list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_BINARY_DIR}")
|
||||
|
||||
# CPack must be included after the CPACK_* variables are set in order for those
|
||||
# variables to take effect.
|
||||
Include(CPack)
|
@ -1,64 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Release",
|
||||
"configurationType": "Release",
|
||||
"generator": "Ninja",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildCommandArgs": "",
|
||||
"buildRoot": "${workspaceRoot}\\Build\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"variables": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug",
|
||||
"configurationType": "Debug",
|
||||
"generator": "Ninja",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildCommandArgs": "",
|
||||
"buildRoot": "${workspaceRoot}\\Build\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"variables": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Release (arm64)",
|
||||
"configurationType": "Release",
|
||||
"generator": "Ninja",
|
||||
"inheritEnvironments": [ "msvc_arm64_x64" ],
|
||||
"buildCommandArgs": "",
|
||||
"buildRoot": "${workspaceRoot}\\Build\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"variables": [
|
||||
{
|
||||
"name": "CMAKE_SYSTEM_NAME",
|
||||
"value": "Windows"
|
||||
},
|
||||
{
|
||||
"name": "CMAKE_SYSTEM_PROCESSOR",
|
||||
"value": "aarch64"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug (arm64)",
|
||||
"configurationType": "Debug",
|
||||
"generator": "Ninja",
|
||||
"inheritEnvironments": [ "msvc_arm64_x64" ],
|
||||
"buildCommandArgs": "",
|
||||
"buildRoot": "${workspaceRoot}\\Build\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"variables": [
|
||||
{
|
||||
"name": "CMAKE_SYSTEM_NAME",
|
||||
"value": "Windows"
|
||||
},
|
||||
{
|
||||
"name": "CMAKE_SYSTEM_PROCESSOR",
|
||||
"value": "aarch64"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,119 +0,0 @@
|
||||
# Dolphin Emulator Code of Conduct
|
||||
|
||||
Like many Open Source projects and the greater FLOSS community, Dolphin is a
|
||||
collaborative open source community comprised of a diverse group of
|
||||
contributors and users from around the globe. We find the contributions,
|
||||
collaborations, and mentorships within our community to be the essential
|
||||
lifeblood of our project and appreciate the efforts of those who participate to
|
||||
nurture and grow those, and all other aspects of our community.
|
||||
|
||||
However, when a large and sufficiently diverse group of people work together,
|
||||
there are often cultural, communication, and compatibility issues. In order to
|
||||
minimize conflict, and provide a framework for resolution, we have a brief code
|
||||
of conduct that we ask all participants in the Dolphin community adhere to.
|
||||
These rules should apply to everyone, regardless of their status within the
|
||||
community, and anyone can serve to remind, or ask the project leads to help
|
||||
resolve issues.
|
||||
|
||||
No list is ever exhaustive, so we encourage members of the Dolphin community to
|
||||
adhere to the spirit, rather than the letter, of this code, as that is how it
|
||||
will be enforced. Places where this code may be particularly applicable are
|
||||
GitHub issues and pull requests, bug tracker comments, IRC, Discord, forums,
|
||||
Twitter discussions broadly directed at or between members of the community,
|
||||
and other direct interactions within the community. Any violations, especially
|
||||
continued or flagrant offenses, may affect an individual’s (or organization’s)
|
||||
ability to participate within the Dolphin community.
|
||||
|
||||
If you feel that someone is in violation of the code of conduct, whether in
|
||||
letter or in spirit, we request that you email as detailed a description as
|
||||
possible of the offense and offending party/parties to
|
||||
[conduct@dolphin-emu.org](mailto:conduct@dolphin-emu.org). If you have
|
||||
questions, concerns, or any other inquiries please feel free to contact the
|
||||
project leads.
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Be friendly and patient.** We were all new or suffered from a lack of
|
||||
knowledge at one point in time. Please try to remember what it felt like to
|
||||
be on that end, and treat people accordingly.
|
||||
|
||||
2. **Be welcoming.** We strive to be a community that welcomes and supports
|
||||
people of all backgrounds and identities. This includes, but is not limited
|
||||
to members of any race, ethnicity, culture, national origin, colour,
|
||||
immigration status, social and economic class, educational level, sex,
|
||||
sexual orientation, gender identity and expression, age, size, family
|
||||
status, political belief, religion, and mental and physical ability.
|
||||
|
||||
3. **Be helpful.** By helping others to learn our entire ecosystem is enriched.
|
||||
We encourage members of the Dolphin community to mentor each other and help
|
||||
to raise the general level of knowledge in the community whenever possible.
|
||||
|
||||
4. **Be considerate.** Your work will be used by other people, and you in turn
|
||||
will depend on the work of others. Any decision you take will affect users
|
||||
and colleagues, and you should take those consequences into account when
|
||||
making decisions. Remember that we’re a world-wide community, so you might
|
||||
not be communicating in someone else’s primary language.
|
||||
|
||||
5. **Be respectful.** Not all of us will agree all the time, but disagreement
|
||||
is no excuse for poor behavior and poor manners. We might all experience
|
||||
some frustration now and then, but we cannot allow that frustration to turn
|
||||
into a personal attack. It’s important to remember that a community where
|
||||
people feel uncomfortable or threatened is not a productive one. Members of
|
||||
the Dolphin community should be respectful when dealing with other members
|
||||
as well as with people outside the Dolphin community.
|
||||
|
||||
6. **Be careful in the words that you choose.** We are a community of
|
||||
professionals, and we conduct ourselves professionally. Be kind to others.
|
||||
Do not insult or put down other participants. Harassment and other
|
||||
exclusionary behavior aren’t acceptable. This includes, but is not limited
|
||||
to:
|
||||
|
||||
- Violent threats or language directed against another person.
|
||||
- Discriminatory jokes and language.
|
||||
- Posting sexually explicit or violent material.
|
||||
- Posting (or threatening to post) other people’s personally identifying
|
||||
information (“doxing”), regardless of whether it is publicly available.
|
||||
- Personal insults, especially those using racist, sexist, or otherwise
|
||||
discriminatory terms.
|
||||
- Deliberately referring to others by names or pronouns counter to their
|
||||
identity.
|
||||
- Unwelcome sexual attention.
|
||||
- Advocating for, or encouraging, any of the above behavior.
|
||||
- Repeated harassment of others. In general, if someone asks you to stop,
|
||||
then stop.
|
||||
|
||||
7. **When we disagree, try to understand why.** Disagreements, both social and
|
||||
technical, happen all the time and Dolphin is no exception. It is important
|
||||
that we resolve disagreements and differing views constructively. Remember
|
||||
that we’re different. The strength of Dolphin comes from its varied
|
||||
community, people from a wide range of backgrounds. Different people have
|
||||
different perspectives on issues. Being unable to understand why someone
|
||||
holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is
|
||||
human to err and blaming each other doesn’t get us anywhere. Instead, focus
|
||||
on helping to resolve issues and learning from mistakes.
|
||||
|
||||
## Consequences
|
||||
|
||||
Except in flagrant or otherwise egregious cases, the first infraction will
|
||||
result in a verbal warning. Everyone slips up or acts out of frustration at
|
||||
times, we just ask that you work to not repeat the behavior. Continued
|
||||
infractions will be dealt with on a case-by-case basis, and could lead to
|
||||
actions including:
|
||||
|
||||
- Temporary suspension from one or all avenues of Dolphin community
|
||||
participation. This includes, but is not limited to, IRC, Discord, GitHub,
|
||||
Redmine, and the Dolphin Forums.
|
||||
- Permanent suspension from participating in the Dolphin community.
|
||||
|
||||
Moderators should generally assume good intent when evaluating infractions, but
|
||||
should also keep in mind that good intent does not override the Code of Conduct
|
||||
rules.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
This text is adapted from the [Asahi Linux Code of
|
||||
Conduct](https://asahilinux.org/code-of-conduct/), itself derived from the
|
||||
[Ceph Code of Conduct](https://ceph.io/community/code-of-conduct/), and the
|
||||
[Django Project Code of Conduct](https://www.djangoproject.com/conduct/). Feel
|
||||
free to reuse under the terms of the [CC-BY-SA 4.0
|
||||
license](https://creativecommons.org/licenses/by-sa/4.0/).
|
10
COPYING
10
COPYING
@ -1,10 +0,0 @@
|
||||
Most of Dolphin's original source code is licensed under GPLv2+. Part of the
|
||||
source code distributed in this repository is derived from other projects and
|
||||
may have stronger or weaker licensing requirement. Overall, in aggregate, the
|
||||
entirety of this repository is compatible with the GPLv3 license.
|
||||
|
||||
Per-file licensing information is provided via SPDX tags [1]. The licenses
|
||||
referenced in these tags can be found in the LICENSES/ directory within this
|
||||
source repository.
|
||||
|
||||
[1] https://spdx.dev/
|
302
Contributing.md
302
Contributing.md
@ -1,302 +0,0 @@
|
||||
# <a name="main-section-overview"></a>Dolphin Coding Style & Legal Requirements
|
||||
|
||||
- [Legal](#legal)
|
||||
- [Coding style introduction](#introduction)
|
||||
- [C++ coding style and formatting](#cpp-coding-style-and-formatting)
|
||||
- [C++ code-specific guidelines](#cpp-code-specific-guidelines)
|
||||
- [Android](#android)
|
||||
- [Help](#help)
|
||||
|
||||
# <a name="legal"></a>Legal
|
||||
|
||||
Summary:
|
||||
|
||||
- [Trade secrets](#trade-secrets)
|
||||
- [Code licensing](#code-licensing)
|
||||
|
||||
## <a name="trade-secrets"></a>Trade secrets
|
||||
|
||||
Following all relevant laws is of utmost importance for an emulation project like Dolphin.
|
||||
|
||||
If you know any confidential information related to the GameCube, Wii, or Triforce, either because you signed a non-disclosure agreement or because you looked at leaked materials, we ask that you don't contribute code to Dolphin **at all**. While accepting code from contributors who know confidential information is legal if the code is unrelated to the confidential information, we refuse to accept code from such contributors because it greatly increases our review burden and increases the legal risk we take.
|
||||
|
||||
Also, this probably goes without saying, but piracy is strictly forbidden both on GitHub and in all other Dolphin channels.
|
||||
|
||||
## <a name="code-licensing"></a>Code licensing
|
||||
|
||||
If you make any contributions to Dolphin after December 1st, 2014, you are agreeing that any code you have contributed will be licensed under the GNU GPL version 2 (or any later version).
|
||||
|
||||
# <a name="introduction"></a>Coding style introduction
|
||||
|
||||
Summary:
|
||||
|
||||
- [Aims](#intro-aims)
|
||||
- [Checking and fixing formatting issues](#intro-formatting-issues)
|
||||
|
||||
## <a name="intro-aims"></a>Aims
|
||||
|
||||
This guide is for developers who wish to contribute to the Dolphin codebase. It details how to properly style and format code for this project. This guide also offers suggestions on specific functions and other elements that may be used in code.
|
||||
|
||||
Following this guide and formatting your code as detailed will likely get your pull request merged much faster than if you don't (assuming the code itself has no mistakes).
|
||||
|
||||
This project uses clang-format 19.1 to check for common style issues. In case of conflicts between this guide and clang-format rules, the latter should be followed instead of this guide.
|
||||
|
||||
## <a name="intro-formatting-issues"></a>Checking and fixing formatting issues
|
||||
|
||||
Windows users need to be careful about line endings. Windows users should configure git to checkout UNIX-style line endings to keep clang-format simple.
|
||||
|
||||
In most cases, clang-format can and **should** be used to automatically reformat code and solve most formatting issues.
|
||||
|
||||
- To run clang-format on all staged files:
|
||||
```
|
||||
git diff --cached --name-only | grep -E '[.](cpp|h|mm)$' | xargs -I {} clang-format -i {}
|
||||
```
|
||||
|
||||
- Formatting issues can be checked for before committing with a lint script that is included with the codebase. To enable it as a pre-commit hook (assuming you are in the repository root):
|
||||
```
|
||||
ln -s ../../Tools/lint.sh .git/hooks/pre-commit
|
||||
```
|
||||
|
||||
- Alternatively, a custom git filter driver can be used to automatically and transparently reformat any changes:
|
||||
```
|
||||
git config filter.clang_format.smudge 'cat'
|
||||
git config filter.clang_format.clean 'clang-format %f'
|
||||
echo '/Source/Core/**/*.cpp filter=clang_format' >> .git/info/attributes
|
||||
echo '/Source/Core/**/*.h filter=clang_format' >> .git/info/attributes
|
||||
echo '/Source/Core/**/*.mm filter=clang_format' >> .git/info/attributes
|
||||
```
|
||||
|
||||
- Visual Studio supports automatically formatting the current document according to the clang-format configuration by pressing <kbd>Control</kbd>+<kbd>K</kbd> followed by <kbd>Control</kbd>+<kbd>D</kbd> (or selecting Edit → Advanced → Format Document). This can be used without separately installing clang-format.
|
||||
|
||||
# <a name="cpp-coding-style-and-formatting"></a>C++ coding style and formatting
|
||||
|
||||
Summary:
|
||||
|
||||
- [General](#cpp-style-general)
|
||||
- [Naming](#cpp-style-naming)
|
||||
- [Conditionals](#cpp-style-conditionals)
|
||||
- [Classes and structs](#cpp-style-classes-and-structs)
|
||||
|
||||
## <a name="cpp-style-general"></a>General
|
||||
- Try to limit lines of code to a maximum of 100 characters.
|
||||
- Note that this does not mean you should try and use all 100 characters every time you have the chance. Typically with well formatted code, you normally shouldn't hit a line count of anything over 80 or 90 characters.
|
||||
- The indentation style we use is 2 spaces per level.
|
||||
- The opening brace for namespaces, classes, functions, enums, structs, unions, conditionals, and loops go on the next line.
|
||||
- With array initializer lists and lambda expressions it is OK to keep the brace on the same line.
|
||||
- References and pointers have the ampersand or asterisk against the type name, not the variable name. Example: `int* var`, not `int *var`.
|
||||
- Don't use multi-line comments (`/* Comment text */`), use single-line comments (`// Comment text`) instead.
|
||||
- Don't collapse single line conditional or loop bodies onto the same line as its header. Put it on the next line.
|
||||
- Yes:
|
||||
|
||||
```c++
|
||||
if (condition)
|
||||
return 0;
|
||||
|
||||
while (var != 0)
|
||||
var--;
|
||||
```
|
||||
- No:
|
||||
|
||||
```c++
|
||||
if (condition) return 0;
|
||||
|
||||
while (var != 0) var--;
|
||||
```
|
||||
|
||||
## <a name="cpp-style-naming"></a>Naming
|
||||
- All class, enum, function, and struct names should be in upper CamelCase. If the name contains an abbreviation uppercase it.
|
||||
- `class SomeClassName`
|
||||
- `enum IPCCommandType`
|
||||
- All compile time constants should be fully uppercased. With constants that have more than one word in them, use an underscore to separate them.
|
||||
- `constexpr double PI = 3.14159;`
|
||||
- `constexpr int MAX_PATH = 260;`
|
||||
- All variables should be lowercase with underscores separating the individual words in the name.
|
||||
- `int this_variable_name;`
|
||||
- Please do not use [Hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation) prefixes with variables. The only exceptions to this are the variable prefixes below.
|
||||
- Global variables – `g_`
|
||||
- Class variables – `m_`
|
||||
- Static variables – `s_`
|
||||
|
||||
## <a name="cpp-style-conditionals"></a>Conditionals
|
||||
- Do not leave `else` or `else if` conditions dangling unless the `if` condition lacks braces.
|
||||
- Yes:
|
||||
|
||||
```c++
|
||||
if (condition)
|
||||
{
|
||||
// code
|
||||
}
|
||||
else
|
||||
{
|
||||
// code
|
||||
}
|
||||
```
|
||||
- Acceptable:
|
||||
|
||||
```c++
|
||||
if (condition)
|
||||
// code line
|
||||
else
|
||||
// code line
|
||||
```
|
||||
- No:
|
||||
|
||||
```c++
|
||||
if (condition)
|
||||
{
|
||||
// code
|
||||
}
|
||||
else
|
||||
// code line
|
||||
```
|
||||
|
||||
|
||||
## <a name="cpp-style-classes-and-structs"></a>Classes and structs
|
||||
- If making a [POD](https://en.wikipedia.org/wiki/Passive_data_structure) type, use a `struct` for this. Use a `class` otherwise.
|
||||
- Class layout should be in the order, `public`, `protected`, and then `private`.
|
||||
- If one or more of these sections are not needed, then simply don't include them.
|
||||
- For each of the above specified access levels, the contents of each should follow this given order: constructor, destructor, operator overloads, functions, then variables.
|
||||
- When defining the variables, define `static` variables before the non-static ones.
|
||||
|
||||
```c++
|
||||
class ExampleClass : public SomeParent
|
||||
{
|
||||
public:
|
||||
ExampleClass(int x, int y);
|
||||
|
||||
int GetX() const;
|
||||
int GetY() const;
|
||||
|
||||
protected:
|
||||
virtual void SomeProtectedFunction() = 0;
|
||||
static float s_some_variable;
|
||||
|
||||
private:
|
||||
int m_x;
|
||||
int m_y;
|
||||
};
|
||||
```
|
||||
|
||||
# <a name="cpp-code-specific-guidelines"></a>C++ code-specific guidelines
|
||||
|
||||
Summary:
|
||||
|
||||
- [General](#cpp-code-general)
|
||||
- [Headers](#cpp-code-headers)
|
||||
- [Loops](#cpp-code-loops)
|
||||
- [Functions](#cpp-code-functions)
|
||||
- [Classes and Structs](#cpp-code-classes-and-structs)
|
||||
|
||||
## <a name="cpp-code-general"></a>General
|
||||
- The codebase currently uses C++20, though not all compilers support all C++20 features.
|
||||
- See CMakeLists.txt "Enforce minimum compiler versions" for the currently supported compilers.
|
||||
- Use the [nullptr](https://en.cppreference.com/w/cpp/language/nullptr) type over the macro `NULL`.
|
||||
- If a [range-based for loop](https://en.cppreference.com/w/cpp/language/range-for) can be used instead of container iterators, use it.
|
||||
- Obviously, try not to use `goto` unless you have a *really* good reason for it.
|
||||
- If a compiler warning is found, please try and fix it.
|
||||
- Try to avoid using raw pointers (pointers allocated with `new`) as much as possible. There are cases where using a raw pointer is unavoidable, and in these situations it is OK to use them. An example of this is functions from a C library that require them. In cases where it is avoidable, the STL usually has a means to solve this (`vector`, `unique_ptr`, etc).
|
||||
- Do not use the `auto` keyword everywhere. While it's nice that the type can be determined by the compiler, it cannot be resolved at 'readtime' by the developer as easily. Use auto only in cases where it is obvious what the type being assigned is (note: 'obvious' means not having to open other files or reading the header file). Some situations where it is appropriate to use `auto` is when iterating over a `std::map` container in a foreach loop, or to shorten the length of container iterator variable declarations.
|
||||
- Do not use `using namespace [x];` in headers. Try not to use it at all if you can.
|
||||
- The preferred form of the increment and decrement operator in for-loops is prefix-form (e.g. `++var`).
|
||||
|
||||
## <a name="cpp-code-headers"></a>Headers
|
||||
- If a header is not necessary in a certain source file, remove them.
|
||||
- If you find duplicate includes of a certain header, remove it.
|
||||
- When declaring includes in a source file, make sure they follow the given pattern:
|
||||
- The header for the source file
|
||||
- Standard library headers
|
||||
- System-specific headers (these should also likely be in an `#ifdef` block unless the source file itself is system-specific).
|
||||
- Other Dolphin source file headers
|
||||
- Each of the above header sections should also be in alphabetical order
|
||||
- Project source file headers should be included in a way that is relative to the `[Dolphin Root]/Source/Core` directory.
|
||||
- This project uses `#pragma once` as header guards.
|
||||
|
||||
## <a name="cpp-code-loops"></a>Loops
|
||||
- If an infinite loop is required, do not use `for (;;)`, use `while (true)`.
|
||||
- Empty-bodied loops should use braces after their header, not a semicolon.
|
||||
- Yes: `while (condition) {}`
|
||||
- No: `while (condition);`
|
||||
- For do-while loops, place 'while' on the same line as the closing brackets
|
||||
|
||||
```c++
|
||||
do
|
||||
{
|
||||
// code
|
||||
} while (false);
|
||||
```
|
||||
|
||||
## <a name="cpp-code-functions"></a>Functions
|
||||
- If a function parameter is a pointer or reference and its value or data isn't intended to be changed, please mark that parameter as `const`.
|
||||
- Functions that specifically modify their parameters should have the respective parameter(s) marked as a pointer so that the variables being modified are syntactically obvious.
|
||||
- What not to do:
|
||||
|
||||
```c++
|
||||
template<class T>
|
||||
inline void Clamp(T& val, const T& min, const T& max)
|
||||
{
|
||||
if (val < min)
|
||||
val = min;
|
||||
else if (val > max)
|
||||
val = max;
|
||||
}
|
||||
```
|
||||
|
||||
Example call: `Clamp(var, 1000, 5000);`
|
||||
|
||||
- What to do:
|
||||
|
||||
```c++
|
||||
template<class T>
|
||||
inline void Clamp(T* val, const T& min, const T& max)
|
||||
{
|
||||
if (*val < min)
|
||||
*val = min;
|
||||
else if (*val > max)
|
||||
*val = max;
|
||||
}
|
||||
```
|
||||
|
||||
Example call: `Clamp(&var, 1000, 5000);`
|
||||
|
||||
- Class member functions that you do not want to be overridden in inheriting classes should be marked with the `final` specifier.
|
||||
|
||||
```c++
|
||||
class ClassName : ParentClass
|
||||
{
|
||||
public:
|
||||
void Update() final;
|
||||
};
|
||||
```
|
||||
|
||||
- Overridden member functions that can also be inherited should be marked with the `override` specifier to make it easier to see which functions belong to the parent class.
|
||||
|
||||
```c++
|
||||
class ClassName : ParentClass
|
||||
{
|
||||
public:
|
||||
void Update() override;
|
||||
};
|
||||
```
|
||||
|
||||
## <a name="cpp-code-classes-and-structs"></a>Classes and structs
|
||||
- Classes and structs that are not intended to be extended through inheritance should be marked with the `final` specifier.
|
||||
|
||||
```c++
|
||||
class ClassName final : ParentClass
|
||||
{
|
||||
// Class definitions
|
||||
};
|
||||
```
|
||||
|
||||
# <a name="android"></a>Android
|
||||
|
||||
If you are using Kotlin, just use the built-in official Kotlin code style.
|
||||
|
||||
To install the Java code style in Android Studio, select the gear icon in the Code Style settings as shown, select `Import Scheme...` and select `dolphin/Source/Android/code-style-java.xml`. The Code Style menu should look like this when complete. ![Code Style Window][code-style]
|
||||
|
||||
You can now select any section of code and press `Ctrl + Alt + L` to automatically format it.
|
||||
|
||||
# <a name="help"></a>Help
|
||||
If you have any questions about Dolphin's development or would like some help, Dolphin developers use `#dolphin-emu @ irc.libera.chat` to communicate. If you are new to IRC, [Libera.Chat has resources to get started chatting with IRC.](https://libera.chat/)
|
||||
|
||||
[code-style]: https://i.imgur.com/3b3UBhb.png
|
@ -1,6 +0,0 @@
|
||||
#GameCube Controller Adapter
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", TAG+="uaccess"
|
||||
|
||||
#Wiimotes or DolphinBar
|
||||
SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
|
||||
SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0330", TAG+="uaccess"
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1,212 +0,0 @@
|
||||
The two fonts in this directory (font_western.bin and font_japanese.bin) were
|
||||
generated using gc-font-tool which can be found in the docs/ directory in the
|
||||
dolphin source code.
|
||||
|
||||
Both fonts are based on Droid Sans
|
||||
|
||||
Copyright 2006-2014, Google Corporation
|
||||
Licensed under the Apache License 2.0
|
||||
|
||||
====
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
BIN
Data/Sys/GC/font_ansi.bin
Normal file
BIN
Data/Sys/GC/font_ansi.bin
Normal file
Binary file not shown.
Binary file not shown.
BIN
Data/Sys/GC/font_sjis.bin
Normal file
BIN
Data/Sys/GC/font_sjis.bin
Normal file
Binary file not shown.
Binary file not shown.
@ -1,13 +0,0 @@
|
||||
# 1-2 - Wii System Menu
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,10 +0,0 @@
|
||||
# Cxxxxx All Virtual Console Commodore 64 games
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[Video]
|
||||
|
||||
[Video_Settings]
|
||||
SuggestedAspectRatio = 2
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,13 +0,0 @@
|
||||
# D43E01, D43J01, D43P01, D43U01 - ZELDA OCARINA MULTI PACK
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
@ -1,102 +0,0 @@
|
||||
# D43E01 - Legend of Zelda, The - Ocarina of Time - Master Quest
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
$Max Hearts
|
||||
02BE1816 00000140
|
||||
$Infinite Hearts
|
||||
02BE1818 00000140
|
||||
$Infinite Magic
|
||||
08BE1821 00000008
|
||||
00BE1890 00000007
|
||||
00BE1822 00000001
|
||||
00BE1824 00000001
|
||||
00BE181B 00000060
|
||||
$Infinite Hover When Moving
|
||||
12132F1A 00000000
|
||||
02CA2AB2 0000000F
|
||||
$Infinite Rupees
|
||||
02BE181C 000003E7
|
||||
$Swords/Shields/Boots/Tunics
|
||||
02BE1884 00007777
|
||||
$Have Quiver (Adult)
|
||||
00BE1889 00000001
|
||||
$Golden Gauntlets (Adult)
|
||||
00BE188B 000000C0
|
||||
$All Quest Items
|
||||
04BE188C 30FFFFFF
|
||||
$Biggoron's Sword
|
||||
00BE1826 00000001
|
||||
$999 Gold Skulltulas
|
||||
02BE18B8 000003E7
|
||||
$Have Deku Stick
|
||||
00BE185C 00000000
|
||||
$Infinite Deku Sticks
|
||||
00BE1874 00000009
|
||||
$Flaming Deku Stick
|
||||
02CA2A80 000000C4
|
||||
$Have Deku Nuts
|
||||
00BE185D 00000001
|
||||
$Infinite Deku Nuts
|
||||
00BE1875 0000000A
|
||||
$Have Bombs
|
||||
00BE185E 00000002
|
||||
$Infinite Bombs
|
||||
00BE1876 00000009
|
||||
$Have Fairy Slingshot
|
||||
00BE1862 00000006
|
||||
$Infinite Slingshot Ammo
|
||||
00BE187A 00000009
|
||||
$Have Fairy Ocarina (Not Time)
|
||||
00BE1863 00000007
|
||||
$Have Ocarina Of Time (Not Fairy)
|
||||
00BE1863 00000008
|
||||
$Have Bombchu
|
||||
00BE1864 00000009
|
||||
$Infinite Bombchu's
|
||||
00BE187C 00000009
|
||||
$Have Boomerang
|
||||
00BE1868 0000000E
|
||||
$Have Lens Of Truth
|
||||
00BE1869 0000000F
|
||||
$Have Magic Beans
|
||||
00BE186A 00000010
|
||||
$Infinite Magic Beans
|
||||
00BE1882 00000009
|
||||
$Have Fairy Bow
|
||||
00BE185F 00000003
|
||||
$Infinite Arrows
|
||||
00BE1877 00000009
|
||||
$Have Fire Arrow (MP2)
|
||||
00BE1860 00000004
|
||||
$Have Ice Arrow (MP2)
|
||||
00BE1866 0000000C
|
||||
$Light Arrow (MP4)
|
||||
00BE186C 00000012
|
||||
$Have Hookshot (Not Longshot)
|
||||
00BE1865 0000000A
|
||||
$Have Longshot (Not Hookshot)
|
||||
00BE1865 0000000B
|
||||
$Have Megaton Hammer
|
||||
00BE186B 00000011
|
||||
$Have Din's Fire (MP6)
|
||||
00BE1861 00000005
|
||||
$Have Fairie's Wind (MP6)
|
||||
00BE1867 0000000D
|
||||
$Have Nayru's Love (MP12)
|
||||
00BE186D 00000013
|
||||
$Have Empty Bottle 1
|
||||
08BE186E 000000FF
|
||||
00BE188E 00000014
|
||||
$Have Empty Bottle 2
|
||||
08BE186F 000000FF
|
||||
00BE186F 00000014
|
||||
$Have Empty Bottle 3
|
||||
08BE1870 000000FF
|
||||
00BE1870 00000014
|
||||
$Have Empty Bottle 4
|
||||
08BE1871 000000FF
|
||||
00BE1871 00000014
|
@ -1,12 +0,0 @@
|
||||
# D43J01 - ZELDA OCARINA MULTI PACK
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
$loophack
|
||||
0x806866E4:word:0x60000000
|
||||
|
||||
[Patches_RetroAchievements_Verified]
|
||||
$loophack
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
@ -1,16 +0,0 @@
|
||||
# D56E01 - Interactive Multi-Game Demo Disc Version 35
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
BBoxEnable = True
|
||||
ImmediateXFBEnable = False
|
||||
DeferEFBCopies = False
|
@ -1,12 +0,0 @@
|
||||
# D85E01 - Interactive Multi Game Demo Disc v12
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
FPRF = True
|
||||
MMU = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
@ -1,12 +0,0 @@
|
||||
# D86P01 - Interactive Multi Game Demo Disc v12
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
FPRF = True
|
||||
MMU = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
@ -1,4 +0,0 @@
|
||||
# D93U01 - Interactive Multi-Game Demo Disk: November 2003
|
||||
|
||||
[Core]
|
||||
FPRF = True
|
@ -1,11 +0,0 @@
|
||||
# D95P01 - Interactive Multi Game Demo Disc v5
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
FPRF = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
@ -1,22 +0,0 @@
|
||||
# DAXP01, DAXE01 - The Legend of Zelda Skyward Sword
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBAccessEnable = True
|
||||
EFBEmulateFormatChanges = True
|
||||
|
||||
[Video_Enhancements]
|
||||
ArbitraryMipmapDetection = True
|
||||
|
||||
[Video_Settings]
|
||||
# Allow the ArbitraryMipmapDetection setting to take effect.
|
||||
|
||||
EnableGPUTextureDecoding = False
|
@ -1,17 +0,0 @@
|
||||
# DD2P41 - Just Dance 2 (Demo)
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
||||
|
||||
[Video_Enhancements]
|
||||
MaxAnisotropy = 0
|
||||
ForceTextureFiltering = False
|
@ -1,4 +0,0 @@
|
||||
# DJU - (unknown title - INI file autogenerated from vWii system menu list of titles without 16:9 support)
|
||||
|
||||
[Video_Settings]
|
||||
SuggestedAspectRatio = 2
|
@ -1,19 +0,0 @@
|
||||
# DLSE64, DLSP64 - Star Wars: Rogue Squadron III: Rebel Strike: Limited Edition Bonus Disc (Demo)
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
MMU = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video]
|
||||
|
||||
[Video_Settings]
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
ImmediateXFBEnable = False
|
@ -1,18 +0,0 @@
|
||||
# DPOJ8P - PHANTASY STAR ONLINE EPISODE I&II TRIAL EDITION
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
$Bypass Modem Detection
|
||||
04194f40 4182002c
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
||||
|
||||
[AR_RetroAchievements_Verified]
|
||||
$Bypass Modem Detection
|
@ -1,13 +0,0 @@
|
||||
# DPSJ8P - PHANTASY STAR ONLINE EPISODE III TRIAL EDITION
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
@ -1,4 +0,0 @@
|
||||
# DQAJK2 - Aquarius Baseball
|
||||
|
||||
[Video_Settings]
|
||||
SuggestedAspectRatio = 2
|
@ -1,11 +0,0 @@
|
||||
# DSRJ8P - Sonic and the Secret Rings
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
RealWiiRemoteRepeatReports = False
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
@ -1,8 +0,0 @@
|
||||
# Exxxxx - All "Virtual Console Arcade" and NeoGeo Virtual Console games
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[Video_Settings]
|
||||
SuggestedAspectRatio = 2
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,13 +0,0 @@
|
||||
# E52E08 - 1942
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
@ -1,16 +0,0 @@
|
||||
# E53E08 - BLACK TIGER
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,16 +0,0 @@
|
||||
# E54E08 - GHOSTS'N GOBLINS
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,13 +0,0 @@
|
||||
# E55E08 - WoB:COMMANDO
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
@ -1,13 +0,0 @@
|
||||
# E56E08 - EXED EXES
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
@ -1,13 +0,0 @@
|
||||
# E57E08 - SONSON
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
@ -1,17 +0,0 @@
|
||||
# E5ZE8P - Super Hang-On
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
CPUThread = False
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
||||
[Video_Hacks]
|
||||
ImmediateXFBEnable = False
|
@ -1,17 +0,0 @@
|
||||
# E62E8P - Space Harrier
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
CPUThread = False
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
||||
[Video_Hacks]
|
||||
ImmediateXFBEnable = False
|
@ -1,17 +0,0 @@
|
||||
# E63E8P - Shinobi
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
CPUThread = False
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
||||
[Video_Hacks]
|
||||
ImmediateXFBEnable = False
|
@ -1,16 +0,0 @@
|
||||
# E6NE9B - Solomon's Key
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,16 +0,0 @@
|
||||
# E6QE9B - RYGAR
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,16 +0,0 @@
|
||||
# E6VE8P - Zaxxon
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
||||
[Video_Hacks]
|
||||
ImmediateXFBEnable = False
|
@ -1,17 +0,0 @@
|
||||
# E6WE8P - Golden Axe
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
CPUThread = False
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
||||
[Video_Hacks]
|
||||
ImmediateXFBEnable = False
|
@ -1,17 +0,0 @@
|
||||
# E6XE8P - Altered Beast
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
CPUThread = False
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
||||
[Video_Hacks]
|
||||
ImmediateXFBEnable = False
|
@ -1,16 +0,0 @@
|
||||
# E73EAF - Mappy
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,22 +0,0 @@
|
||||
# E78JAF - Solvalou
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBEmulateFormatChanges = True
|
||||
# Solves minor graphical issues when starting level and game over screen
|
||||
#EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
MSAA = 0
|
||||
|
||||
[Video_Enhancements]
|
||||
ForceFiltering = False
|
||||
ForceTrueColor = False
|
@ -1,16 +0,0 @@
|
||||
# E79EAF - Gaplus
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,16 +0,0 @@
|
||||
# E7VJ - Cyber Sled
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Enhancements]
|
||||
ForceTrueColor = False
|
||||
|
||||
[Video_Hacks]
|
||||
EFBEmulateFormatChanges = True
|
@ -1,16 +0,0 @@
|
||||
# E7ZEAF - The Tower of Druaga
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Hacks]
|
||||
EFBToTextureEnable = False
|
||||
|
||||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 0
|
@ -1,17 +0,0 @@
|
||||
# EA2EJ8, EA2JJ8, EA2PJ8 - Metal Slug 2
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
DSPHLE = False
|
||||
|
||||
[DSP]
|
||||
# Values set here will override the Dolphin DSP settings.
|
||||
EnableJIT = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
@ -1,17 +0,0 @@
|
||||
# EA3JJ8 - Galaxy Fight: Universal Warriors
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
DSPHLE = False
|
||||
|
||||
[DSP]
|
||||
# Values set here will override the Dolphin DSP settings.
|
||||
EnableJIT = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
@ -1,17 +0,0 @@
|
||||
# EA4EJ8, EA4JJ8, EA4PJ8 - Samurai Shodown III
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
DSPHLE = False
|
||||
|
||||
[DSP]
|
||||
# Values set here will override the Dolphin DSP settings.
|
||||
EnableJIT = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
@ -1,17 +0,0 @@
|
||||
# EA5EJ8, EA5JJ8, EA5PJ8 - Fatal Fury 3: Road to the Final Victory
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main Dolphin settings.
|
||||
DSPHLE = False
|
||||
|
||||
[DSP]
|
||||
# Values set here will override the Dolphin DSP settings.
|
||||
EnableJIT = True
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video_Settings]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user