mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
d8fd449745 | |||
331db09aa4 | |||
219d45299f | |||
957f4dbdda | |||
6f2e3369b0 | |||
9b70863dd6 | |||
8c22d34f90 | |||
e137e3711e | |||
25c52b0b69 | |||
09e3b5e3ca | |||
4f36c2f7fa | |||
e19fb50ae8 | |||
76e3a6dbd5 | |||
4e43ecb28d |
@ -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
|
78
.gitignore
vendored
78
.gitignore
vendored
@ -1,45 +1,41 @@
|
||||
# Ignore image thumbnail files created by windows
|
||||
|
||||
#ignore thumbnails 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
|
||||
#Ignore files built by Visual Studio
|
||||
*.obj
|
||||
*.exe
|
||||
*.pdb
|
||||
*.user
|
||||
*.aps
|
||||
*.pch
|
||||
*.vspscc
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ncb
|
||||
*.suo
|
||||
*.tlb
|
||||
*.tlh
|
||||
*.bak
|
||||
*.cache
|
||||
*.ilk
|
||||
*.log
|
||||
[Bb]in
|
||||
[Dd]ebug*/
|
||||
*.lib
|
||||
*.sbr
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
Binary
|
||||
Source/Core/Common/Src/scmrev.h
|
||||
*.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
|
||||
[Bb]uild
|
||||
*.ipch
|
||||
.sconsign.dblite
|
||||
Externals/scons-local/*
|
||||
.DS_Store
|
||||
*~
|
||||
# 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
|
||||
#Ignore transifix configuration directory
|
||||
.tx
|
||||
|
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
|
25
.hgignore
Normal file
25
.hgignore
Normal file
@ -0,0 +1,25 @@
|
||||
syntax:glob
|
||||
Binary
|
||||
*.obj
|
||||
*.pdb
|
||||
*.idb
|
||||
*.ilk
|
||||
*.pch
|
||||
*.sdf
|
||||
*.suo
|
||||
*.vcxproj.*.user
|
||||
*/Win32/Release
|
||||
*/Win32/DebugFast
|
||||
*/Win32/Debug
|
||||
*/x64/Release
|
||||
*/x64/DebugFast
|
||||
*/x64/Debug
|
||||
Source/ipch
|
||||
BuildLog.htm
|
||||
Source/Core/Common/Src/svnrev.h
|
||||
Externals/wxWidgets/build/msw/*/Release
|
||||
Externals/wxWidgets/build/msw/*/DebugFast
|
||||
Externals/wxWidgets/build/msw/*/Debug
|
||||
*.svn*
|
||||
Data/User/GameConfig
|
||||
Data/User/Shaders
|
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,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()
|
1348
CMakeLists.txt
1348
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
71
CMakeTests/CheckLib.cmake
Normal file
71
CMakeTests/CheckLib.cmake
Normal file
@ -0,0 +1,71 @@
|
||||
include(FindPkgConfig OPTIONAL)
|
||||
|
||||
macro(_internal_message msg)
|
||||
if(NOT ${_is_quiet})
|
||||
message("${msg}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(check_lib var 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)
|
||||
string(TOLOWER ${lib} lower_lib)
|
||||
pkg_search_module(${var} QUIET ${lower_lib})
|
||||
endif()
|
||||
|
||||
if(${var}_FOUND)
|
||||
include_directories(${${var}_INCLUDE_DIRS})
|
||||
# Make sure include directories for headers found using find_path below
|
||||
# are re-added when reconfiguring
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_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()
|
||||
|
||||
macro(check_libav)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(LIBAV libavcodec>=53.35.0 libavformat>=53.21.0
|
||||
libswscale>=2.1.0 libavutil>=51.22.1)
|
||||
else()
|
||||
message("pkg-config is required to check for libav")
|
||||
endif()
|
||||
if(LIBAV_FOUND)
|
||||
message("libav found, enabling AVI frame dumps")
|
||||
add_definitions(-DHAVE_LIBAV)
|
||||
include_directories(${LIBAV_INCLUDE_DIRS})
|
||||
else()
|
||||
message("libav not found, disabling AVI frame dumps")
|
||||
endif()
|
||||
endmacro()
|
||||
|
32
CMakeTests/FindGLEW.cmake
Normal file
32
CMakeTests/FindGLEW.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
include(FindPkgConfig OPTIONAL)
|
||||
|
||||
# This is a hack to deal with Ubuntu's mess.
|
||||
# Ubuntu's version of glew is 1.8, but they have patched in most of glew 1.9.
|
||||
# So Ubuntu's version works for dolphin.
|
||||
macro(test_glew)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${GLEW_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES GLEW)
|
||||
check_cxx_source_runs("
|
||||
#include <GL/glew.h>
|
||||
int main()
|
||||
{
|
||||
#ifdef GLEW_ARB_shader_image_load_store
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}"
|
||||
GLEW_HAS_1_9_METHODS)
|
||||
endmacro()
|
||||
|
||||
if(PKG_CONFIG_FOUND AND NOT ${var}_FOUND)
|
||||
pkg_search_module(GLEW glew>=1.8)
|
||||
endif()
|
||||
|
||||
if(GLEW_FOUND)
|
||||
test_glew()
|
||||
if (GLEW_HAS_1_9_METHODS)
|
||||
include_directories(${GLEW_INCLUDE_DIRS})
|
||||
message("GLEW found")
|
||||
endif()
|
||||
endif()
|
@ -23,7 +23,7 @@ elseif (NOT LIBUSB_FOUND)
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb
|
||||
find_library(LIBUSB_LIBRARIES NAMES usb-1.0
|
||||
PATHS
|
||||
${LIBUSB_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
@ -40,11 +40,4 @@ elseif (NOT LIBUSB_FOUND)
|
||||
|
||||
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()
|
||||
|
179
CMakeTests/FindMiniupnpc.cmake
Normal file
179
CMakeTests/FindMiniupnpc.cmake
Normal file
@ -0,0 +1,179 @@
|
||||
# Locate miniupnp library
|
||||
# This module defines
|
||||
# MINIUPNP_FOUND, if false, do not try to link to miniupnp
|
||||
# MINIUPNP_LIBRARY, the miniupnp variant
|
||||
# MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family)
|
||||
# MINIUPNPC_VERSION_PRE1_6 --> set if we detect the version of miniupnpc is
|
||||
# pre 1.6
|
||||
# MINIUPNPC_VERSION_PRE1_5 --> set if we detect the version of miniupnpc is
|
||||
# pre 1.5
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "miniupnpc.h"
|
||||
# and not
|
||||
# #include <miniupnpc/miniupnpc.h>
|
||||
# This is because, the miniupnpc location is not standardized and may exist
|
||||
# in locations other than miniupnpc/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Mark Vejvoda
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(MINIUPNP_FIND_QUIETLY TRUE)
|
||||
endif (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
|
||||
find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
|
||||
PATH_SUFFIXES miniupnpc)
|
||||
find_library(MINIUPNP_LIBRARY miniupnpc)
|
||||
|
||||
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
set (MINIUPNP_FOUND TRUE)
|
||||
endif ()
|
||||
|
||||
if (MINIUPNP_FOUND)
|
||||
if (NOT MINIUPNP_FIND_QUIETLY)
|
||||
message (STATUS "Found the miniupnpc libraries at ${MINIUPNP_LIBRARY}")
|
||||
message (STATUS "Found the miniupnpc headers at ${MINIUPNP_INCLUDE_DIR}")
|
||||
endif (NOT MINIUPNP_FIND_QUIETLY)
|
||||
|
||||
message(STATUS "Detecting version of miniupnpc in path: ${MINIUPNP_INCLUDE_DIR}")
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY})
|
||||
check_cxx_source_runs("
|
||||
#include <miniwget.h>
|
||||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
static struct UPNPUrls urls;
|
||||
static struct IGDdatas data;
|
||||
|
||||
GetUPNPUrls (&urls, &data, \"myurl\",0);
|
||||
|
||||
return 0;
|
||||
}"
|
||||
MINIUPNPC_VERSION_1_7_OR_HIGHER)
|
||||
|
||||
IF (NOT MINIUPNPC_VERSION_1_7_OR_HIGHER)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY})
|
||||
check_cxx_source_runs("
|
||||
#include <miniwget.h>
|
||||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
struct UPNPDev *devlist = NULL;
|
||||
int upnp_delay = 5000;
|
||||
const char *upnp_multicastif = NULL;
|
||||
const char *upnp_minissdpdsock = NULL;
|
||||
int upnp_sameport = 0;
|
||||
int upnp_ipv6 = 0;
|
||||
int upnp_error = 0;
|
||||
devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error);
|
||||
|
||||
return 0;
|
||||
}"
|
||||
MINIUPNPC_VERSION_PRE1_7)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT MINIUPNPC_VERSION_PRE1_7 AND NOT MINIUPNPC_VERSION_1_7_OR_HIGHER)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY})
|
||||
check_cxx_source_runs("
|
||||
#include <miniwget.h>
|
||||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
struct UPNPDev *devlist = NULL;
|
||||
int upnp_delay = 5000;
|
||||
const char *upnp_multicastif = NULL;
|
||||
const char *upnp_minissdpdsock = NULL;
|
||||
int upnp_sameport = 0;
|
||||
int upnp_ipv6 = 0;
|
||||
int upnp_error = 0;
|
||||
devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport);
|
||||
|
||||
return 0;
|
||||
}"
|
||||
MINIUPNPC_VERSION_PRE1_6)
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF (NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7 AND NOT MINIUPNPC_VERSION_1_7_OR_HIGHER)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY})
|
||||
check_cxx_source_runs("
|
||||
#include <miniwget.h>
|
||||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
#include <stdio.h>
|
||||
static struct UPNPUrls urls;
|
||||
static struct IGDdatas data;
|
||||
int main()
|
||||
{
|
||||
char externalIP[16] = "";
|
||||
UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP);
|
||||
|
||||
return 0;
|
||||
}"
|
||||
MINIUPNPC_VERSION_1_5_OR_HIGHER)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT MINIUPNPC_VERSION_1_5_OR_HIGHER AND NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7 AND NOT MINIUPNPC_VERSION_1_7_OR_HIGHER)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${MINIUPNP_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${MINIUPNP_LIBRARY})
|
||||
check_cxx_source_runs("
|
||||
#include <miniwget.h>
|
||||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
#include <stdio.h>
|
||||
static struct UPNPUrls urls;
|
||||
static struct IGDdatas data;
|
||||
int main()
|
||||
{
|
||||
char externalIP[16] = "";
|
||||
UPNP_GetExternalIPAddress(urls.controlURL, data.servicetype, externalIP);
|
||||
|
||||
return 0;
|
||||
}"
|
||||
MINIUPNPC_VERSION_PRE1_5)
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF(MINIUPNPC_VERSION_PRE1_5)
|
||||
message(STATUS "Found miniupnpc version is pre v1.5")
|
||||
ENDIF()
|
||||
IF(MINIUPNPC_VERSION_PRE1_6)
|
||||
message(STATUS "Found miniupnpc version is pre v1.6")
|
||||
ENDIF()
|
||||
IF(MINIUPNPC_VERSION_PRE1_7)
|
||||
message(STATUS "Found miniupnpc version is pre v1.7")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT MINIUPNPC_VERSION_PRE1_5 AND NOT MINIUPNPC_VERSION_PRE1_6 AND NOT MINIUPNPC_VERSION_PRE1_7)
|
||||
message(STATUS "Found miniupnpc version is v1.7 or higher")
|
||||
ENDIF()
|
||||
|
||||
else ()
|
||||
message (STATUS "Could not find miniupnp")
|
||||
endif ()
|
||||
|
||||
MARK_AS_ADVANCED(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY)
|
||||
|
59
CMakeTests/FindPolarSSL.cmake
Normal file
59
CMakeTests/FindPolarSSL.cmake
Normal file
@ -0,0 +1,59 @@
|
||||
# Locate polarssl library
|
||||
# This module defines
|
||||
# POLARSSL_FOUND
|
||||
# POLARSSL_LIBRARY
|
||||
# POLARSSL_INCLUDE_DIR
|
||||
# POLARSSL_WORKS, this is true if polarssl is found and contains the methods
|
||||
# needed by dolphin-emu
|
||||
|
||||
if(POLARSSL_INCLUDE_DIR AND POLARSSL_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(POLARSSL_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
find_path(POLARSSL_INCLUDE_DIR polarssl/ssl.h)
|
||||
find_library(POLARSSL_LIBRARY polarssl)
|
||||
|
||||
if (POLARSSL_INCLUDE_DIR AND POLARSSL_LIBRARY)
|
||||
set (POLARSSL_FOUND TRUE)
|
||||
endif ()
|
||||
|
||||
if (POLARSSL_FOUND)
|
||||
if (NOT POLARSSL_FIND_QUIETLY)
|
||||
message (STATUS "Found the polarssl libraries at ${POLARSSL_LIBRARY}")
|
||||
message (STATUS "Found the polarssl headers at ${POLARSSL_INCLUDE_DIR}")
|
||||
endif (NOT POLARSSL_FIND_QUIETLY)
|
||||
|
||||
message(STATUS "Checking to see if system version contains necessary methods")
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${POLARSSL_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${POLARSSL_LIBRARY})
|
||||
check_cxx_source_compiles("
|
||||
#include <polarssl/net.h>
|
||||
#include <polarssl/ssl.h>
|
||||
#include <polarssl/havege.h>
|
||||
int main()
|
||||
{
|
||||
ssl_context ctx;
|
||||
ssl_session session;
|
||||
havege_state hs;
|
||||
|
||||
ssl_init(&ctx);
|
||||
havege_init(&hs);
|
||||
ssl_set_rng(&ctx, havege_random, &hs);
|
||||
ssl_set_session(&ctx, &session);
|
||||
|
||||
ssl_close_notify(&ctx);
|
||||
ssl_session_free(&session);
|
||||
ssl_free(&ctx);
|
||||
|
||||
return 0;
|
||||
}"
|
||||
POLARSSL_WORKS)
|
||||
|
||||
else ()
|
||||
message (STATUS "Could not find polarssl")
|
||||
endif ()
|
||||
|
||||
MARK_AS_ADVANCED(POLARSSL_INCLUDE_DIR POLARSSL_LIBRARY)
|
||||
|
180
CMakeTests/FindSDL2.cmake
Normal file
180
CMakeTests/FindSDL2.cmake
Normal file
@ -0,0 +1,180 @@
|
||||
# Locate SDL2 library
|
||||
# This module defines
|
||||
# SDL2_LIBRARY, the name of the library to link against
|
||||
# SDL2_FOUND, if false, do not try to link to SDL2
|
||||
# SDL2_INCLUDE_DIR, where to find SDL.h
|
||||
#
|
||||
# This module responds to the the flag:
|
||||
# SDL2_BUILDING_LIBRARY
|
||||
# If this is defined, then no SDL2_main will be linked in because
|
||||
# only applications need main().
|
||||
# Otherwise, it is assumed you are building an application and this
|
||||
# module will attempt to locate and set the the proper link flags
|
||||
# as part of the returned SDL2_LIBRARY variable.
|
||||
#
|
||||
# Don't forget to include SDL2main.h and SDL2main.m your project for the
|
||||
# OS X framework based version. (Other versions link to -lSDL2main which
|
||||
# this module will try to find on your behalf.) Also for OS X, this
|
||||
# module will automatically add the -framework Cocoa on your behalf.
|
||||
#
|
||||
#
|
||||
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
|
||||
# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
|
||||
# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
|
||||
# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again.
|
||||
# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
|
||||
# as appropriate. These values are used to generate the final SDL2_LIBRARY
|
||||
# variable, but when these values are unset, SDL2_LIBRARY does not get created.
|
||||
#
|
||||
#
|
||||
# $SDL2DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$SDL2DIR
|
||||
# used in building SDL2.
|
||||
# l.e.galup 9-20-02
|
||||
#
|
||||
# Modified by Eric Wing.
|
||||
# Added code to assist with automated building by using environmental variables
|
||||
# and providing a more controlled/consistent search behavior.
|
||||
# Added new modifications to recognize OS X frameworks and
|
||||
# additional Unix paths (FreeBSD, etc).
|
||||
# Also corrected the header search path to follow "proper" SDL2 guidelines.
|
||||
# Added a search for SDL2main which is needed by some platforms.
|
||||
# Added a search for threads which is needed by some platforms.
|
||||
# Added needed compile switches for MinGW.
|
||||
#
|
||||
# On OSX, this will prefer the Framework version (if found) over others.
|
||||
# People will have to manually change the cache values of
|
||||
# SDL2_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
#
|
||||
# Note that the header path has changed from SDL2/SDL.h to just SDL.h
|
||||
# This needed to change because "proper" SDL2 convention
|
||||
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
|
||||
# reasons because not all systems place things in SDL2/ (see FreeBSD).
|
||||
#
|
||||
# Ported by Johnny Patterson. This is a literal port for SDL2 of the FindSDL.cmake
|
||||
# module with the minor edit of changing "SDL" to "SDL2" where necessary. This
|
||||
# was not created for redistribution, and exists temporarily pending official
|
||||
# SDL2 CMake modules.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2003-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES include/SDL2 include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include/SDL2
|
||||
/usr/include/SDL2
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
#MESSAGE("SDL2_INCLUDE_DIR is ${SDL2_INCLUDE_DIR}")
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
||||
NAMES SDL2
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
#MESSAGE("SDL2_LIBRARY_TEMP is ${SDL2_LIBRARY_TEMP}")
|
||||
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
# Non-OS X framework versions expect you to also dynamically link to
|
||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||
# seem to provide SDL2main for compatibility even though they don't
|
||||
# necessarily need it.
|
||||
FIND_LIBRARY(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
|
||||
# SDL2 may require threads on your system.
|
||||
# The Apple build may not need an explicit flag because one of the
|
||||
# frameworks may already provide it.
|
||||
# But for non-OSX systems, I will use the CMake Threads package.
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# MinGW needs an additional library, mwindows
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows
|
||||
# (Actually on second look, I think it only needs one of the m* libraries.)
|
||||
IF(MINGW)
|
||||
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
||||
ENDIF(MINGW)
|
||||
|
||||
SET(SDL2_FOUND "NO")
|
||||
IF(SDL2_LIBRARY_TEMP)
|
||||
# For SDL2main
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(SDL2MAIN_LIBRARY)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(SDL2MAIN_LIBRARY)
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
IF(APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
IF(NOT APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
|
||||
SET(SDL2_FOUND "YES")
|
||||
ENDIF(SDL2_LIBRARY_TEMP)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
|
||||
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
169
CMakeTests/FindSFML.cmake
Normal file
169
CMakeTests/FindSFML.cmake
Normal file
@ -0,0 +1,169 @@
|
||||
# Locate the SFML library
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# - For each 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)
|
||||
#
|
||||
# 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 ...).
|
||||
#
|
||||
# If SFML is not installed in a standard path, you can use the SFMLDIR CMake variable or environment variable
|
||||
# to tell CMake where SFML is.
|
||||
|
||||
# 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
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/
|
||||
/usr/
|
||||
/sw # Fink
|
||||
/opt/local/ # DarwinPorts
|
||||
/opt/csw/ # Blastwave
|
||||
/opt/
|
||||
${SFMLDIR}
|
||||
$ENV{SFMLDIR})
|
||||
|
||||
|
||||
# will be set to false if one of the required modules is not found
|
||||
set(SFML_FOUND TRUE)
|
||||
set(SFML_VERSION_OK TRUE)
|
||||
|
||||
# check the version number
|
||||
if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR AND NOT (SFML_INCLUDE_DIR STREQUAL "SFML_INCLUDE_DIR-NOTFOUND"))
|
||||
# extract the major and minor version numbers from SFML/Config.hpp
|
||||
FILE(READ "${SFML_INCLUDE_DIR}/SFML/Config.hpp" SFML_CONFIG_HPP_CONTENTS)
|
||||
STRING(REGEX MATCH ".*#define SFML_VERSION_MAJOR ([0-9]+).*#define SFML_VERSION_MINOR ([0-9]+).*" SFML_CONFIG_HPP_CONTENTS "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
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 < 2.0
|
||||
if (SFML_REQUESTED_VERSION GREATER 19)
|
||||
set(SFML_VERSION_OK FALSE)
|
||||
set(SFML_VERSION_MAJOR 1)
|
||||
set(SFML_VERSION_MINOR x)
|
||||
endif()
|
||||
endif()
|
||||
elseif(SFML_INCLUDE_DIR STREQUAL "SFML_INCLUDE_DIR-NOTFOUND")
|
||||
set(SFML_FOUND FALSE)
|
||||
set(FIND_SFML_MISSING "${FIND_SFML_MISSING} SFML_INCLUDE_DIR")
|
||||
endif()
|
||||
|
||||
# find the requested modules
|
||||
set(FIND_SFML_LIB_PATHS ~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
${SFMLDIR}
|
||||
$ENV{SFMLDIR})
|
||||
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("${FIND_SFML_ERROR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# handle success
|
||||
if(SFML_FOUND)
|
||||
message("Found SFML: ${SFML_INCLUDE_DIR}")
|
||||
endif()
|
@ -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 +1,27 @@
|
||||
# D43E01 - Legend of Zelda, The - Ocarina of Time - Master Quest
|
||||
# D43E01 - ZELDA OCARINA MULTI PACK
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main dolphin settings.
|
||||
|
||||
[EmuState]
|
||||
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Minor video glitches when pausing
|
||||
|
||||
[OnLoad]
|
||||
# Add memory patches to be loaded once on boot here.
|
||||
|
||||
[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
|
||||
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
|
||||
|
@ -1,12 +1,21 @@
|
||||
# D43J01 - ZELDA OCARINA MULTI PACK
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main dolphin settings.
|
||||
|
||||
[EmuState]
|
||||
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
|
||||
[OnLoad]
|
||||
# Add memory patches to be loaded once on boot here.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
$loophack
|
||||
0x806866E4:word:0x60000000
|
||||
|
||||
[Patches_RetroAchievements_Verified]
|
||||
$loophack
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
|
23
Data/Sys/GameSettings/D43P01.ini
Normal file
23
Data/Sys/GameSettings/D43P01.ini
Normal file
@ -0,0 +1,23 @@
|
||||
# D43P01 - The Legend of Zelda: Ocarina of Time
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main dolphin settings.
|
||||
|
||||
[EmuState]
|
||||
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
Issues="Dolphin doesn't support soft reset"
|
||||
EmulationIssues =
|
||||
|
||||
[OnLoad]
|
||||
# Add memory patches to be loaded once on boot here.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
|
22
Data/Sys/GameSettings/D43U01.ini
Normal file
22
Data/Sys/GameSettings/D43U01.ini
Normal file
@ -0,0 +1,22 @@
|
||||
# D43U01 - ZELDA OCARINA MULTI PACK
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main dolphin settings.
|
||||
|
||||
[EmuState]
|
||||
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
|
||||
[OnLoad]
|
||||
# Add memory patches to be loaded once on boot here.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
|
@ -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.
|
20
Data/Sys/GameSettings/DTLX01.ini
Normal file
20
Data/Sys/GameSettings/DTLX01.ini
Normal file
@ -0,0 +1,20 @@
|
||||
# DTLX01 - ACTION REPLAY
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
# Values set here will override the main dolphin settings.
|
||||
|
||||
[EmuState]
|
||||
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 3
|
||||
|
||||
[OnLoad]
|
||||
# Add memory patches to be loaded once on boot here.
|
||||
|
||||
[OnFrame]
|
||||
# Add memory patches to be applied every frame here.
|
||||
|
||||
[ActionReplay]
|
||||
# Add action replay cheats here.
|
||||
|
18
Data/Sys/GameSettings/DVDXDV.ini
Normal file
18
Data/Sys/GameSettings/DVDXDV.ini
Normal file
@ -0,0 +1,18 @@
|
||||
# DVDXDV - Unknown
|
||||
|
||||
[Core]
|
||||
# Values set here will override the main dolphin settings.
|
||||
|
||||
[EmuState]
|
||||
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationIssues =
|
||||
|
||||
[OnLoad]
|
||||
# Add memory patches to be loaded once on boot here.
|
||||
|
||||
[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
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user