diff --git a/.editorconfig b/.editorconfig index 769094d3fb..406746ac17 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,10 +10,6 @@ indent_style = space insert_final_newline = true max_line_length = 100 -[{CMakeLists.txt,*.cmake}] -indent_style = space -insert_final_newline = true - [.editorconfig] insert_final_newline = true diff --git a/.github/workflows/build-android-libretro.yml b/.github/workflows/build-android-libretro.yml index 4b4d6b7cb9..004b8ac90c 100644 --- a/.github/workflows/build-android-libretro.yml +++ b/.github/workflows/build-android-libretro.yml @@ -1,40 +1,27 @@ -name: Build Dolphin (libretro) on Android +name: Build parallel_gamecubewii (libretro) on Android on: [push, pull_request] env: - core_id: dolphin_libretro + core_id: parallel_gamecubewii_libretro jobs: - build-android: + build: runs-on: ubuntu-latest steps: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y openjdk-25-jdk wget unzip cmake ninja-build wget https://dl.google.com/android/repository/android-ndk-r29-linux.zip unzip -q android-ndk-r29-linux.zip echo "ANDROID_NDK_HOME=$PWD/android-ndk-r29" >> $GITHUB_ENV - - name: Checkout Dolphin (libretro) repo + - name: Checkout parallel-gamecubewii repo uses: actions/checkout@v6 with: path: ${{ env.core_id }} submodules: recursive - - name: Configure - run: | - cd ${{ env.core_id }} - cmake -B build/android-arm64-v8a \ - -DLIBRETRO=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DANDROID_ABI=arm64-v8a \ - -DANDROID_PLATFORM=android-26 \ - -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ - -G Ninja - - name: Build run: | - cd ${{ env.core_id }}/build/android-arm64-v8a - ninja -j$(nproc) + cd ${{ env.core_id }} + make -j$(nproc) platform=android-arm64 NDK_ROOT=$ANDROID_NDK_HOME diff --git a/.github/workflows/build-iOS-libretro.yml b/.github/workflows/build-iOS-libretro.yml index b969b95feb..770431e9ec 100644 --- a/.github/workflows/build-iOS-libretro.yml +++ b/.github/workflows/build-iOS-libretro.yml @@ -1,42 +1,21 @@ -name: Build Dolphin (libretro) on iOS +name: Build parallel_gamecubewii (libretro) on iOS on: [push, pull_request] env: - core_id: dolphin_libretro + core_id: parallel_gamecubewii_libretro jobs: build: runs-on: macos-latest steps: - - name: Install dependencies - run: | - brew update - brew install cmake mbedtls zlib - - - name: Checkout Dolphin (libretro) repo + - name: Checkout parallel-gamecubewii repo uses: actions/checkout@v6 with: path: ${{ env.core_id }} submodules: recursive - - name: Configure (iOS arm64) - run: | - cd ${{ env.core_id }} - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_C_FLAGS="" \ - -DCMAKE_CXX_FLAGS="" \ - -DIOS=ON \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \ - -DCMAKE_SYSTEM_NAME=iOS \ - -DCMAKE_SYSTEM_PROCESSOR=arm64 \ - -DCMAKE_OSX_ARCHITECTURES=arm64 \ - -DLIBRETRO=ON \ - . -Bbuild/ios-arm64 - - name: Build run: | - cd ${{ env.core_id }}/build/ios-arm64 - make -j$(sysctl -n hw.ncpu) + cd ${{ env.core_id }} + make -j$(sysctl -n hw.ncpu) platform=ios-arm64 diff --git a/.github/workflows/build-macOS-libretro.yml b/.github/workflows/build-macOS-libretro.yml index 2ea6d5ddb1..543d8cb795 100644 --- a/.github/workflows/build-macOS-libretro.yml +++ b/.github/workflows/build-macOS-libretro.yml @@ -1,43 +1,21 @@ -name: Build Dolphin (libretro) on macOS +name: Build parallel_gamecubewii (libretro) on macOS on: [push, pull_request] env: - core_id: dolphin_libretro + core_id: parallel_gamecubewii_libretro jobs: build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - name: "macOS x64" - os: macos-latest - ZIP_NAME_SUFFIX: macos_x64 + runs-on: macos-latest steps: - - name: Install dependencies - run: | - brew update - brew install cmake \ - mbedtls zlib - - - name: Checkout Dolphin (libretro) repo + - name: Checkout parallel-gamecubewii repo uses: actions/checkout@v6 with: path: ${{ env.core_id }} submodules: recursive - - name: Configure - run: | - cd ${{ env.core_id }} - mkdir -p build && cd build - cmake .. \ - -DLIBRETRO=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install - - name: Build run: | - cd ${{ env.core_id }}/build - make -j$(sysctl -n hw.ncpu) + cd ${{ env.core_id }} + make -j$(sysctl -n hw.ncpu) platform=osx diff --git a/.github/workflows/build-ubuntu-libretro.yml b/.github/workflows/build-ubuntu-libretro.yml index fa085ec41e..fd8b2eb508 100644 --- a/.github/workflows/build-ubuntu-libretro.yml +++ b/.github/workflows/build-ubuntu-libretro.yml @@ -1,46 +1,21 @@ -name: Build Dolphin (libretro) on Ubuntu x64 +name: Build parallel_gamecubewii (libretro) on Ubuntu x64 on: [push, pull_request] env: - core_id: dolphin_libretro + core_id: parallel_gamecubewii_libretro jobs: build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - name: "Ubuntu x64" - os: ubuntu-latest - ZIP_NAME_SUFFIX: linux_x64 + runs-on: ubuntu-latest steps: - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y cmake ninja-build pkg-config \ - libasound2-dev \ - libx11-dev libxi-dev libxrandr-dev libudev-dev libevdev-dev \ - libegl1-mesa-dev libgl1-mesa-dev \ - libmbedtls-dev libcurl4-openssl-dev zlib1g-dev - - - name: Checkout Dolphin (libretro) repo + - name: Checkout parallel-gamecubewii repo uses: actions/checkout@v6 with: path: ${{ env.core_id }} submodules: recursive - - name: Configure - run: | - cd ${{ env.core_id }} - mkdir -p build && cd build - cmake .. \ - -DLIBRETRO=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install - - name: Build run: | - cd ${{ env.core_id }}/build + cd ${{ env.core_id }} make -j$(nproc) diff --git a/.github/workflows/build-windows-ming-libretro.yml b/.github/workflows/build-windows-ming-libretro.yml index ec9bd87145..32e1b3dc43 100644 --- a/.github/workflows/build-windows-ming-libretro.yml +++ b/.github/workflows/build-windows-ming-libretro.yml @@ -1,49 +1,27 @@ -name: Build Dolphin (libretro) for Windows (MinGW on Ubuntu) +name: Build parallel_gamecubewii (libretro) for Windows (MinGW on Ubuntu) on: [push, pull_request] env: - core_id: dolphin_libretro + core_id: parallel_gamecubewii_libretro jobs: - build-windows-mingw: + build: runs-on: ubuntu-latest container: ubuntu:25.10 steps: - name: Install dependencies run: | apt update - apt install -y git cmake ninja-build pkg-config \ - mingw-w64 + apt install -y git make mingw-w64 - - name: Checkout Dolphin (libretro) repo + - name: Checkout parallel-gamecubewii repo uses: actions/checkout@v6 with: path: ${{ env.core_id }} submodules: recursive - - name: Configure (MinGW cross-compile) - run: | - cd ${{ env.core_id }} - export PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig - export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/share/pkgconfig - export PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32 - mkdir -p build && cd build - cmake .. \ - -DLIBRETRO=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_SYSTEM_PROCESSOR=x86_64 \ - -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ - -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ - -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \ - -DCMAKE_FIND_ROOT_PATH=/usr/x86_64-w64-mingw32 \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -G Ninja - - name: Build run: | - cd ${{ env.core_id }}/build - ninja -j$(nproc) + cd ${{ env.core_id }} + make -j$(nproc) CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix diff --git a/.github/workflows/build-windows-msvc-libretro.yml b/.github/workflows/build-windows-msvc-libretro.yml deleted file mode 100644 index 68814502ed..0000000000 --- a/.github/workflows/build-windows-msvc-libretro.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Build Dolphin (libretro) on Windows (MSVC) - -on: [push, pull_request] - -env: - core_id: dolphin_libretro - -jobs: - build-windows: - runs-on: windows-latest - steps: - - name: Install dependencies - run: | - choco install cmake ninja git - - name: Checkout Dolphin (libretro) repo - uses: actions/checkout@v6 - with: - path: ${{ env.core_id }} - submodules: recursive - - - name: Configure (MSVC) - run: | - cd ${{ env.core_id }} - mkdir build && cd build - cmake .. -DLIBRETRO=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 18 2026" -A x64 - - - name: Build - run: | - cmake --build ${{ env.core_id }}/build --config Release --parallel diff --git a/.gitignore b/.gitignore index 545753d7d4..f1c45af685 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,6 @@ Thumbs.db 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/ @@ -26,8 +24,6 @@ Source/Core/Common/scmrev.h *.VC.db .vs*/ /Source/enc_temp_folder/ -# Ignore build info file created by QtCreator -CMakeLists.txt.user # Ignore files created by posix people *~ # Ignore vim swapfiles @@ -46,8 +42,6 @@ CMakeLists.txt.user # clangd cache for Neovim .cache/clangd -# Ignore CMake user presets -CMakeUserPresets.json # Ignore the libretro core built by the static Makefile /parallel_gamecubewii_libretro*.so /parallel_gamecubewii_libretro*.dll diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 719c614c45..3e4e6487d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,45 +8,48 @@ .core-defs: variables: GIT_SUBMODULE_STRATEGY: recursive - CORENAME: dolphin - CORE_ARGS: -DLIBRETRO=ON -DENABLE_LTO=ON - + CORENAME: parallel_gamecubewii + # Inclusion templates, required for the build to work include: ################################## DESKTOPS ################################ # Windows - project: 'libretro-infrastructure/ci-templates' - file: '/windows-cmake-mingw.yml' + file: '/windows-x64-mingw.yml' # Linux 64-bit - project: 'libretro-infrastructure/ci-templates' - file: '/linux-cmake.yml' + file: '/linux-x64.yml' + + # Linux ARM 64-bit + - project: 'libretro-infrastructure/ci-templates' + file: '/linux-aarch64.yml' # MacOS x64 - project: 'libretro-infrastructure/ci-templates' - file: 'osx-cmake-x86.yml' + file: '/osx-x64.yml' # MacOS arm64 - project: 'libretro-infrastructure/ci-templates' - file: 'osx-cmake-arm64.yml' + file: '/osx-arm64.yml' ################################## CELLULAR ################################ # Android - project: 'libretro-infrastructure/ci-templates' - file: '/android-cmake.yml' + file: '/android-make.yml' # iOS arm64 - project: 'libretro-infrastructure/ci-templates' - file: '/ios-cmake.yml' + file: '/ios-arm64.yml' # tvOS arm64 - project: 'libretro-infrastructure/ci-templates' - file: '/tvos-cmake.yml' + file: '/tvos-arm64.yml' ################################## MISC #################################### # webOS aarch64 - project: 'libretro-infrastructure/ci-templates' - file: '/webos-cmake.yml' + file: '/webos-make.yml' # Stages for building stages: @@ -61,20 +64,13 @@ stages: # Windows 64-bit libretro-build-windows-x64: extends: - - .libretro-windows-cmake-x86_64 + - .libretro-windows-x64-mingw-make-default - .core-defs - image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-mxe-win-cross-cores:gcc16 - variables: - EXTRA_PATH: Binaries - before_script: - - export NUMPROC=$(($(nproc)/5)) - - if builtin type -P ccache &> /dev/null; then ccache -V &> /dev/null; fi - - mv /usr/lib/mxe/usr/x86_64-w64-mingw32.static/lib/libcurl.a . # Linux 64-bit libretro-build-linux-x64: extends: - - .libretro-linux-cmake-x86_64 + - .libretro-linux-x64-make-default - .core-defs image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports variables: @@ -84,7 +80,7 @@ libretro-build-linux-x64: # Linux ARM 64-bit libretro-build-linux-aarch64: extends: - - .libretro-linux-cmake-aarch64 + - .libretro-linux-aarch64-make-default - .core-defs variables: CC: /usr/bin/gcc-14 @@ -95,63 +91,49 @@ libretro-build-osx-x64: tags: - mac-apple-silicon extends: - - .libretro-osx-cmake-x86 + - .libretro-osx-x64-make-default - .core-defs variables: - CORE_ARGS: -DLIBRETRO=ON -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=x86_64 + arch: x86_64 # macOS arm64 libretro-build-osx-arm64: extends: - - .libretro-osx-cmake-arm64 + - .libretro-osx-arm64-make-default - .core-defs ################################### CELLULAR ################################# # Android ARMv8a android-arm64-v8a: extends: - - .libretro-android-cmake-arm64-v8a + - .libretro-android-make-arm64-v8a - .core-defs -# Android ARMv7a (for play only) -#android-armeabi-v7a: -# extends: -# - .libretro-android-cmake-armeabi-v7a -# - .core-defs -# variables: -# API_LEVEL: 24 -# CORE_ARGS: -DLIBRETRO=ON -DENABLE_LTO=ON -DENABLE_GENERIC=ON - # Android x86_64 (for play only) android-x86_64: extends: - - .libretro-android-cmake-x86_64 + - .libretro-android-make-x86_64 - .core-defs - variables: - API_LEVEL: 24 - CORE_ARGS: -DLIBRETRO=ON -DENABLE_LTO=ON # iOS arm64 libretro-build-ios-arm64: extends: - - .libretro-ios-cmake-arm64 + - .libretro-ios-arm64-make-default - .core-defs variables: - CMAKE_ADDL_COMP_FLAGS: "" - IOS_MINVER: 14.0 + IOS_MINVER: "14.0" # tvOS arm64 libretro-build-tvos-arm64: extends: - - .libretro-tvos-cmake-arm64 + - .libretro-tvos-arm64-make-default - .core-defs variables: - CMAKE_ADDL_COMP_FLAGS: "" - MINVER: 14.0 + MINVER: "14.0" ################################## MISC #################################### # webOS aarch64 libretro-build-webos-aarch64: extends: - - .libretro-webos-cmake-aarch64 + - .libretro-webos-aarch64-make-default - .core-defs diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py deleted file mode 100755 index 879b80ae09..0000000000 --- a/BuildMacOSUniversalBinary.py +++ /dev/null @@ -1,392 +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, - - # Whether CCache is used for the build or not. - "ccache": False, - - # 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( - "--ccache", - help="Enables CCache", - action=argparse.BooleanOptionalAction, - default=conf["ccache"]) - - 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'], - # Distributable bundles need to be postprocessed to embed dependencies - "-DPOSTPROCESS_BUNDLE=ON", - # 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", - "-DENABLE_CCACHE=" - + python_to_cmake_bool(config["ccache"]), - ], - 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) diff --git a/CMake/CCache.cmake b/CMake/CCache.cmake deleted file mode 100644 index cfb29e2101..0000000000 --- a/CMake/CCache.cmake +++ /dev/null @@ -1,13 +0,0 @@ -find_program(CCACHE_BIN NAMES ccache sccache) -if(CCACHE_BIN) - set(_CCACHE_SUPPORTED_LAUCHERS C CXX OBJC OBJCXX) - foreach(LAUNCHER ${_CCACHE_SUPPORTED_LAUCHERS}) - if (NOT CMAKE_${LAUNCHER}_COMPILER_LAUNCHER MATCHES "ccache") - list(INSERT CMAKE_${LAUNCHER}_COMPILER_LAUNCHER 0 ${CCACHE_BIN}) - endif() - # ccache uses -I when compiling without preprocessor, which makes clang complain. - if("${CMAKE_${LAUNCHER}_COMPILER_ID}" MATCHES "Clang") - set(CMAKE_${LAUNCHER}_FLAGS "${CMAKE_${LAUNCHER}_FLAGS} -Qunused-arguments -fcolor-diagnostics") - endif() - endforeach() -endif() diff --git a/CMake/CheckAndAddFlag.cmake b/CMake/CheckAndAddFlag.cmake deleted file mode 100644 index 4fe7d5be18..0000000000 --- a/CMake/CheckAndAddFlag.cmake +++ /dev/null @@ -1,58 +0,0 @@ -include(CheckCCompilerFlag) -include(CheckCXXCompilerFlag) - -# check_add_add_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_ and FLAG_CXX_ -# 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 "$") - elseif(ARGV2 STREQUAL "NO_DEBINFO_ONLY") - set(genexp_config_test "$,$>>") - elseif(ARGV2 STREQUAL "RELEASE_ONLY") - set(genexp_config_test "$>") - elseif(ARGV2) - message(FATAL_ERROR "check_and_add_flag called with incorrect arguments: ${ARGN}") - endif() - - set(is_c "$") - set(is_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("$<$:${flag}>") - endif() - - check_cxx_compiler_flag("${test_flags_cxx}${flag}" FLAG_CXX_${var}) - if(FLAG_CXX_${var}) - add_compile_options("$<$:${flag}>") - endif() -endfunction() diff --git a/CMake/CheckLib.cmake b/CMake/CheckLib.cmake deleted file mode 100644 index ba6b8bf0aa..0000000000 --- a/CMake/CheckLib.cmake +++ /dev/null @@ -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() - diff --git a/CMake/DolphinCompileDefinitions.cmake b/CMake/DolphinCompileDefinitions.cmake deleted file mode 100644 index 3818ded0df..0000000000 --- a/CMake/DolphinCompileDefinitions.cmake +++ /dev/null @@ -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($<$: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 "$") - elseif(last_def STREQUAL "RELEASE_ONLY") - set(genexp_config_test "$>") - else() - list(APPEND defs ${last_def}) - endif() - - set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS - "$<${genexp_config_test}:${defs}>") -endfunction() diff --git a/CMake/DolphinDisableWarningsMSVC.cmake b/CMake/DolphinDisableWarningsMSVC.cmake deleted file mode 100644 index dbd3553762..0000000000 --- a/CMake/DolphinDisableWarningsMSVC.cmake +++ /dev/null @@ -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() diff --git a/CMake/DolphinInjectVersionInfo.cmake b/CMake/DolphinInjectVersionInfo.cmake deleted file mode 100644 index 94d9b43873..0000000000 --- a/CMake/DolphinInjectVersionInfo.cmake +++ /dev/null @@ -1,24 +0,0 @@ -function(dolphin_inject_version_info target) - set(INFO_PLIST_PATH "$/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() diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake deleted file mode 100644 index 99f5f7f8f4..0000000000 --- a/CMake/DolphinLibraryTools.cmake +++ /dev/null @@ -1,171 +0,0 @@ -include(CheckCXXSourceCompiles) -include(CheckCXXSymbolExists) - -# 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_set_library_type library type) - if(DEFINED ${library}_TYPE AND NOT ${${library}_TYPE} STREQUAL "${type}") - message(FATAL_ERROR - "The selection for ${library} changed from '${${library}_TYPE}' to '${type}' after configuration.\n" - "Please delete the build directory (or at least CMakeCache.txt) and reconfigure." - ) - endif() - - set(${library}_TYPE "${type}" CACHE INTERNAL "") -endfunction() - -function(dolphin_find_optional_system_library library bundled_path) - dolphin_optional_system_library(use_system ${library}) - string(TOUPPER ${library} upperlib) - if(use_system) - # Try a list of versions - # Will be obsoleted if cmake ever fixes https://gitlab.kitware.com/cmake/cmake/-/issues/26477 - if("DOLPHIN_TRY_VERSIONS" IN_LIST ARGN) - list(FIND ARGN DOLPHIN_TRY_VERSIONS versions_idx) - list(REMOVE_AT ARGN ${versions_idx}) - # Extract list of version-like elements from ARGN into version_list - set(version_list) - while(TRUE) - list(LENGTH ARGN len) - if(len EQUAL versions_idx) - break() - endif() - LIST(GET ARGN ${versions_idx} ver) - if(ver MATCHES "^[0-9]+(\\.[0-9]+)*$") - list(APPEND version_list "${ver}") - list(REMOVE_AT ARGN ${versions_idx}) - else() - break() - endif() - endwhile() - # Quietly check all the listed versions - foreach(version IN LISTS version_list) - find_package(${library} ${version} ${ARGN} QUIET) - if(${library}_FOUND) - break() - endif() - endforeach() - # If none were found, find_package one version loudly so the user sees - if(NOT ${library}_FOUND) - list(GET version_list 0 first_version) - find_package(${library} ${first_version} ${ARGN}) - endif() - else() - find_package(${library} ${ARGN}) - endif() - - # 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) - dolphin_set_library_type(${library} "System") - message(STATUS "Using system ${library}") - else() - dolphin_set_library_type(${library} "Bundled") - dolphin_add_bundled_library(${library} ${use_system} ${bundled_path}) - 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) - dolphin_set_library_type(${library} "System") - message(STATUS "Using system ${library}") - dolphin_alias_library(${alias} PkgConfig::${library}) - else() - dolphin_set_library_type(${library} "Bundled") - dolphin_add_bundled_library(${library} ${use_system} ${bundled_path}) - endif() -endfunction() - -function(dolphin_check_toolset_version LABEL VERSION_VAR MIN_VERSION) - if(NOT DEFINED ${VERSION_VAR}) - return() - endif() - message(STATUS "Using ${LABEL} ${${VERSION_VAR}}") - if(${VERSION_VAR} VERSION_LESS ${MIN_VERSION}) - message(FATAL_ERROR "Requires ${LABEL} ${MIN_VERSION} or higher") - endif() -endfunction() - - -function(dolphin_check_std_version LABEL VERSION_MACRO MIN_VERSION) - check_cxx_symbol_exists(${VERSION_MACRO} version IS_${LABEL}) - if(NOT IS_${LABEL}) - return() - endif() - check_cxx_source_compiles([[ - #include - #if ${VERSION_MACRO} < ${MIN_VERSION} - #error - #endif - int main(){} - ]] HAS_MINIMUM_${LABEL}) - if(NOT HAS_MINIMUM_${LABEL}) - message(FATAL_ERROR "Requires ${LABEL} ${MIN_VERSION} or higher") - endif() -endfunction() diff --git a/CMake/DolphinPostprocessBundle.cmake b/CMake/DolphinPostprocessBundle.cmake deleted file mode 100644 index 83cee8c971..0000000000 --- a/CMake/DolphinPostprocessBundle.cmake +++ /dev/null @@ -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=$" - -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}") diff --git a/CMake/DolphinSymlinkOrCopy.cmake b/CMake/DolphinSymlinkOrCopy.cmake deleted file mode 100644 index dd712cb266..0000000000 --- a/CMake/DolphinSymlinkOrCopy.cmake +++ /dev/null @@ -1,20 +0,0 @@ -if(NOT DEFINED target OR NOT DEFINED link) - message(FATAL_ERROR "`target` and `link` must be defined") -endif() - -file(CREATE_LINK "${target}" "${link}" RESULT result SYMBOLIC) -if(result EQUAL 0) - return() -endif() - -if(WIN32) - set(hint "On Windows, enable Developer Mode to allow symlinks (https://learn.microsoft.com/windows/advanced-settings/developer-mode).") -endif() -message(WARNING "Symlink failed (${result}). Falling back to copying. ${hint}") - -file(REMOVE_RECURSE "${link}") -if(IS_DIRECTORY "${target}") - file(COPY "${target}/." DESTINATION "${link}") -else() - file(COPY_FILE "${target}" "${link}" ONLY_IF_DIFFERENT) -endif() diff --git a/CMake/DolphinToolchain.cmake b/CMake/DolphinToolchain.cmake deleted file mode 100644 index fb08c68fec..0000000000 --- a/CMake/DolphinToolchain.cmake +++ /dev/null @@ -1,50 +0,0 @@ -set(ARCH "generic" CACHE STRING "Target architecture") - -set(VALID_ARCHS x86_64 arm64 generic) -if(NOT ARCH IN_LIST VALID_ARCHS) - message(FATAL_ERROR "Invalid ARCH='${ARCH}'. Valid: ${VALID_ARCHS}") -endif() - -if(ARCH STREQUAL "generic") - set(ENABLE_GENERIC "ON") -else() - set(CMAKE_SYSTEM_PROCESSOR "${ARCH}") -endif() - -if (NOT DEFINED CMAKE_SYSTEM_NAME) - if(EXISTS "${CMAKE_SYSROOT}/usr/include/linux") - set(CMAKE_SYSTEM_NAME Linux) - elseif(EXISTS "${CMAKE_SYSROOT}/Windows/System32") - set(CMAKE_SYSTEM_NAME Windows) - elseif(EXISTS "${CMAKE_SYSROOT}/System/Library") - set(CMAKE_SYSTEM_NAME Darwin) - elseif(EXISTS "${CMAKE_SYSROOT}/usr/include/osreldate.h") - set(CMAKE_SYSTEM_NAME FreeBSD) - elseif(EXISTS "${CMAKE_SYSROOT}/usr/include/c++/v1/__locale_dir/locale_base_api/openbsd.h") - set(CMAKE_SYSTEM_NAME OpenBSD) - elseif(EXISTS "${CMAKE_SYSROOT}/usr/include/dev/dm/netbsd-dm.h") - set(CMAKE_SYSTEM_NAME NetBSD) - elseif(EXISTS "${CMAKE_SYSROOT}/boot/system/develop") - set(CMAKE_SYSTEM_NAME Haiku) - else() - message(WARNING "Cannot detect OS from sysroot '${CMAKE_SYSROOT}/'. Cross-compilation has been disabled.") - endif() -endif() - -set(CMAKE_FIND_ROOT_PATH "${CMAKE_SYSROOT}") -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - -if(NOT QT_HOST_PATH) - if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") - if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "AMD64") - set(QT_HOST_PATH "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.8.3/x64") - else() - set(QT_HOST_PATH "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.8.3/ARM64") - endif() - else() - set(QT_HOST_PATH "/usr") - endif() -endif() diff --git a/CMake/FindALSA.cmake b/CMake/FindALSA.cmake deleted file mode 100644 index 45e2bccdf4..0000000000 --- a/CMake/FindALSA.cmake +++ /dev/null @@ -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) diff --git a/CMake/FindBacktrace.cmake b/CMake/FindBacktrace.cmake deleted file mode 100644 index eb93cef977..0000000000 --- a/CMake/FindBacktrace.cmake +++ /dev/null @@ -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) diff --git a/CMake/FindBlueZ.cmake b/CMake/FindBlueZ.cmake deleted file mode 100644 index 3b80a703ae..0000000000 --- a/CMake/FindBlueZ.cmake +++ /dev/null @@ -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) diff --git a/CMake/FindCUBEB.cmake b/CMake/FindCUBEB.cmake deleted file mode 100644 index 3b9235c836..0000000000 --- a/CMake/FindCUBEB.cmake +++ /dev/null @@ -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() diff --git a/CMake/FindEGL.cmake b/CMake/FindEGL.cmake deleted file mode 100644 index 43e4a1a9f5..0000000000 --- a/CMake/FindEGL.cmake +++ /dev/null @@ -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) diff --git a/CMake/FindFFmpeg.cmake b/CMake/FindFFmpeg.cmake deleted file mode 100644 index 681e57ad47..0000000000 --- a/CMake/FindFFmpeg.cmake +++ /dev/null @@ -1,165 +0,0 @@ -# FindFFmpeg -# ---------- -# -# Find the native FFmpeg includes and libraries -# -# This module defines the following variables: -# -# FFmpeg_INCLUDE_: where to find .h -# FFmpeg_LIBRARY_: where to find the 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::: Target to use 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...). -# -# 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) diff --git a/CMake/FindHIDAPI.cmake b/CMake/FindHIDAPI.cmake deleted file mode 100644 index 422a894902..0000000000 --- a/CMake/FindHIDAPI.cmake +++ /dev/null @@ -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) diff --git a/CMake/FindIconv.cmake b/CMake/FindIconv.cmake deleted file mode 100644 index d0b86fc7cb..0000000000 --- a/CMake/FindIconv.cmake +++ /dev/null @@ -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 - #include - 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() diff --git a/CMake/FindLIBEVDEV.cmake b/CMake/FindLIBEVDEV.cmake deleted file mode 100644 index 3edfbca188..0000000000 --- a/CMake/FindLIBEVDEV.cmake +++ /dev/null @@ -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 ) diff --git a/CMake/FindLIBMGBA.cmake b/CMake/FindLIBMGBA.cmake deleted file mode 100644 index ab56c85aa7..0000000000 --- a/CMake/FindLIBMGBA.cmake +++ /dev/null @@ -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() diff --git a/CMake/FindLIBUDEV.cmake b/CMake/FindLIBUDEV.cmake deleted file mode 100644 index aa4aba04e3..0000000000 --- a/CMake/FindLIBUDEV.cmake +++ /dev/null @@ -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 ) diff --git a/CMake/FindLZO.cmake b/CMake/FindLZO.cmake deleted file mode 100644 index c7e08c6bf3..0000000000 --- a/CMake/FindLZO.cmake +++ /dev/null @@ -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() diff --git a/CMake/FindLibUSB.cmake b/CMake/FindLibUSB.cmake deleted file mode 100644 index 54403b7aec..0000000000 --- a/CMake/FindLibUSB.cmake +++ /dev/null @@ -1,55 +0,0 @@ -# - Find libusb-1.0 library -# This module defines -# LIBUSB_INCLUDE_DIR, where to find bluetooth.h -# LIBUSB_LIBRARIES, the libraries needed to use libusb-1.0. -# LIBUSB_FOUND, If false, do not try to use libusb-1.0. -# -# Copyright (c) 2009, Michal Cihar, -# -# vim: expandtab sw=4 ts=4 sts=4: - -if(ANDROID) - set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") - message(STATUS "libusb-1.0 not found.") - return() -endif() - -if(TARGET LibUSB::LibUSB) - return() -endif() - -if(NOT LIBUSB_FOUND) - pkg_check_modules(LIBUSB_PKG libusb-1.0) - - find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h - PATHS - ${LIBUSB_PKG_INCLUDE_DIRS} - /usr/include/libusb-1.0 - /usr/include - /usr/local/include/libusb-1.0 - /usr/local/include - ) - - find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb - PATHS - ${LIBUSB_PKG_LIBRARY_DIRS} - /usr/lib - /usr/local/lib - ) - - mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) -endif() - - -if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) - add_library(LibUSB::LibUSB UNKNOWN IMPORTED) - set_target_properties(LibUSB::LibUSB PROPERTIES - IMPORTED_LOCATION "${LIBUSB_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${LIBUSB_INCLUDE_DIR}" - ) - set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found") - message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}") -else() - set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") - message(STATUS "libusb-1.0 not found.") -endif() diff --git a/CMake/FindMBEDTLS.cmake b/CMake/FindMBEDTLS.cmake deleted file mode 100644 index 0438c2449e..0000000000 --- a/CMake/FindMBEDTLS.cmake +++ /dev/null @@ -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() diff --git a/CMake/FindMINIUPNPC.cmake b/CMake/FindMINIUPNPC.cmake deleted file mode 100644 index 72c2dd0c6e..0000000000 --- a/CMake/FindMINIUPNPC.cmake +++ /dev/null @@ -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() diff --git a/CMake/FindOpenAL.cmake b/CMake/FindOpenAL.cmake deleted file mode 100644 index 9fc2fadad1..0000000000 --- a/CMake/FindOpenAL.cmake +++ /dev/null @@ -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 -# 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 . -# -# 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) diff --git a/CMake/FindOpenSLES.cmake b/CMake/FindOpenSLES.cmake deleted file mode 100644 index b50efc6067..0000000000 --- a/CMake/FindOpenSLES.cmake +++ /dev/null @@ -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 ) diff --git a/CMake/FindPowerShell.cmake b/CMake/FindPowerShell.cmake deleted file mode 100644 index c0e92a269e..0000000000 --- a/CMake/FindPowerShell.cmake +++ /dev/null @@ -1,4 +0,0 @@ -find_program(POWERSHELL_EXE NAMES powershell) - -INCLUDE(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PowerShell DEFAULT_MSG POWERSHELL_EXE) diff --git a/CMake/FindPulseAudio.cmake b/CMake/FindPulseAudio.cmake deleted file mode 100644 index bebbed3e11..0000000000 --- a/CMake/FindPulseAudio.cmake +++ /dev/null @@ -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) diff --git a/CMake/FindSFML.cmake b/CMake/FindSFML.cmake deleted file mode 100644 index ba2a92736b..0000000000 --- a/CMake/FindSFML.cmake +++ /dev/null @@ -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() diff --git a/CMake/FindSYSTEMD.cmake b/CMake/FindSYSTEMD.cmake deleted file mode 100644 index c0eab93c31..0000000000 --- a/CMake/FindSYSTEMD.cmake +++ /dev/null @@ -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 -) diff --git a/CMake/Findpugixml.cmake b/CMake/Findpugixml.cmake deleted file mode 100644 index e026b8d32d..0000000000 --- a/CMake/Findpugixml.cmake +++ /dev/null @@ -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() diff --git a/CMake/FlagsOverride.cmake b/CMake/FlagsOverride.cmake deleted file mode 100644 index d52cf4b153..0000000000 --- a/CMake/FlagsOverride.cmake +++ /dev/null @@ -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() diff --git a/CMake/GenerateAchievementHash.cmake b/CMake/GenerateAchievementHash.cmake deleted file mode 100644 index 5f62e43f72..0000000000 --- a/CMake/GenerateAchievementHash.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# This file exists to be consumed via `add_custom_command` -# so that file changes are picked up without needing a full reconfigure - -file(SHA1 ${JSON_FILE} ACHIEVEMENT_APPROVED_LIST_HASH) -configure_file(${TEMPLATE_FILE} ${OUTPUT_FILE} @ONLY) diff --git a/CMake/RemoveCompileFlag.cmake b/CMake/RemoveCompileFlag.cmake deleted file mode 100644 index e29ae38631..0000000000 --- a/CMake/RemoveCompileFlag.cmake +++ /dev/null @@ -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() diff --git a/CMake/ScmRevGen.cmake b/CMake/ScmRevGen.cmake deleted file mode 100644 index dd9bea0c0d..0000000000 --- a/CMake/ScmRevGen.cmake +++ /dev/null @@ -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 "2609") -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() diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 01b03ecee5..0000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,974 +0,0 @@ -######################################## -# General setup -# -cmake_minimum_required(VERSION 3.25...4.2.1) - -cmake_policy(SET CMP0080 OLD) # allow using BundleUtilities at configure time - -# Minimum OS X version. -# This is inserted into the Info.plist as well. -set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0.0" CACHE STRING "") - -# When we don't set a sysroot, AppleClang will put /usr/local/include at a higher -# priority than -isystem paths, which can cause weird include issues in Externals -if(NOT IOS AND NOT TVOS) - set(CMAKE_OSX_SYSROOT macosx CACHE STRING "") -endif( ) -set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/CMake/FlagsOverride.cmake") - -# CMake 3.28 and later scan c++ source files for module imports by default. Since we don't use -# modules scanning is pointless, so disable it. This also prevents Clang from generating an error -# if the clang-scan-deps tool isn't installed: -# "CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND: not found". -set(CMAKE_CXX_SCAN_FOR_MODULES OFF) - -project(dolphin-emu) - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake) - -# Support functions -include(CheckAndAddFlag) -include(CheckCCompilerFlag) -include(CheckSymbolExists) -include(DolphinCompileDefinitions) -include(DolphinDisableWarningsMSVC) -include(DolphinLibraryTools) -include(GNUInstallDirs) -include(RemoveCompileFlag) - -# When using the Visual Studio generator, only show our targets and not the ones from Externals. -set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT dolphin-emu) - -if (MSVC) - set(CMAKE_C_STANDARD 99) - set(CMAKE_CXX_STANDARD 23) - set(CMAKE_CXX_STANDARD_REQUIRED ON) -endif() - -set(COMPILER ${CMAKE_CXX_COMPILER_ID}) -if (COMPILER STREQUAL "GNU") - set(COMPILER "GCC") # prefer printing GCC instead of GNU -endif() - -# Minimum required versions -# Toolsets -set(Xcode_min_version 14.3) -set(MSVC_toolset_min_version 143) -# Compilers -set(GCC_min_version 12) -set(Clang_min_version 15) -set(AppleClang_min_version 14.0.3) -set(MSVC_min_version 19.32) -# Standard libraries -set(libstdc++_min_version 12) # This should match GCC_min_version's major version. -set(libc++_min_version 150000) # This should match Clang_min_version in the format "xxyyzz" instead of "xx.yy.zz" - -dolphin_check_toolset_version("Xcode" XCODE_VERSION ${Xcode_min_version}) -dolphin_check_toolset_version("MSVC Toolset" MSVC_TOOLSET_VERSION ${MSVC_toolset_min_version}) - -message(STATUS "Using ${COMPILER} ${CMAKE_CXX_COMPILER_VERSION}") - -if(NOT DEFINED ${COMPILER}_min_version) - message(WARNING "Unknown compiler ${COMPILER}, assuming it is new enough") -elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${${COMPILER}_min_version}) - message(FATAL_ERROR "Requires ${COMPILER} ${${COMPILER}_min_version} or higher") -endif() - -# libstdc++ is almost always used on Linux, even when using clang as the compiler. -# libc++ is used on the likes of Android, Apple devices, FreeBSD, and a few (very) rare Linux distros like Chimera Linux. -# Windows uses its own standard library named STL, which we check as part of the toolset above. (outside of MinGW which can use either libstdc++ or libc++) -dolphin_check_std_version("GNU_libstdc++" _GLIBCXX_RELEASE ${libstdc++_min_version}) -dolphin_check_std_version("LLVM_libc++" _LIBCPP_VERSION ${libc++_min_version}) - -# Name of the Dolphin distributor. If you redistribute Dolphin builds (forks, -# unofficial builds) please consider identifying your distribution with a -# unique name here. -set(DISTRIBUTOR "None" CACHE STRING "Name of the distributor.") - -set(DOLPHIN_DEFAULT_UPDATE_TRACK "" CACHE STRING "Name of the default update track. If empty, disables auto-update.") - -if(UNIX AND NOT APPLE AND NOT ANDROID) - option(ENABLE_X11 "Enables X11 Support" ON) -endif() -if(NOT WIN32 AND NOT APPLE AND NOT HAIKU) - option(ENABLE_EGL "Enables EGL OpenGL Interface" ON) -endif() - -if(NOT ANDROID) - option(ENABLE_CLI_TOOL "Enable dolphin-tool, a CLI-based utility for functions such as managing disc images" ON) -endif() - - -set(USE_SYSTEM_LIBS "AUTO" CACHE STRING "Use system libraries instead of bundled libraries. ON - Always use system and fail if unavailable, OFF - Always use bundled, AUTO - Use system if available, otherwise use bundled. Default is AUTO") -if(APPROVED_VENDORED_DEPENDENCIES) - message(WARNING "APPROVED_VENDORED_DEPENDENCIES is deprecated. Please migrate to setting USE_SYSTEM_LIBS to ON and setting USE_SYSTEM_ to either AUTO or OFF to allow bundled libs.") -endif() -option(USE_UPNP "Enables UPnP port mapping support" ON) -option(ENABLE_NOGUI "Enable NoGUI frontend" OFF) -option(ENABLE_QT "Enable Qt (Default)" ON) -option(ENABLE_LTO "Enables Link Time Optimization" OFF) -option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF) -option(ENABLE_HEADLESS "Enables running Dolphin as a headless variant" OFF) -option(ENABLE_ALSA "Enables ALSA sound backend" ON) -option(ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON) -option(ENABLE_CUBEB "Enables Cubeb sound backend" ON) -option(ENABLE_LLVM "Enables LLVM support, for disassembly" ON) -option(ENABLE_TESTS "Enables building the unit tests" ON) -option(ENABLE_VULKAN "Enables vulkan video backend" ON) -option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current game on Discord" ON) -option(USE_MGBA "Enables GBA controllers emulation using libmgba" ON) -option(ENABLE_AUTOUPDATE "Enables support for automatic updates" ON) -option(USE_RETRO_ACHIEVEMENTS "Enables integration with retroachievements.org" ON) -option(ENABLE_CCACHE "Enables CCache compiler cache" OFF) -option(LIBRETRO "Build as a libretro library" OFF) - -# Maintainers: if you consider blanket disabling this for your users, please -# consider the following points: -# * No data is being sent without explicit user approval (pop up box at first -# launch). -# * The Dolphin team relies on the data in order to understand the behavior -# of our software in the wild. -option(ENABLE_ANALYTICS "Enables opt-in Analytics collection" ON) - -option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON) - -option(ENABLE_GPROF "Enable gprof profiling (must be using Debug build)" OFF) -option(FASTLOG "Enable all logs" OFF) - -if (MSVC) - set(CMAKE_CXX_FLAGS_DEBUG "/MTd") - set(CMAKE_CXX_FLAGS_RELEASE "/MT") -endif() - -# TODO: Add DSPSpy -option(DSPTOOL "Build dsptool" OFF) - -# RetroAchievements developer tools require Windows hooks -if(WIN32) - option(RC_CLIENT_SUPPORTS_RAINTEGRATION "Enables RetroAchievements developer tools" ON) -endif() - -# Enable SDL by default on operating systems that aren't Android. -if(NOT ANDROID) - option(ENABLE_SDL "Enables SDL as a generic controller backend" ON) -else() - option(ENABLE_SDL "Enables SDL as a generic controller backend" OFF) -endif() - -if(APPLE) - enable_language(OBJC) - enable_language(OBJCXX) - option(MACOS_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF) - option(POSTPROCESS_BUNDLE "Postprocess bundle for redistributability" OFF) - # Enable adhoc code signing by default (otherwise makefile builds on ARM will not work) - option(MACOS_CODE_SIGNING "Enable codesigning" ON) - option(USE_BUNDLED_MOLTENVK "Build MoltenVK from Externals with Dolphin-specific patches" ON) - set(MACOS_CODE_SIGNING_IDENTITY "-" CACHE STRING "The identity used for codesigning.") -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - option(ENABLE_VTUNE "Enable Intel VTune integration for JIT code." OFF) - - if(NOT ANDROID) - option(ENABLE_HWDB "Enables the udev hardware database" ON) - option(ENABLE_EVDEV "Enables the evdev controller backend" ON) - endif() -endif() - -# Enable folders for IDE -set_property(GLOBAL PROPERTY USE_FOLDERS ON) - -# Set up paths -set(datadir ${CMAKE_INSTALL_FULL_DATADIR}/dolphin-emu CACHE PATH "datadir") -add_definitions(-DDATA_DIR="${datadir}/") - -if(CMAKE_SYSROOT) - # If we should use a sysroot, tell pkg-config to search for packages in there, not on the host - set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig") - set(ENV{PKG_CONFIG_SYSROOT_DIR} "${CMAKE_SYSROOT}") -endif() - -# Output directory for the Dolphin binary -# We need to use a generator expression here to ensure that multi-config generators -# (like Visual Studio) put the binaries in the right place. -# See https://cmake.org/cmake/help/v4.2/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}/Binaries>) - -# Output directory for PDB files. PDBs are only generated on Windows with MSVC. -# We set a common directory for all PDBs to avoid littering the Binaries/ directory. -set(CMAKE_PDB_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}/pdb>) - -if(ENABLE_CCACHE) - include(CCache) - if(NOT CCACHE_BIN) - message(WARNING "Ccache was enabled but not found. This build will not use Ccache.") - endif() -endif() - -# Architecture detection and arch specific settings -message(STATUS "Detected architecture: ${CMAKE_SYSTEM_PROCESSOR}") - -# Detect 64bit or 32bit -# CMake doesn't provide a simple way to determine 32bit or 64bit -# If we ever support a architecture that is 64bit with 32bit pointers then this'll break -# Of course the chances of that are slim(x32?) so who cares -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(_ARCH_64 1) - add_definitions(-D_ARCH_64=1) -else() - set(_ARCH_32 1) - add_definitions(-D_ARCH_32=1) -endif() - -if(ENABLE_GENERIC) - if(WIN32) - message(FATAL_ERROR "Generic builds are not supported on Windows!") - endif() - message(STATUS "Warning! Building generic build!") - set(_M_GENERIC 1) - add_definitions(-D_M_GENERIC=1) -elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x64|x86_64|amd64|AMD64") - set(_M_X86_64 1) - add_definitions(-D_M_X86_64=1) - check_and_add_flag(HAVE_SSE2 -msse2) -elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64") - set(_M_ARM_64 1) - add_definitions(-D_M_ARM_64=1) - # CRC instruction set is used in the CRC32 hash function - check_and_add_flag(HAVE_ARCH_ARMV8 -march=armv8-a+crc) -else() - message(FATAL_ERROR "You're building on an unsupported platform: " - "'${CMAKE_SYSTEM_PROCESSOR}' with ${CMAKE_SIZEOF_VOID_P}-byte pointers." - " Enable generic build if you really want a JIT-less binary.") -endif() - -if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64") - set(DOLPHIN_HOST ARM64) -elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x64|x86_64|amd64|AMD64") - set(DOLPHIN_HOST x64) -endif() - -if(CMAKE_GENERATOR MATCHES "Ninja") - check_and_add_flag(DIAGNOSTICS_COLOR -fdiagnostics-color) -elseif(CMAKE_GENERATOR MATCHES "Visual Studio") - # Only MSBuild needs this, other generators will compile one file at a time - add_compile_options("/MP") -endif() - -if(MSVC) - check_and_add_flag(EXCEPTIONS /EHsc) - dolphin_compile_definitions(_DEBUG DEBUG_ONLY) - - # Disable RTTI - add_compile_options(/GR-) - - # Set warning level 4 (the highest) - add_compile_options(/W4) - - # Treat all warnings as errors - add_compile_options(/WX) - - # Disable some warnings - add_compile_options( - /wd4201 # nonstandard extension used : nameless struct/union - /wd4127 # conditional expression is constant - /wd4100 # 'identifier' : unreferenced formal parameter - /wd4200 # InputCommon fix temp. - /wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of data - /wd4121 # 'symbol' : alignment of a member was sensitive to packing - /wd4324 # Padding was added at the end of a structure because you specified a __declspec(align) value. - /wd4714 # function 'function' marked as __forceinline not inlined - /wd4351 # new behavior: elements of array 'array' will be default initialized - # TODO: Enable this warning once possible - /wd4245 # conversion from 'type1' to 'type2', signed/unsigned mismatch - # Currently jits use some annoying code patterns which makes this common - ) - - # Additional warnings - add_compile_options( - /w15262 # Unannotated fallthrough between switch labels - /w44263 # Non-virtual member function hides base class virtual function - /w44265 # Class has virtual functions, but destructor is not virtual - /w44946 # Reinterpret cast between related types - ) - - # All files are encoded as UTF-8 - add_compile_options(/utf-8) - - # Ignore warnings in external headers - add_compile_options(/external:anglebrackets) - add_compile_options(/external:W0) - add_compile_options(/external:templates-) - - # Request deterministic builds - add_compile_options(/experimental:deterministic) - add_link_options(/experimental:deterministic) - - # Enable function-level linking - add_compile_options(/Gy) - # Generate intrinsic functions - add_compile_options(/Oi) - # Enable buffer security check on Debug, disable otherwise - add_compile_options($,/GS,/GS->) - # Remove unreferenced inline functions/data to reduce link time and catch bugs - # Note: In msbuild build, this gets set by msbuild by default - add_compile_options(/Zc:inline) - # Fix various other non-conformant behaviors - add_compile_options(/Zc:__cplusplus,enumTypes,externConstexpr,preprocessor,templateScope,throwingNew) - # Enforce strict volatile semantics as per ISO C++ - add_compile_options(/volatile:iso) - - # Use 'precise' floating point model - add_compile_options(/fp:precise) - - string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT") - # Generate debug data - string(APPEND CMAKE_EXE_LINKER_FLAGS " /DEBUG") - # Eliminate dead code and data - string(APPEND CMAKE_EXE_LINKER_FLAGS " /OPT:REF /OPT:ICF") -else() - add_definitions(-D_DEFAULT_SOURCE) - - # gcc uses some optimizations which might break stuff without this flag - check_and_add_flag(NO_STRICT_ALIASING -fno-strict-aliasing) - check_and_add_flag(NO_EXCEPTIONS -fno-exceptions) - - check_and_add_flag(VISIBILITY_INLINES_HIDDEN -fvisibility-inlines-hidden) - check_and_add_flag(VISIBILITY_HIDDEN -fvisibility=hidden) - - check_and_add_flag(FOMIT_FRAME_POINTER -fomit-frame-pointer NO_DEBINFO_ONLY) - - dolphin_compile_definitions(_DEBUG DEBUG_ONLY) - check_and_add_flag(GGDB -ggdb DEBUG_ONLY) - - if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - # GNU ar: Create thin archive files. - # Requires binutils-2.19 or later. - set(CMAKE_C_ARCHIVE_CREATE " qcTP ") - set(CMAKE_C_ARCHIVE_APPEND " qTP ") - set(CMAKE_CXX_ARCHIVE_CREATE " qcTP ") - set(CMAKE_CXX_ARCHIVE_APPEND " qTP ") - endif() -endif() - -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - if(NOT MACOS_USE_DEFAULT_SEARCH_PATH) - # Hack up the path to prioritize the path to built-in OS libraries to - # increase the chance of not depending on a bunch of copies of them - # installed by MacPorts, Fink, Homebrew, etc, and ending up copying - # them into the bundle. Since we optionally depend on libraries which - # are not part of OS X (ffmpeg, etc.), however, don't remove the default - # path entirely as was done in a previous version of this file. This is - # still kinda evil, since it defeats the user's path settings... - # See http://www.cmake.org/cmake/help/v3.0/command/find_program.html - list(APPEND CMAKE_PREFIX_PATH "/usr") - endif() - - # Prevents Xcode from overriding the -fno-strict-aliasing flag - set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO) - - # Specify target CPUs. - if(_ARCH_64 AND _M_X86_64) - check_and_add_flag(HAVE_MSSSE3 -mssse3) - check_and_add_flag(HAVE_ARCH_CORE2 -march=core2) - endif() - # Linker flags. - # Drop unreachable code and data. - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip,-dead_strip_dylibs") - - # Set FMT_EXCEPTIONS = 0, for consistency with -fno-exceptions earlier. - # If we set only -fno-exceptions, fmt fails to compile when included from - # Objective-C++ because fmt tries try to use throw because __EXCEPTIONS is defined. - add_definitions(-DFMT_EXCEPTIONS=0) - - find_library(APPKIT_LIBRARY AppKit) - find_library(APPSERV_LIBRARY ApplicationServices) - find_library(CARBON_LIBRARY Carbon) - find_library(COCOA_LIBRARY Cocoa) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(CORESERV_LIBRARY CoreServices) - find_library(FORCEFEEDBACK_LIBRARY ForceFeedback) - find_library(FOUNDATION_LIBRARY Foundation) - find_library(IOB_LIBRARY IOBluetooth) - find_library(IOK_LIBRARY IOKit) - find_library(OPENGL_LIBRARY OpenGL) -endif() - -if(ENABLE_LTO) - include(CheckIPOSupported) - check_ipo_supported(RESULT supported OUTPUT error) - - if(supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - else() - message(STATUS "IPO / LTO not supported: <${error}>") - endif() -endif() - -# BSDs put packages in /usr/local instead of /usr, so we need to -# force CMake to look in those directories by default, too. -# All commands and submodule commands also need to see these -# changes, so just setting them in the project scope via -# include_directories and link_directories is not sufficient -if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr/local") - set(CMAKE_REQUIRED_INCLUDES "/usr/local/include") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib") -endif() - -# Dolphin requires threads. -find_package(Threads) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING - "Build type (Release/Debug/RelWithDebInfo/MinSizeRel)" FORCE) -endif() - -if(ENABLE_GPROF) - check_and_add_flag(HAVE_PG -pg) - if(NOT FLAG_C_HAVE_PG) - message(FATAL_ERROR "Compiler option -pg is not supported") - endif() - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") -endif() - -if(FASTLOG) - add_definitions(-DDEBUGFAST) -endif() - -if (MINGW) - add_definitions( - -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 - -DWINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION=0x50000 - ) -endif() - -if(ENABLE_VTUNE) - set(VTUNE_DIR "/opt/intel/vtune_amplifier") - add_definitions(-DUSE_VTUNE) - include_directories("${VTUNE_DIR}/include") - set(VTUNE_LIBRARIES - "${VTUNE_DIR}/lib64/libjitprofiling.a" - "${VTUNE_DIR}/lib64/libittnotify.a" - ) -endif() - -if(ANDROID) - message(STATUS "Building for Android") - if(NOT ENABLE_HEADLESS) - add_definitions(-DANDROID) - if(ENABLE_NOGUI) - message(STATUS "Building Android app, disabling NoGUI frontend.") - set(ENABLE_NOGUI 0) - endif() - else() - # Lie to cmake a bit. We are cross compiling to Android - # but not as a shared library. We want an executable. - set(ANDROID 0) - endif() - set(ENABLE_QT 0) - set(USE_DISCORD_PRESENCE 0) - - # We are cross compiling, search only the toolchain for libraries and includes - SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) -endif() - -if(IOS) - message(STATUS "Building for iOS") - add_definitions(-DIPHONEOS) - add_definitions(-DFMT_EXCEPTIONS=0) -endif() - -if(LIBRETRO) - set(ENABLE_ALSA OFF CACHE BOOL "" FORCE) - set(ENABLE_ANALYTICS OFF CACHE BOOL "" FORCE) - set(ENABLE_AUTOUPDATE OFF CACHE BOOL "" FORCE) - set(ENABLE_CLI_TOOL OFF CACHE BOOL "" FORCE) - set(ENABLE_CUBEB OFF CACHE BOOL "" FORCE) - set(ENABLE_EVDEV OFF CACHE BOOL "" FORCE) - set(ENCODE_FRAMEDUMPS OFF CACHE BOOL "" FORCE) - set(ENABLE_LLVM OFF CACHE BOOL "" FORCE) - set(ENABLE_NOGUI OFF CACHE BOOL "" FORCE) - set(ENABLE_TESTS OFF CACHE BOOL "" FORCE) - set(ENABLE_QT OFF CACHE BOOL "" FORCE) - set(ENABLE_PULSEAUDIO OFF CACHE BOOL "" FORCE) - set(ENABLE_SDL OFF CACHE BOOL "" FORCE) - set(USE_DISCORD_PRESENCE OFF CACHE BOOL "" FORCE) - set(USE_RETRO_ACHIEVEMENTS OFF CACHE BOOL "" FORCE) - set(USE_UPNP OFF CACHE BOOL "" FORCE) - add_definitions(-D__LIBRETRO__) - check_and_add_flag(FPIC -fpic) - if(APPLE) - set(MACOS_CODE_SIGNING OFF CACHE BOOL "" FORCE) - set(USE_BUNDLED_MOLTENVK OFF CACHE BOOL "" FORCE) - set(USE_SYSTEM_LIBS OFF CACHE STRING "" FORCE) - # prevent minizip from finding system libs via pkg-config - set(MZ_FORCE_FETCH_LIBS ON CACHE BOOL "" FORCE) - endif() - if(IOS) - set(MZ_OPENSSL OFF CACHE BOOL "" FORCE) - endif() - if(WIN32) - # Xbox remove dependency on Zlib - set(USE_SYSTEM_ZLIB OFF CACHE BOOL "" FORCE) - endif() - if(CMAKE_CXX_COMPILER MATCHES ".*(arm-webos-linux-gnueabi-|aarch64-webos-linux-gnu).*") - set(WEBOS TRUE CACHE BOOL "Building for webOS") - add_definitions(-D__WEBOS__) - add_definitions(-DSKIP_WIMOTESCANNER_THREAD -DSKIP_GCMEMCARD_THREAD -DSKIP_SAVESTATE_THREAD -DSKIP_NETWORK_WORKER_THREAD) - add_definitions(-DSKIP_ASSETLOADER_THREAD -DSKIP_WICONNECT24_WORKER_THREAD -DSKIP_RESOURCE_WORKER_THREAD -DSKIP_KDSCHEDULER_TIMER_THREAD) - set(ENABLE_VULKAN OFF CACHE BOOL "" FORCE) - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") - remove_definitions(-marm -march=armv7-a) - add_compile_options(-mcpu=cortex-a53 -mfloat-abi=softfp) - endif() - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - message(STATUS "Debug build: enabling extra debug flags") - set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fno-omit-frame-pointer") - set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-omit-frame-pointer") - endif() - set(USE_SYSTEM_CURL OFF CACHE BOOL "" FORCE) - endif() -endif() - -if(ENABLE_HEADLESS) - message(STATUS "Enabling Headless! Disabling GUI.") - set(ENABLE_QT 0) - set(USE_DISCORD_PRESENCE 0) -endif() - -# Set file offset size to 64 bits. On modern Unixes, this is typically already the case. Exceptions: -# -# glibc may default to 32 bits. This can be configured by setting _FILE_OFFSET_BITS=64. -# -# bionic (Android) defaults to 32 bits for 32-bit ABIs. Here too we can use _FILE_OFFSET_BITS=64, -# but only on API 25 and up. Since we're currently supporting older API levels and 32-bit Android -# isn't a build configuration we officially support, let's leave this as it is for now. -# More details: https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md -if(NOT ANDROID AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") - add_definitions(-D_FILE_OFFSET_BITS=64) - add_definitions(-D_LARGEFILE_SOURCE) -endif() - -if(LIBRETRO AND ANDROID AND CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a") - add_definitions(-D_FILE_OFFSET_BITS=64) - add_definitions(-D_LARGEFILE_SOURCE) -endif() - -######################################## -# Dependency checking -# -# TODO: We should have options for dependencies included in the externals to -# override autodetection of system libraries and force the usage of the -# externals. -include(CheckLib) -include(CheckCXXSourceRuns) - -set(OpenGL_GL_PREFERENCE GLVND CACHE STRING "Linux-only: if GLVND, use the vendor-neutral GL libraries (default). If LEGACY, use the legacy ones (might be necessary to have optirun/primusrun work)") -set_property(CACHE OpenGL_GL_PREFERENCE PROPERTY STRINGS GLVND LEGACY) -find_package(OpenGL) -if (OPENGL_GL) - include_directories(${OPENGL_INCLUDE_DIR}) -endif() - -if(ENABLE_X11) - pkg_check_modules(X11 x11 IMPORTED_TARGET) - if(X11_FOUND) - add_definitions(-DHAVE_X11=1) - pkg_check_modules(XRANDR xrandr IMPORTED_TARGET) - if(XRANDR_FOUND) - add_definitions(-DHAVE_XRANDR=1) - endif() - pkg_check_modules(X11_INPUT REQUIRED xi>=1.5.0 IMPORTED_TARGET) - message(STATUS "X11 support enabled") - else() - message(WARNING "X11 support enabled but not found. This build will not support X11.") - endif() -endif() - -if(ENABLE_EGL) - find_package(EGL) - if(EGL_FOUND) - add_definitions(-DHAVE_EGL=1) - message(STATUS "EGL OpenGL interface enabled") - else() - message(WARNING "EGL support enabled but not found. This build will not support EGL.") - endif() -endif() - -if(ENCODE_FRAMEDUMPS) - if(WIN32) - if(_M_X86_64) - set(FFMPEG_DIR Externals/FFmpeg-bin/x64) - elseif(_M_ARM_64) - set(FFMPEG_DIR Externals/FFmpeg-bin/ARM64) - endif() - endif() - find_package(FFmpeg COMPONENTS avcodec avformat avutil swresample swscale) - if(FFmpeg_FOUND) - if(APPLE) - find_library(COREMEDIA_LIBRARY CoreMedia) - find_library(VIDEOTOOLBOX_LIBRARY VideoToolbox) - find_library(COREVIDEO_LIBRARY CoreVideo) - find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox) - endif() - message(STATUS "libav/ffmpeg found, enabling AVI frame dumps") - add_definitions(-DHAVE_FFMPEG) - if(WIN32) - # Our prebuilt binaries depend on Bcrypt - set_property(TARGET FFmpeg::avutil APPEND PROPERTY - INTERFACE_LINK_LIBRARIES "Bcrypt.lib" - ) - endif() - else() - message(STATUS "libav/ffmpeg not found, disabling AVI frame dumps") - endif() -endif() - -if(ENABLE_HWDB) - find_package(LIBUDEV REQUIRED) - if(LIBUDEV_FOUND) - message(STATUS "libudev found, enabling hardware database") - add_definitions(-DHAVE_LIBUDEV=1) - else() - message(FATAL_ERROR "Couldn't find libudev. Can't build hardware database.\nDisable ENABLE_HWDB if you wish to build without hardware database support") - endif() -endif() - -if(ENABLE_EVDEV) - find_package(LIBUDEV REQUIRED) - find_package(LIBEVDEV REQUIRED) - if(LIBUDEV_FOUND AND LIBEVDEV_FOUND) - message(STATUS "libevdev/libudev found, enabling evdev controller backend") - add_definitions(-DHAVE_LIBUDEV=1) - add_definitions(-DHAVE_LIBEVDEV=1) - else() - if(NOT LIBRETRO) - message(FATAL_ERROR "Couldn't find libevdev and/or libudev. Can't build evdev controller backend.\nDisable ENABLE_EVDEV if you wish to build without controller support") - endif() - endif() -endif() - -if(UNIX) - message(STATUS "Using named pipes as controller inputs") - add_definitions(-DUSE_PIPES=1) - message(STATUS "Watching game memory for changes") - add_definitions(-DUSE_MEMORYWATCHER=1) -endif() - -if(ENABLE_ANALYTICS) - message(STATUS "Enabling analytics collection (subject to end-user opt-in)") - add_definitions(-DUSE_ANALYTICS=1) -endif() - -if(ENABLE_AUTOUPDATE) - message(STATUS "Enabling automatic update support") - add_definitions(-DAUTOUPDATE=1) -endif() - -######################################## -# Setup include directories (and make sure they are preferred over the Externals) -# -include_directories(Source/Core) -if(ANDROID) - include_directories(Source/Android) -endif() - -######################################## -# Process externals and setup their include directories -# -# NOTES about adding Externals: -# - If an external provides a target, or one can be introduced with find_package, consider using it. -# - If a target doesn't exist, consider introducing a target for it with add_library and adding all necessary -# includes, definitions, etc, to that target. This way, only libraries that need those attributes simply -# need to link that target in, as opposed to them being provided to every library -# (which is the case with the directory-based include_directories, add_definitions, etc) -# -# - make sure to tell cmake to link them statically or dynamically (most -# should be linked statically) -# - place the CMakeLists.txt in the first-level subdirectory, e.g. -# Externals/zlib/CMakeLists.txt (that is: NOT in some Src/ subdirectory) -# -if (_M_X86_64) - add_subdirectory(Externals/Bochs_disasm) -endif() -add_subdirectory(Externals/cpp-optparse) - -dolphin_find_optional_system_library_pkgconfig(FMT - fmt>=10.1 fmt::fmt Externals/fmt -) - -add_subdirectory(Externals/imgui) -add_subdirectory(Externals/implot) - -dolphin_find_optional_system_library(glslang Externals/glslang DOLPHIN_TRY_VERSIONS 15 16) - -# SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12 -# video backends, and on Apple devices for the Metal video backend. -if(WIN32 OR APPLE) - add_subdirectory(Externals/spirv_cross) -endif() -add_subdirectory(Externals/tinygltf) - -if(ENABLE_VULKAN) - add_definitions(-DHAS_VULKAN) - - if(APPLE AND USE_BUNDLED_MOLTENVK) - add_subdirectory(Externals/MoltenVK) - endif() - - - if (ANDROID AND _M_ARM_64) - add_subdirectory(Externals/libadrenotools) - endif() -endif() - -if(NOT (WIN32 AND _M_ARM_64)) - # OpenGL is available on all platforms except windows-arm64 - add_definitions(-DHAS_OPENGL) -endif() - -if(NOT WIN32) - if(ANDROID) - set(USE_SYSTEM_Iconv OFF) - endif() - dolphin_find_optional_system_library(Iconv Externals/libiconv 1.14) -endif() - -dolphin_find_optional_system_library(pugixml Externals/pugixml) - -dolphin_find_optional_system_library_pkgconfig(ENET libenet>=1.3.18 enet::enet Externals/enet) - -dolphin_find_optional_system_library_pkgconfig(xxhash libxxhash>=0.8.2 xxhash::xxhash Externals/xxhash) - -dolphin_find_optional_system_library(BZip2 Externals/bzip2) - -dolphin_find_optional_system_library(LibLZMA Externals/liblzma) -# Imported target added in CMake 3.14 -dolphin_make_imported_target_if_missing(LibLZMA::LibLZMA LIBLZMA) - -dolphin_find_optional_system_library_pkgconfig(ZSTD libzstd>=1.4.0 zstd::zstd Externals/zstd) - -dolphin_find_optional_system_library_pkgconfig(ZLIB zlib>=1.3.1 ZLIB::ZLIB Externals/zlib-ng) - -dolphin_find_optional_system_library_pkgconfig(minizip-ng - "minizip-ng>=4.0.4" MINIZIP::minizip-ng Externals/minizip-ng -) - -dolphin_find_optional_system_library(LZO Externals/LZO) - -dolphin_find_optional_system_library_pkgconfig(lz4 liblz4>=1.8 LZ4::LZ4 Externals/lz4) - -dolphin_find_optional_system_library_pkgconfig(SPNG spng spng::spng Externals/libspng) - -# Using static FreeSurround from Externals -# There is no system FreeSurround library. -message(STATUS "Using static FreeSurround from Externals") -add_subdirectory(Externals/FreeSurround) - -if (APPLE OR WIN32) - message(STATUS "Using ed25519 from Externals") - add_subdirectory(Externals/ed25519) - include_directories(Externals/ed25519) -endif() - -if(ENABLE_CUBEB) - dolphin_find_optional_system_library(CUBEB Externals/cubeb) - add_definitions(-DHAVE_CUBEB) -endif() - -if(NOT ANDROID AND NOT IOS AND NOT WEBOS) - dolphin_find_optional_system_library(LibUSB Externals/libusb) - add_definitions(-D__LIBUSB__) -endif() - -if(ENABLE_SDL) - dolphin_find_optional_system_library(SDL3 Externals/SDL 3.2.0) - add_definitions(-DHAVE_SDL3) -endif() - -dolphin_find_optional_system_library(SFML Externals/SFML 3.0 COMPONENTS Network System) - -if(USE_UPNP) - dolphin_find_optional_system_library(MINIUPNPC Externals/miniupnpc 1.6) - add_definitions(-DUSE_UPNP) -endif() - -dolphin_find_optional_system_library(MBEDTLS Externals/mbedtls 2.28) - -dolphin_find_optional_system_library(CURL Externals/curl) - -if(NOT ANDROID AND NOT IOS) - dolphin_find_optional_system_library(HIDAPI Externals/hidapi) -endif() - -if(USE_DISCORD_PRESENCE) - message(STATUS "Using static DiscordRPC from Externals") - add_subdirectory(Externals/discord-rpc EXCLUDE_FROM_ALL) - include_directories(Externals/discord-rpc/include) -endif() - -if(USE_MGBA) - dolphin_find_optional_system_library(LIBMGBA Externals/mGBA 0.11) -endif() - -if(LIBRETRO AND TARGET mgba) - set_property(TARGET mgba APPEND PROPERTY COMPILE_DEFINITIONS DISABLE_THREADING) - set_property(TARGET mgba PROPERTY POSITION_INDEPENDENT_CODE ON) -endif() - -find_package(SYSTEMD) -if(SYSTEMD_FOUND) - message(STATUS "libsystemd found, enabling traversal server watchdog support") - add_definitions(-DHAVE_LIBSYSTEMD) -else() - message(STATUS "libsystemd not found, disabling traversal server watchdog support") -endif() - -if (WIN32) - include_directories(Externals/wil/include) - include_directories(Externals/OpenAL/include) -endif() - -include_directories(Externals/picojson) - -add_subdirectory(Externals/expr) - -add_subdirectory(Externals/FatFs) - -if (USE_RETRO_ACHIEVEMENTS) - add_subdirectory(Externals/rcheevos) -endif() - -if (NOT IOS) - add_subdirectory(Externals/watcher) -endif() - -# Any other platform or BSD is currently unsupported by cpp-ipc -if(WIN32 OR LINUX OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "QNX") - add_subdirectory(Externals/cpp-ipc) - add_definitions(-DHAVE_CPPIPC) -endif() - -######################################## -# Pre-build events: Define configuration variables and write SCM info header -# - -# Remove in-tree revision information generated by Visual Studio -# This is because the compiler will check in-tree first and use this, even if it is outdated -file(REMOVE "${PROJECT_SOURCE_DIR}/Source/Core/Common/scmrev.h") - -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common) -if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h) - file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h) -endif() - -if(APPLE) - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core) - if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/VersionInfo.plist) - file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/VersionInfo.plist) - endif() -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Flatpak) - if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml) - file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml) - endif() -endif() - -find_package(Git) -if(NOT GIT_FOUND) - set(GIT_EXECUTABLE "") -endif() -add_custom_target( - dolphin_scmrev - ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} -DDISTRIBUTOR=${DISTRIBUTOR} -DDOLPHIN_DEFAULT_UPDATE_TRACK=${DOLPHIN_DEFAULT_UPDATE_TRACK} -DGIT_FOUND=${GIT_FOUND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DDOLPHIN_WC_REVISION=${DOLPHIN_WC_REVISION} -DDOLPHIN_WC_DESCRIBE=${DOLPHIN_WC_DESCRIBE} -DDOLPHIN_WC_BRANCH=${DOLPHIN_WC_BRANCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/ScmRevGen.cmake - BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml" - VERBATIM -) - -# This is here so #include "Common/scmrev.h" finds the generated header. -include_directories("${PROJECT_BINARY_DIR}/Source/Core") - -######################################## -# Unit testing. -# -if(ENABLE_TESTS) - dolphin_find_optional_system_library_pkgconfig(GTEST - gtest gtest::gtest Externals/gtest - ) - # dolphin_find_optional_system_library_pkgconfig() doesn't add an alias if it - # uses the bundled libraries, so we add one ourselves. - if (NOT TARGET gtest::gtest) - add_library(gtest::gtest ALIAS gtest) - endif() - # Force gtest to link the C runtime dynamically on Windows in order to avoid - # runtime mismatches. - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -else() - message(STATUS "Unit tests are disabled") -endif() - -######################################## -# Process Dolphin source now that all setup is complete -# -add_subdirectory(Source) - -######################################## -# Install shared data files -# -if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows") - install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/Sys PATTERN) -endif() -if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD|Darwin") - install(FILES COPYING DESTINATION ${datadir}) - install(DIRECTORY LICENSES DESTINATION ${datadir}/LICENSES PATTERN) -endif() -if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD") - # Install the application icon and menu item - install(FILES Data/dolphin-emu.svg - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps) - install(FILES Data/dolphin-emu.png - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps) - install(FILES Data/dolphin-emu.desktop - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) - # Install manpages - install(FILES Data/dolphin-emu.6 - DESTINATION ${CMAKE_INSTALL_MANDIR}/man6) - install(FILES Data/dolphin-emu-nogui.6 - DESTINATION ${CMAKE_INSTALL_MANDIR}/man6) -endif() - -# packaging information -set(CPACK_PACKAGE_NAME "dolphin-emu") -set(CPACK_PACKAGE_VENDOR "Dolphin Team") -set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_VERSION_PATCH}) -set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/Data/cpack_package_description.txt) -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A GameCube and Wii emulator") - -set(CPACK_RPM_PACKAGE_GROUP System/Emulators/Other) -set(CPACK_RPM_PACKAGE_LICENSE GPL-2.0) -# TODO: CPACK_RESOURCE_FILE_README -# TODO: CPACK_RESOURCE_FILE_WELCOME -# TODO: CPACK_PACKAGE_ICON -# TODO: CPACK_NSIS_* -# TODO: Use CPack components for DSPSpy, etc => cpack_add_component - -# Debian Specific. Install dpkg-dev for automatic deps generation -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -set(CPACK_DEBIAN_PACKAGE_SECTION "Games") - -set(CPACK_SET_DESTDIR ON) -set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP") -set(CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~;\\\\.swp;/\\\\.git") -list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_BINARY_DIR}") - -# CPack must be included after the CPACK_* variables are set in order for those -# variables to take effect. -Include(CPack) diff --git a/CMakePresets.json b/CMakePresets.json deleted file mode 100644 index 8c37405d22..0000000000 --- a/CMakePresets.json +++ /dev/null @@ -1,432 +0,0 @@ -{ - "version": 6, - "configurePresets": [ - { - "name": "ninja-generator", - "generator": "Ninja", - "hidden": true - }, - { - "name": "visualstudio-generator", - "generator": "Visual Studio 18 2026", - "toolset": { - "value": "v145", - "strategy": "set" - }, - "hidden": true - }, - - { - "name": "release", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_CONFIGURATION_TYPES": "Release" - }, - "hidden": true - }, - { - "name": "debug", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_CONFIGURATION_TYPES": "Debug" - }, - "hidden": true - }, - - { - "name": "generic", - "toolchainFile": "CMake/DolphinToolchain.cmake", - "cacheVariables": { - "ARCH": "generic" - }, - "hidden": true - }, - { - "name": "x64", - "toolchainFile": "CMake/DolphinToolchain.cmake", - "cacheVariables": { - "ARCH": "x86_64" - }, - "hidden": true - }, - { - "name": "arm64", - "toolchainFile": "CMake/DolphinToolchain.cmake", - "cacheVariables": { - "ARCH": "arm64" - }, - "hidden": true - }, - - { - "name": "release-generic", - "inherits": ["release", "generic"], - "binaryDir": "${sourceDir}/build/release/generic", - "hidden": true - }, - { - "name": "release-x64", - "inherits": ["release", "x64"], - "binaryDir": "${sourceDir}/build/release/x64", - "hidden": true - }, - { - "name": "release-arm64", - "inherits": ["release", "arm64"], - "binaryDir": "${sourceDir}/build/release/arm64", - "hidden": true - }, - { - "name": "debug-generic", - "inherits": ["debug", "generic"], - "binaryDir": "${sourceDir}/build/debug/generic", - "hidden": true - }, - { - "name": "debug-x64", - "inherits": ["debug", "x64"], - "binaryDir": "${sourceDir}/build/debug/x64", - "hidden": true - }, - { - "name": "debug-arm64", - "inherits": ["debug", "arm64"], - "binaryDir": "${sourceDir}/build/debug/arm64", - "hidden": true - }, - - { - "name": "visualstudio-generic", - "inherits": ["generic", "visualstudio-generator"], - "hidden": true - }, - { - "name": "visualstudio-x64", - "inherits": ["x64", "visualstudio-generator"], - "architecture": { - "value": "x64", - "strategy": "set" - }, - "hidden": true - }, - { - "name": "visualstudio-arm64", - "inherits": ["arm64", "visualstudio-generator"], - "architecture": { - "value": "arm64", - "strategy": "set" - }, - "hidden": true - }, - { - "name": "ninja-generic", - "inherits": ["generic", "ninja-generator"], - "hidden": true - }, - { - "name": "ninja-x64", - "architecture": { - "value": "x64", - "strategy": "external" - }, - "inherits": ["x64", "ninja-generator"], - "hidden": true - }, - { - "name": "ninja-arm64", - "architecture": { - "value": "arm64", - "strategy": "external" - }, - "inherits": ["arm64", "ninja-generator"], - "hidden": true - }, - - { - "name": "visualstudio-release-generic", - "displayName": "Configure: Release - Visual Studio - Generic", - "inherits": ["release-generic", "visualstudio-generic"], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-release-x64", - "displayName": "Configure: Release - Visual Studio - x64", - "inherits": ["release-x64", "visualstudio-x64"], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-release-arm64", - "displayName": "Configure: Release - Visual Studio - ARM64", - "inherits": ["release-arm64", "visualstudio-arm64"], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-debug-generic", - "displayName": "Configure: Debug - Visual Studio - Generic", - "inherits": ["debug-generic", "visualstudio-generic"], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-debug-x64", - "displayName": "Configure: Debug - Visual Studio - x64", - "inherits": ["debug-x64", "visualstudio-x64"], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-debug-arm64", - "displayName": "Configure: Debug - Visual Studio - ARM64", - "inherits": ["debug-arm64", "visualstudio-arm64"], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "ninja-release-generic", - "displayName": "Configure: Release - Ninja - Generic", - "inherits": ["release-generic", "ninja-generic"] - }, - { - "name": "ninja-release-x64", - "displayName": "Configure: Release - Ninja - x64", - "inherits": ["release-x64", "ninja-x64"] - }, - { - "name": "ninja-release-arm64", - "displayName": "Configure: Release - Ninja - ARM64", - "inherits": ["release-arm64", "ninja-arm64"] - }, - { - "name": "ninja-debug-generic", - "displayName": "Configure: Debug - Ninja - Generic", - "inherits": ["debug-generic", "ninja-generic"] - }, - { - "name": "ninja-debug-x64", - "displayName": "Configure: Debug - Ninja - x64", - "inherits": ["debug-x64", "ninja-x64"] - }, - { - "name": "ninja-debug-arm64", - "displayName": "Configure: Debug - Ninja - ARM64", - "inherits": ["debug-arm64", "ninja-arm64"] - } - ], - "buildPresets": [ - { - "name": "visualstudio-build-release-generic", - "displayName": "Build: Release - Visual Studio - Generic", - "configurePreset": "visualstudio-release-generic", - "configuration": "Release", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-build-release-x64", - "displayName": "Build: Release - Visual Studio - x64", - "configurePreset": "visualstudio-release-x64", - "configuration": "Release", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-build-release-arm64", - "displayName": "Build: Release - Visual Studio - ARM64", - "configurePreset": "visualstudio-release-arm64", - "configuration": "Release", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-build-debug-generic", - "displayName": "Build: Debug - Visual Studio - Generic", - "configurePreset": "visualstudio-debug-generic", - "configuration": "Debug", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-build-debug-x64", - "displayName": "Build: Debug - Visual Studio - x64", - "configurePreset": "visualstudio-debug-x64", - "configuration": "Debug", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "visualstudio-build-debug-arm64", - "displayName": "Build: Debug - Visual Studio - ARM64", - "configurePreset": "visualstudio-debug-arm64", - "configuration": "Debug", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "ninja-build-release-generic", - "displayName": "Build: Release - Ninja - Generic", - "configurePreset": "ninja-release-generic" - }, - { - "name": "ninja-build-release-x64", - "displayName": "Build: Release - Ninja - x64", - "configurePreset": "ninja-release-x64" - }, - { - "name": "ninja-build-release-arm64", - "displayName": "Build: Release - Ninja - ARM64", - "configurePreset": "ninja-release-arm64" - }, - { - "name": "ninja-build-debug-generic", - "displayName": "Build: Debug - Ninja - Generic", - "configurePreset": "ninja-debug-generic" - }, - { - "name": "ninja-build-debug-x64", - "displayName": "Build: Debug - Ninja - x64", - "configurePreset": "ninja-debug-x64" - }, - { - "name": "ninja-build-debug-arm64", - "displayName": "Build: Debug - Ninja - ARM64", - "configurePreset": "ninja-debug-arm64" - } - ], - "workflowPresets": [ - { - "name": "visualstudio-release-generic", - "displayName": "Release - Visual Studio - Generic", - "steps": [ - { "type": "configure", "name": "visualstudio-release-generic" }, - { "type": "build", "name": "visualstudio-build-release-generic" } - ] - }, - { - "name": "visualstudio-release-x64", - "displayName": "Release - Visual Studio - x64", - "steps": [ - { "type": "configure", "name": "visualstudio-release-x64" }, - { "type": "build", "name": "visualstudio-build-release-x64" } - ] - }, - { - "name": "visualstudio-release-arm64", - "displayName": "Release - Visual Studio - ARM64", - "steps": [ - { "type": "configure", "name": "visualstudio-release-arm64" }, - { "type": "build", "name": "visualstudio-build-release-arm64" } - ] - }, - { - "name": "visualstudio-debug-generic", - "displayName": "Debug - Visual Studio - Generic", - "steps": [ - { "type": "configure", "name": "visualstudio-debug-generic" }, - { "type": "build", "name": "visualstudio-build-debug-generic" } - ] - }, - { - "name": "visualstudio-debug-x64", - "displayName": "Debug - Visual Studio - x64", - "steps": [ - { "type": "configure", "name": "visualstudio-debug-x64" }, - { "type": "build", "name": "visualstudio-build-debug-x64" } - ] - }, - { - "name": "visualstudio-debug-arm64", - "displayName": "Debug - Visual Studio - ARM64", - "steps": [ - { "type": "configure", "name": "visualstudio-debug-arm64" }, - { "type": "build", "name": "visualstudio-build-debug-arm64" } - ] - }, - { - "name": "ninja-release-generic", - "displayName": "Release - Ninja - Generic", - "steps": [ - { "type": "configure", "name": "ninja-release-generic" }, - { "type": "build", "name": "ninja-build-release-generic" } - ] - }, - { - "name": "ninja-release-x64", - "displayName": "Release - Ninja - x64", - "steps": [ - { "type": "configure", "name": "ninja-release-x64" }, - { "type": "build", "name": "ninja-build-release-x64" } - ] - }, - { - "name": "ninja-release-arm64", - "displayName": "Release - Ninja - ARM64", - "steps": [ - { "type": "configure", "name": "ninja-release-arm64" }, - { "type": "build", "name": "ninja-build-release-arm64" } - ] - }, - { - "name": "ninja-debug-generic", - "displayName": "Debug - Ninja - Generic", - "steps": [ - { "type": "configure", "name": "ninja-debug-generic" }, - { "type": "build", "name": "ninja-build-debug-generic" } - ] - }, - { - "name": "ninja-debug-x64", - "displayName": "Debug - Ninja - x64", - "steps": [ - { "type": "configure", "name": "ninja-debug-x64" }, - { "type": "build", "name": "ninja-build-debug-x64" } - ] - }, - { - "name": "ninja-debug-arm64", - "displayName": "Debug - Ninja - ARM64", - "steps": [ - { "type": "configure", "name": "ninja-debug-arm64" }, - { "type": "build", "name": "ninja-build-debug-arm64" } - ] - } - ] -} diff --git a/Externals/Bochs_disasm/CMakeLists.txt b/Externals/Bochs_disasm/CMakeLists.txt deleted file mode 100644 index cb78a826c7..0000000000 --- a/Externals/Bochs_disasm/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -add_library(bdisasm STATIC - dis_decode.cc - dis_groups.cc - resolve.cc - syntax.cc -) -dolphin_disable_warnings(bdisasm) - -if (WIN32) - target_sources(bdisasm - PRIVATE - stdafx.cc - ) -endif() - -target_include_directories(bdisasm -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) diff --git a/Externals/FatFs/CMakeLists.txt b/Externals/FatFs/CMakeLists.txt deleted file mode 100644 index c944edd8f3..0000000000 --- a/Externals/FatFs/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -add_library(FatFs STATIC - ff.c - ffunicode.c - diskio.h - ff.h - ffconf.h -) - -target_include_directories(FatFs -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) diff --git a/Externals/FreeSurround/CMakeLists.txt b/Externals/FreeSurround/CMakeLists.txt deleted file mode 100644 index 448842da2f..0000000000 --- a/Externals/FreeSurround/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -if (NOT MSVC) - set(CMAKE_CXX_STANDARD 14) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -set(SRCS - source/ChannelMaps.cpp - source/KissFFT.cpp - source/KissFFTR.cpp - source/FreeSurroundDecoder.cpp -) - -add_library(FreeSurround STATIC ${SRCS}) -dolphin_disable_warnings(FreeSurround) -target_include_directories(FreeSurround PUBLIC include) -target_compile_options(FreeSurround PRIVATE -w) diff --git a/Externals/LZO/CMakeLists.txt b/Externals/LZO/CMakeLists.txt deleted file mode 100644 index 9f6669344e..0000000000 --- a/Externals/LZO/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_library(lzo2 STATIC - minilzo.c -) -dolphin_disable_warnings(lzo2) - -target_include_directories(lzo2 -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) -add_library(LZO::LZO ALIAS lzo2) diff --git a/Externals/MoltenVK/CMakeLists.txt b/Externals/MoltenVK/CMakeLists.txt deleted file mode 100644 index d4e92ea0dc..0000000000 --- a/Externals/MoltenVK/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -include(ExternalProject) - -set(MOLTENVK_VERSION "v1.2.8") - -ExternalProject_Add(MoltenVK - GIT_REPOSITORY https://github.com/KhronosGroup/MoltenVK.git - GIT_TAG ${MOLTENVK_VERSION} - - CONFIGURE_COMMAND ${CMAKE_CURRENT_LIST_DIR}/configure.sh ${MOLTENVK_VERSION} - - PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patch.sh ${CMAKE_SOURCE_DIR}/Externals/MoltenVK/patches/ ${MOLTENVK_VERSION} - - BUILD_COMMAND make -C macos - BUILD_IN_SOURCE ON - BUILD_BYPRODUCTS /Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib - - INSTALL_COMMAND "" - - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_OUTPUT_ON_FAILURE ON -) diff --git a/Externals/SDL/CMakeLists.txt b/Externals/SDL/CMakeLists.txt deleted file mode 100644 index 6bdd630101..0000000000 --- a/Externals/SDL/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -set(SDL_SHARED OFF) -set(SDL_STATIC ON) -set(SDL_TEST_LIBRARY OFF) -set(SDL_TESTS OFF) -set(SDL_DISABLE_INSTALL ON) -set(SDL_DISABLE_INSTALL_DOCS ON) -set(SDL_INSTALL_TESTS OFF) -set(SDL_UNIX_CONSOLE_BUILD ON) - -set(SDL_AUDIO OFF) -set(SDL_VIDEO OFF) -set(SDL_GPU OFF) -set(SDL_RENDER OFF) -set(SDL_CAMERA OFF) -set(SDL_DIALOG OFF) -set(SDL_TRAY OFF) - -if(CCACHE_BIN) - set(SDL_CCACHE ON) - set(CCACHE_BINARY ${CCACHE_BIN}) -endif() - -if(LibUSB_TYPE STREQUAL Bundled) - set(LibUSB_FOUND TRUE) - set(SDL_HIDAPI_LIBUSB_SHARED OFF) -endif() - -add_subdirectory(SDL) - -if (TARGET SDL3) - dolphin_disable_warnings(SDL3) -endif() -if (TARGET SDL3-static) - dolphin_disable_warnings(SDL3-static) -endif() diff --git a/Externals/SFML/CMakeLists.txt b/Externals/SFML/CMakeLists.txt deleted file mode 100644 index 7736feb12c..0000000000 --- a/Externals/SFML/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -set(SRC_NETWORK - SFML/src/SFML/Network/Http.cpp - SFML/src/SFML/Network/IpAddress.cpp - SFML/src/SFML/Network/Packet.cpp - SFML/src/SFML/Network/Socket.cpp - SFML/src/SFML/Network/SocketSelector.cpp - SFML/src/SFML/Network/TcpListener.cpp - SFML/src/SFML/Network/TcpSocket.cpp - SFML/src/SFML/Network/UdpSocket.cpp -) - -if(WIN32) - list(APPEND SRC_NETWORK SFML/src/SFML/Network/Win32/SocketImpl.cpp) -else() - list(APPEND SRC_NETWORK SFML/src/SFML/Network/Unix/SocketImpl.cpp) -endif() - -set(SRC_SYSTEM - SFML/src/SFML/System/Err.cpp - SFML/include/SFML/System/String.hpp - SFML/src/SFML/System/String.cpp - SFML/src/SFML/System/Utils.cpp -) - -add_library(sfml-network STATIC ${SRC_NETWORK}) -add_library(sfml-system STATIC ${SRC_SYSTEM}) -target_compile_features(sfml-network PUBLIC cxx_std_20) -target_compile_features(sfml-system PUBLIC cxx_std_20) -target_compile_definitions(sfml-system PUBLIC SFML_STATIC) -target_include_directories(sfml-system PUBLIC SFML/include PRIVATE SFML/src) -target_include_directories(sfml-network PUBLIC SFML/include PRIVATE SFML/src) -target_link_libraries(sfml-network PUBLIC sfml-system) -dolphin_disable_warnings(sfml-network) -dolphin_disable_warnings(sfml-system) diff --git a/Externals/bzip2/CMakeLists.txt b/Externals/bzip2/CMakeLists.txt deleted file mode 100644 index 94bbc3bcba..0000000000 --- a/Externals/bzip2/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ -project(bzip2 C) - -# TODO: Use bzip2 1.1.0's native support for CMake static builds once it releases. - -include(CheckTypeSize) -include(CheckFunctionExists) -include(CheckIncludeFile) - -check_include_file(sys/types.h HAVE_SYS_TYPES_H) -check_include_file(stdint.h HAVE_STDINT_H) -check_include_file(stddef.h HAVE_STDDEF_H) - -# Check to see if we have large file support -set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) -# We add these other definitions here because CheckTypeSize.cmake -# in CMake 2.4.x does not automatically do so and we want -# compatibility with CMake 2.4.x. -if(HAVE_SYS_TYPES_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) -endif() -if(HAVE_STDINT_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) -endif() -if(HAVE_STDDEF_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) -endif() -check_type_size(off64_t OFF64_T) -if(HAVE_OFF64_T) - add_definitions(-D_LARGEFILE64_SOURCE=1) -endif() -set(CMAKE_REQUIRED_DEFINITIONS) # clear variable - -# Check for fseeko -check_function_exists(fseeko HAVE_FSEEKO) -if(NOT HAVE_FSEEKO) - add_definitions(-DNO_FSEEKO) -endif() - -# -# Check for unistd.h -# -check_include_file(unistd.h HAVE_UNISTD_H) -if(HAVE_UNISTD_H) - add_definitions(-DHAVE_UNISTD_H) -endif() - -if(MSVC) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) -endif() - -#============================================================================ -# bzip2 -#============================================================================ - -set(BZIP2_PUBLIC_HDRS - bzip2/bzlib.h -) -set(BZIP2_PRIVATE_HDRS - bzip2/bzlib_private.h -) -set(BZIP2_SRCS - bzip2/blocksort.c - bzip2/huffman.c - bzip2/crctable.c - bzip2/randtable.c - bzip2/compress.c - bzip2/decompress.c - bzip2/bzlib.c -) - -add_library(bzip2 STATIC ${BZIP2_SRCS} ${BZIP2_PUBLIC_HDRS} ${BZIP2_PRIVATE_HDRS}) -add_library(BZip2::BZip2 ALIAS bzip2) -dolphin_disable_warnings(bzip2) - -target_include_directories(bzip2 -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/bzip2 -) diff --git a/Externals/cpp-ipc/CMakeLists.txt b/Externals/cpp-ipc/CMakeLists.txt deleted file mode 100644 index c8b52f420d..0000000000 --- a/Externals/cpp-ipc/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -add_subdirectory(cpp-ipc EXCLUDE_FROM_ALL) - -dolphin_disable_warnings(ipc) - -if (NOT MSVC) - target_compile_options(ipc PRIVATE "-fexceptions") -endif () - -add_library(cpp-ipc::ipc ALIAS ipc) diff --git a/Externals/cpp-optparse/CMakeLists.txt b/Externals/cpp-optparse/CMakeLists.txt deleted file mode 100644 index 1d255582f7..0000000000 --- a/Externals/cpp-optparse/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(SRCS - cpp-optparse/OptionParser.cpp - cpp-optparse/OptionParser.h -) - -add_library(cpp-optparse STATIC ${SRCS}) -target_compile_features(cpp-optparse PUBLIC cxx_std_11) -target_compile_options(cpp-optparse PRIVATE -fexceptions) -dolphin_disable_warnings(cpp-optparse) - -target_include_directories(cpp-optparse -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/cpp-optparse -) diff --git a/Externals/cubeb/CMakeLists.txt b/Externals/cubeb/CMakeLists.txt deleted file mode 100644 index 1c8407575f..0000000000 --- a/Externals/cubeb/CMakeLists.txt +++ /dev/null @@ -1,360 +0,0 @@ -# TODO -# - backend selection via command line, rather than simply detecting headers. - -cmake_minimum_required(VERSION 3.14 FATAL_ERROR) -project(cubeb - VERSION 0.0.0) - -option(BUILD_SHARED_LIBS "Build shared libraries" OFF) -option(BUILD_RUST_LIBS "Build rust backends" OFF) -option(BUNDLE_SPEEX "Bundle the speex library" OFF) -option(LAZY_LOAD_LIBS "Lazily load shared libraries" ON) -option(USE_SANITIZERS "Use sanitizers" ON) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING - "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) -endif() - -if (NOT MSVC) - set(CMAKE_C_STANDARD 99) - set(CMAKE_CXX_STANDARD 17) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -endif() - -if(USE_SANITIZERS) - if(NOT COMMAND add_sanitizers) - list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cubeb/cmake/sanitizers-cmake/cmake") - find_package(Sanitizers) - if(NOT COMMAND add_sanitizers) - message(FATAL_ERROR "Could not find sanitizers-cmake: run\n\tgit submodule update --init --recursive\nin base git checkout") - endif() - endif() -else() - macro(add_sanitizers UNUSED) - endmacro() -endif() - -if (BUILD_RUST_LIBS) - if(EXISTS "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-pulse-rs") - set(USE_PULSE_RUST 1) - endif() - if(EXISTS "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-coreaudio-rs") - set(USE_AUDIOUNIT_RUST 1) - endif() -endif() - -# On OS/2, visibility attribute is not supported. -if(NOT OS2) - set(CMAKE_C_VISIBILITY_PRESET hidden) - set(CMAKE_CXX_VISIBILITY_PRESET hidden) - set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) -endif() - -set(CMAKE_CXX_WARNING_LEVEL 4) -if(NOT MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -fno-exceptions -fno-rtti") -else() - #string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Disable RTTI - #string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Disable Exceptions -endif() - -add_library(cubeb - cubeb/src/cubeb.c - cubeb/src/cubeb_mixer.cpp - cubeb/src/cubeb_resampler.cpp - cubeb/src/cubeb_log.cpp - cubeb/src/cubeb_strings.c - cubeb/src/cubeb_utils.cpp -) -dolphin_disable_warnings(cubeb) -target_include_directories(cubeb - PUBLIC $ $ -) -set_target_properties(cubeb PROPERTIES - VERSION ${cubeb_VERSION} - SOVERSION ${cubeb_VERSION_MAJOR} -) - -add_sanitizers(cubeb) - -include(GenerateExportHeader) -generate_export_header(cubeb EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/exports/cubeb_export.h) -target_include_directories(cubeb - PUBLIC $ -) - -include(GNUInstallDirs) - -install(DIRECTORY ${CMAKE_SOURCE_DIR}/cubeb/include/${PROJECT_NAME} TYPE INCLUDE) -install(DIRECTORY ${CMAKE_BINARY_DIR}/exports/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) - -include(CMakePackageConfigHelpers) -write_basic_package_version_file( - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" - COMPATIBILITY SameMajorVersion -) - -configure_package_config_file( - "cubeb/Config.cmake.in" - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) - -install( - FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) - -install(TARGETS cubeb EXPORT "${PROJECT_NAME}Targets") -install( - EXPORT "${PROJECT_NAME}Targets" - NAMESPACE "${PROJECT_NAME}::" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) - -if(NOT BUNDLE_SPEEX) - find_package(PkgConfig) - if(PKG_CONFIG_FOUND) - pkg_check_modules(speexdsp IMPORTED_TARGET speexdsp) - if(speexdsp_FOUND) - add_library(speex ALIAS PkgConfig::speexdsp) - endif() - endif() -endif() - -if(NOT TARGET speex) - add_library(speex OBJECT cubeb/subprojects/speex/resample.c) - dolphin_disable_warnings(speex) - set_target_properties(speex PROPERTIES POSITION_INDEPENDENT_CODE TRUE) - target_include_directories(speex INTERFACE cubeb/subprojects) - target_compile_definitions(speex PUBLIC - OUTSIDE_SPEEX - FLOATING_POINT - EXPORT= - RANDOM_PREFIX=speex - ) -endif() - -# $ required because of https://gitlab.kitware.com/cmake/cmake/-/issues/15415 -target_link_libraries(cubeb PRIVATE $) - -include(CheckIncludeFiles) - -# Threads needed by cubeb_log, _pulse, _alsa, _jack, _sndio, _oss and _sun -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads) -target_link_libraries(cubeb PRIVATE Threads::Threads) - -if(LAZY_LOAD_LIBS) - check_include_files(pulse/pulseaudio.h USE_PULSE) - check_include_files(alsa/asoundlib.h USE_ALSA) - check_include_files(jack/jack.h USE_JACK) - check_include_files(sndio.h USE_SNDIO) - #check_include_files(aaudio/AAudio.h USE_AAUDIO) - set(USE_AAUDIO OFF) # too new for the Android versions we're targetting - - if(USE_PULSE OR USE_ALSA OR USE_JACK OR USE_SNDIO OR USE_AAUDIO) - target_link_libraries(cubeb PRIVATE ${CMAKE_DL_LIBS}) - - if(ANDROID) - target_compile_definitions(cubeb PRIVATE __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__) - endif() - endif() - -else() - - find_package(PkgConfig REQUIRED) - - pkg_check_modules(libpulse IMPORTED_TARGET libpulse) - if(libpulse_FOUND) - set(USE_PULSE ON) - target_compile_definitions(cubeb PRIVATE DISABLE_LIBPULSE_DLOPEN) - target_link_libraries(cubeb PRIVATE PkgConfig::libpulse) - endif() - - pkg_check_modules(alsa IMPORTED_TARGET alsa) - if(alsa_FOUND) - set(USE_ALSA ON) - target_compile_definitions(cubeb PRIVATE DISABLE_LIBASOUND_DLOPEN) - target_link_libraries(cubeb PRIVATE PkgConfig::alsa) - endif() - - pkg_check_modules(jack IMPORTED_TARGET jack) - if(jack_FOUND) - set(USE_JACK ON) - target_compile_definitions(cubeb PRIVATE DISABLE_LIBJACK_DLOPEN) - target_link_libraries(cubeb PRIVATE PkgConfig::jack) - endif() - - check_include_files(sndio.h USE_SNDIO) - if(USE_SNDIO AND NOT LIBRETRO) - target_compile_definitions(cubeb PRIVATE DISABLE_LIBSNDIO_DLOPEN) - target_link_libraries(cubeb PRIVATE sndio) - endif() - - #check_include_files(aaudio/AAudio.h USE_AAUDIO) - set(USE_AAUDIO OFF) # too new for the Android versions we're targetting - if(USE_AAUDIO) - target_compile_definitions(cubeb PRIVATE DISABLE_LIBAAUDIO_DLOPEN) - target_link_libraries(cubeb PRIVATE aaudio) - endif() -endif() - -if(USE_PULSE) - target_sources(cubeb PRIVATE cubeb/src/cubeb_pulse.c) - target_compile_definitions(cubeb PRIVATE USE_PULSE) -endif() - -if(USE_ALSA) - target_sources(cubeb PRIVATE cubeb/src/cubeb_alsa.c) - target_compile_definitions(cubeb PRIVATE USE_ALSA) -endif() - -if(USE_JACK) - target_sources(cubeb PRIVATE cubeb/src/cubeb_jack.cpp) - target_compile_definitions(cubeb PRIVATE USE_JACK) -endif() - -if(USE_SNDIO) - target_sources(cubeb PRIVATE cubeb/src/cubeb_sndio.c) - target_compile_definitions(cubeb PRIVATE USE_SNDIO) -endif() - -if(USE_AAUDIO) - target_sources(cubeb PRIVATE cubeb/src/cubeb_aaudio.cpp) - target_compile_definitions(cubeb PRIVATE USE_AAUDIO) - - # set this definition to enable low latency mode. Possibly bad for battery - target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_LOW_LATENCY) - - # set this definition to enable power saving mode. Possibly resulting - # in high latency - # target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_LOW_POWER_SAVING) - - # set this mode to make the backend use an exclusive stream. - # will decrease latency. - # target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_EXCLUSIVE_STREAM) -endif() - -check_include_files(AudioUnit/AudioUnit.h USE_AUDIOUNIT) -if(USE_AUDIOUNIT) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_audiounit.cpp - cubeb/src/cubeb_osx_run_loop.cpp) - target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT) - target_link_libraries(cubeb PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework CoreServices") -endif() - -check_include_files(audioclient.h USE_WASAPI) -if(USE_WASAPI) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_wasapi.cpp) - target_compile_definitions(cubeb PRIVATE USE_WASAPI) - target_link_libraries(cubeb PRIVATE avrt ole32 ksuser) -endif() - -check_include_files("windows.h;mmsystem.h" USE_WINMM) -if(USE_WINMM) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_winmm.c) - target_compile_definitions(cubeb PRIVATE USE_WINMM) - target_link_libraries(cubeb PRIVATE winmm) -endif() - -check_include_files(SLES/OpenSLES.h USE_OPENSL) -if(USE_OPENSL) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_opensl.cpp - cubeb/src/cubeb-jni.cpp) - target_compile_definitions(cubeb PRIVATE USE_OPENSL) - target_link_libraries(cubeb PRIVATE OpenSLES) -endif() - -check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H) -if(HAVE_SYS_SOUNDCARD_H) - try_compile(USE_OSS "${PROJECT_BINARY_DIR}/compile_tests" - ${PROJECT_SOURCE_DIR}/cubeb/cmake/compile_tests/oss_is_v4.c) - if(USE_OSS) - # strlcpy is not available on BSD systems that use glibc, - # like Debian kfreebsd, so try using libbsd if available - include(CheckSymbolExists) - check_symbol_exists(strlcpy string.h HAVE_STRLCPY) - if(NOT HAVE_STRLCPY) - pkg_check_modules(libbsd-overlay IMPORTED_TARGET libbsd-overlay) - if(libbsd-overlay_FOUND) - target_link_libraries(cubeb PRIVATE PkgConfig::libbsd-overlay) - set(HAVE_STRLCPY true) - endif() - endif() - if (HAVE_STRLCPY) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_oss.c) - target_compile_definitions(cubeb PRIVATE USE_OSS) - endif() - endif() -endif() - -check_include_files(android/log.h USE_AUDIOTRACK) -if(USE_AUDIOTRACK) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_audiotrack.c) - target_compile_definitions(cubeb PRIVATE USE_AUDIOTRACK) - target_link_libraries(cubeb PRIVATE log) -endif() - -check_include_files(sys/audioio.h USE_SUN) -if(USE_SUN) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_sun.c) - target_compile_definitions(cubeb PRIVATE USE_SUN) -endif() - -check_include_files(kai.h USE_KAI) -if(USE_KAI) - target_sources(cubeb PRIVATE - cubeb/src/cubeb_kai.c) - target_compile_definitions(cubeb PRIVATE USE_KAI) - target_link_libraries(cubeb PRIVATE kai) -endif() - -if(USE_PULSE AND USE_PULSE_RUST) - include(ExternalProject) - set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust) - ExternalProject_Add( - cubeb_pulse_rs - DOWNLOAD_COMMAND "" - CONFIGURE_COMMAND "" - BUILD_COMMAND cargo build COMMAND cargo build --release - BUILD_ALWAYS ON - BINARY_DIR "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-pulse-rs" - INSTALL_COMMAND "" - LOG_BUILD ON) - add_dependencies(cubeb cubeb_pulse_rs) - target_compile_definitions(cubeb PRIVATE USE_PULSE_RUST) - target_link_libraries(cubeb PRIVATE - debug "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-pulse-rs/target/debug/libcubeb_pulse.a" - optimized "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-pulse-rs/target/release/libcubeb_pulse.a" pulse) -endif() - -if(USE_AUDIOUNIT AND USE_AUDIOUNIT_RUST) - include(ExternalProject) - set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust) - ExternalProject_Add( - cubeb_coreaudio_rs - DOWNLOAD_COMMAND "" - CONFIGURE_COMMAND "" - BUILD_COMMAND cargo build COMMAND cargo build --release - BUILD_ALWAYS ON - BINARY_DIR "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-coreaudio-rs" - INSTALL_COMMAND "" - LOG_BUILD ON) - add_dependencies(cubeb cubeb_coreaudio_rs) - target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT_RUST) - target_link_libraries(cubeb PRIVATE - debug "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-coreaudio-rs/target/debug/libcubeb_coreaudio.a" - optimized "${PROJECT_SOURCE_DIR}/cubeb/src/cubeb-coreaudio-rs/target/release/libcubeb_coreaudio.a") -endif() -add_library(cubeb::cubeb ALIAS cubeb) diff --git a/Externals/curl/CMakeLists.txt b/Externals/curl/CMakeLists.txt deleted file mode 100644 index b0a7ea0d39..0000000000 --- a/Externals/curl/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -set(BUILD_CURL_EXE OFF) -set(BUILD_EXAMPLES OFF) -set(BUILD_LIBCURL_DOCS OFF) -set(BUILD_MISC_DOCS OFF) -set(BUILD_SHARED_LIBS OFF) -set(BUILD_STATIC_LIBS ON) -set(BUILD_TESTING OFF) -set(CURL_ENABLE_EXPORT_TARGET OFF) -set(ENABLE_CURL_MANUAL OFF) - -set(HTTP_ONLY ON) - -set(CURL_USE_LIBPSL OFF) -set(CURL_USE_LIBSSH2 OFF) -set(CURL_ZLIB OFF CACHE BOOL "" FORCE) -set(CURL_ZSTD OFF CACHE BOOL "" FORCE) -set(CURL_BROTLI OFF CACHE BOOL "" FORCE) -set(ZLIB_FOUND FALSE) # TODO: Remove once we update to cURL >=8.17.1 https://github.com/curl/curl/pull/20147 -set(ZSTD_FOUND FALSE) # TODO: Same as above -set(BROTLI_FOUND FALSE) # TODO: Same as above -set(USE_LIBIDN2 OFF) -set(USE_NGHTTP2 OFF) - -if(UNIX) - # We use mbedtls on Unix(-like) systems and Android. - set(CURL_USE_OPENSSL OFF) - - # This is set if the dolphin_find_optional_system_library call from the main CMakeLists.txt - # is able to find mbedtls on the system. - if(MBEDTLS_FOUND) - # We can just enable CURL_USE_MBEDTLS. - set(CURL_USE_MBEDTLS ON) - else() - # HACK: Set some internal variables to pretend like mbedtls was found on the system. - # We can't use CURL_USE_MBEDTLS with our copy from Externals, as that flag expects - # mbedtls to be installed (the CMakeLists attempts to search for it with find_package). - set(_ssl_enabled ON) - set(USE_MBEDTLS ON) - set(_curl_ca_bundle_supported TRUE) - endif() -endif() - -if(WIN32) - set(CURL_USE_SCHANNEL ON) -endif() - -if(ANDROID) - set(CURL_CA_PATH "/system/etc/security/cacerts" CACHE STRING "") -endif() - -add_subdirectory(curl) - -if(UNIX AND NOT MBEDTLS_FOUND) - # HACK: Manually link with the mbedtls libraries. - target_link_libraries(libcurl_static PRIVATE - MbedTLS::mbedtls - MbedTLS::mbedx509) -endif() diff --git a/Externals/discord-rpc/CMakeLists.txt b/Externals/discord-rpc/CMakeLists.txt deleted file mode 100644 index f5e313e2af..0000000000 --- a/Externals/discord-rpc/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required (VERSION 3.2.0...4.1.1) -project (DiscordRPC) - -include(GNUInstallDirs) - -# format -file(GLOB_RECURSE ALL_SOURCE_FILES - include/*.h - src/*.cpp src/*.h src/*.c -) - -# add subdirs - -add_subdirectory(src) diff --git a/Externals/discord-rpc/src/CMakeLists.txt b/Externals/discord-rpc/src/CMakeLists.txt deleted file mode 100644 index 2e8b9f6c3d..0000000000 --- a/Externals/discord-rpc/src/CMakeLists.txt +++ /dev/null @@ -1,141 +0,0 @@ -include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/thirdparty/include) - -option(ENABLE_IO_THREAD "Start up a separate I/O thread, otherwise I'd need to call an update function" ON) -option(USE_STATIC_CRT "Use /MT[d] for dynamic library" OFF) -option(WARNINGS_AS_ERRORS "When enabled, compiles with `-Werror` (on *nix platforms)." OFF) - -if (NOT MSVC) - set(CMAKE_CXX_STANDARD 14) -endif() - -set(BASE_RPC_SRC - ${PROJECT_SOURCE_DIR}/include/discord_rpc.h - discord_rpc.cpp - ${PROJECT_SOURCE_DIR}/include/discord_register.h - rpc_connection.h - rpc_connection.cpp - serialization.h - serialization.cpp - connection.h - backoff.h - msg_queue.h -) - -if (${BUILD_SHARED_LIBS}) - if(WIN32) - set(BASE_RPC_SRC ${BASE_RPC_SRC} dllmain.cpp) - endif(WIN32) -endif(${BUILD_SHARED_LIBS}) - -if(WIN32) - add_definitions(-DDISCORD_WINDOWS) - set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp) - add_library(discord-rpc ${BASE_RPC_SRC}) - dolphin_disable_warnings(discord-rpc) - if (MSVC) - if(USE_STATIC_CRT) - foreach(CompilerFlag - CMAKE_CXX_FLAGS - CMAKE_CXX_FLAGS_DEBUG - CMAKE_CXX_FLAGS_RELEASE - CMAKE_C_FLAGS - CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_RELEASE) - string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") - endforeach() - endif(USE_STATIC_CRT) - target_compile_options(discord-rpc PRIVATE /EHsc - /Wall - /wd4100 # unreferenced formal parameter - /wd4514 # unreferenced inline - /wd4625 # copy constructor deleted - /wd5026 # move constructor deleted - /wd4626 # move assignment operator deleted - /wd4668 # not defined preprocessor macro - /wd4710 # function not inlined - /wd4711 # function was inlined - /wd4820 # structure padding - /wd4946 # reinterpret_cast used between related classes - /wd5027 # move assignment operator was implicitly defined as deleted - ) - endif(MSVC) - target_link_libraries(discord-rpc PRIVATE psapi advapi32) -endif(WIN32) - -if(UNIX) - set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_unix.cpp) - - if (APPLE) - add_definitions(-DDISCORD_OSX) - set(BASE_RPC_SRC ${BASE_RPC_SRC} discord_register_osx.m) - else (APPLE) - add_definitions(-DDISCORD_LINUX) - set(BASE_RPC_SRC ${BASE_RPC_SRC} discord_register_linux.cpp) - endif(APPLE) - - add_library(discord-rpc ${BASE_RPC_SRC}) - target_link_libraries(discord-rpc PUBLIC pthread) - target_compile_options(discord-rpc PRIVATE - -g - -Wall - -Wextra - -Wpedantic - ) - - if (${WARNINGS_AS_ERRORS}) - target_compile_options(discord-rpc PRIVATE -Werror) - endif (${WARNINGS_AS_ERRORS}) - - target_compile_options(discord-rpc PRIVATE - -Wno-unknown-pragmas # pragma push thing doesn't work on clang - -Wno-old-style-cast # it's fine - -Wno-c++98-compat # that was almost 2 decades ago - -Wno-c++98-compat-pedantic - -Wno-missing-noreturn - -Wno-padded # structure padding - -Wno-covered-switch-default - -Wno-exit-time-destructors # not sure about these - -Wno-global-constructors - ) - - if (${BUILD_SHARED_LIBS}) - target_compile_options(discord-rpc PRIVATE -fPIC) - endif (${BUILD_SHARED_LIBS}) - - if (APPLE) - target_link_libraries(discord-rpc PRIVATE "-framework AppKit") - endif (APPLE) -endif(UNIX) - -target_include_directories(discord-rpc PRIVATE ${RAPIDJSON}/include) - -if (NOT ${ENABLE_IO_THREAD}) - target_compile_definitions(discord-rpc PUBLIC -DDISCORD_DISABLE_IO_THREAD) -endif (NOT ${ENABLE_IO_THREAD}) - -if (${BUILD_SHARED_LIBS}) - target_compile_definitions(discord-rpc PUBLIC -DDISCORD_DYNAMIC_LIB) - target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK) -endif(${BUILD_SHARED_LIBS}) - -# install - -install( - TARGETS discord-rpc - EXPORT "discord-rpc" - RUNTIME - DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY - DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE - DESTINATION "${CMAKE_INSTALL_LIBDIR}" - INCLUDES - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -) - -install( - FILES - "../include/discord_rpc.h" - "../include/discord_register.h" - DESTINATION "include" -) diff --git a/Externals/ed25519/CMakeLists.txt b/Externals/ed25519/CMakeLists.txt deleted file mode 100644 index eeea8cca26..0000000000 --- a/Externals/ed25519/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -project(ed25519 C) - -add_library(ed25519 - add_scalar.c - ge.c - keypair.c - seed.c - sign.c - fe.c - key_exchange.c - sc.c - sha512.c - verify.c) -dolphin_disable_warnings(ed25519) diff --git a/Externals/enet/CMakeLists.txt b/Externals/enet/CMakeLists.txt deleted file mode 100644 index 04b4398204..0000000000 --- a/Externals/enet/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_subdirectory(enet) - -dolphin_disable_warnings(enet) -add_library(enet::enet ALIAS enet) -target_include_directories(enet PUBLIC enet/include) diff --git a/Externals/expr/CMakeLists.txt b/Externals/expr/CMakeLists.txt deleted file mode 100644 index 4eb00fa0e9..0000000000 --- a/Externals/expr/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_library(expr INTERFACE) -target_include_directories(expr INTERFACE include/) diff --git a/Externals/fmt/CMakeLists.txt b/Externals/fmt/CMakeLists.txt deleted file mode 100755 index 6c3ae26666..0000000000 --- a/Externals/fmt/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(fmt) -dolphin_disable_warnings(fmt) diff --git a/Externals/glslang/CMakeLists.txt b/Externals/glslang/CMakeLists.txt deleted file mode 100644 index b3e311560d..0000000000 --- a/Externals/glslang/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -set(ENABLE_PCH OFF) -set(BUILD_EXTERNAL OFF) -set(SKIP_GLSLANG_INSTALL ON) -set(ENABLE_GLSLANG_BINARIES OFF) -set(ENABLE_HLSL OFF) -set(ENABLE_OPT OFF) -set(ENABLE_CTEST OFF) -set(ENABLE_EXCEPTIONS OFF) -add_subdirectory(glslang) - -if (TARGET glslang) - target_include_directories(glslang - # Silence warnings on glslang by flagging it as a system include - SYSTEM PUBLIC - $ - $ - PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}" - ) - dolphin_disable_warnings(glslang) -endif() diff --git a/Externals/hidapi/CMakeLists.txt b/Externals/hidapi/CMakeLists.txt deleted file mode 100644 index df41e10c6d..0000000000 --- a/Externals/hidapi/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -project(hidapi) - -add_library(hidapi STATIC hidapi-src/hidapi/hidapi.h) -dolphin_disable_warnings(hidapi) -target_include_directories(hidapi PUBLIC hidapi-src/hidapi) - -if(APPLE) - target_sources(hidapi PRIVATE hidapi-src/mac/hid.c) -elseif(WIN32) - target_sources(hidapi PRIVATE hidapi-src/windows/hid.c) -else() - find_package(LIBUDEV) - if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND LIBUDEV_FOUND) - target_sources(hidapi PRIVATE hidapi-src/linux/hid.c) - target_link_libraries(hidapi PRIVATE udev) - else() - target_sources(hidapi PRIVATE hidapi-src/libusb/hid.c) - target_link_libraries(hidapi PRIVATE LibUSB::LibUSB) - endif() -endif() - -add_library(Hidapi::Hidapi ALIAS hidapi) diff --git a/Externals/imgui/CMakeLists.txt b/Externals/imgui/CMakeLists.txt deleted file mode 100644 index 4dd9579eb3..0000000000 --- a/Externals/imgui/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -if (NOT MSVC) - set(CMAKE_CXX_STANDARD 20) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -set(SRCS - imgui/imgui.cpp - imgui/imgui_demo.cpp - imgui/imgui_draw.cpp - imgui/imgui_tables.cpp - imgui/imgui_widgets.cpp -) - -add_library(imgui STATIC ${SRCS}) -dolphin_disable_warnings(imgui) - -target_include_directories(imgui - PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/imgui" -) - -target_compile_definitions(imgui - PUBLIC - IMGUI_USER_CONFIG="imgui_user_config.h" -) - -target_link_libraries(imgui - PRIVATE - fmt::fmt -) diff --git a/Externals/implot/CMakeLists.txt b/Externals/implot/CMakeLists.txt deleted file mode 100644 index 6ee7a386a8..0000000000 --- a/Externals/implot/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -if(NOT MSVC) - set(CMAKE_CXX_STANDARD 20) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -set(SRCS - implot/implot.cpp - implot/implot_items.cpp -) - -add_library(implot STATIC ${SRCS}) -dolphin_disable_warnings(implot) -target_include_directories(implot - PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/implot" - PRIVATE imgui -) - -target_link_libraries(implot - PRIVATE imgui - PRIVATE fmt::fmt -) - -# https://github.com/epezent/implot/pull/565 -target_compile_options(implot PRIVATE - $<$:/FI${CMAKE_CURRENT_SOURCE_DIR}/implot_isnan_fix.h> - $<$>:-include ${CMAKE_CURRENT_SOURCE_DIR}/implot_isnan_fix.h> -) diff --git a/Externals/libiconv/CMakeLists.txt b/Externals/libiconv/CMakeLists.txt deleted file mode 100644 index 8e90d1ea49..0000000000 --- a/Externals/libiconv/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -project(libiconv VERSION 1.18 LANGUAGES C) -add_subdirectory(lib) -add_subdirectory(libcharset) - -add_library(iconv STATIC - lib/iconv.c -) - -target_link_libraries(iconv PUBLIC libcharset) -target_include_directories(iconv - PUBLIC - $ - $ -) - -dolphin_disable_warnings(iconv) -add_library(Iconv::Iconv ALIAS iconv) diff --git a/Externals/libiconv/lib/CMakeLists.txt b/Externals/libiconv/lib/CMakeLists.txt deleted file mode 100644 index 635c093199..0000000000 --- a/Externals/libiconv/lib/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -option(ENABLE_EXTRA "Enable a few rarely used encodings" OFF) -option(ENABLE_RELOCATABLE "Allow the package to run at any location in the file system" ON) - -include(CheckIncludeFile) -check_include_file("stddef.h" HAVE_STDDEF_H) -check_include_file("stdlib.h" HAVE_STDLIB_H) -check_include_file("string.h" HAVE_STRING_H) - - -include(CheckFunctionExists) -check_function_exists(getc_unlocked HAVE_GETC_UNLOCKED) -check_function_exists(mbrtowc HAVE_MBRTOWC) -check_function_exists(setlocale HAVE_SETLOCALE) -check_function_exists(wcrtomb HAVE_WCRTOMB) - -include(CheckCCompilerFlag) -check_c_compiler_flag("-fvisibility=hidden" HAVE_VISIBILITY) - -include(CheckSymbolExists) -check_symbol_exists(nl_langinfo "langinfo.h" HAVE_LANGINFO_CODESET) -check_symbol_exists(iconv_open "iconv.h" HAVE_LANGINFO_CODESET) -check_symbol_exists(O_NOFOLLOW "fcntl.h" HAVE_WORKING_O_NOFOLLOW) - -include(CheckTypeSize) -check_type_size(mbstate_t MBSTATE_T) -check_type_size(mode_t MODE_T) -check_type_size(ssize_t SSIZE_T) - -if(NOT HAVE_MBSTATE_T) - set(MBSTATE_T "int") -else() - unset(MBSTATE_T) -endif() - -if(NOT HAVE_MODE_T) - set(MODE_T "int") -else() - unset(MODE_T) -endif() - -if(NOT HAVE_SSIZE_T) - set(SSIZE_T "int") -else() - unset(SSIZE_T) -endif() - -include(TestBigEndian) -test_big_endian(IS_BIG_ENDIAN) -if(IS_BIG_ENDIAN) - set(WORDS_LITTLEENDIAN 0) -else() - set(WORDS_LITTLEENDIAN 1) -endif() - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/config.h - @ONLY -) diff --git a/Externals/libiconv/libcharset/CMakeLists.txt b/Externals/libiconv/libcharset/CMakeLists.txt deleted file mode 100644 index 43c26229f9..0000000000 --- a/Externals/libiconv/libcharset/CMakeLists.txt +++ /dev/null @@ -1,92 +0,0 @@ -project(libcharset VERSION 1.5 LANGUAGES C) - -option(ENABLE_RELOCATABLE "Allow the package to run at any location in the file system" ON) - -include(CheckIncludeFile) -check_include_file("dlfcn.h" HAVE_DLFCN_H) -check_include_file("inttypes.h" HAVE_INTTYPES_H) -check_include_file("mach-o/dyld.h" HAVE_MACH_O_DYLD_H) -check_include_file("minix/config.h" HAVE_MINIX_CONFIG_H) -check_include_file("stdint.h" HAVE_STDINT_H) -check_include_file("stdio.h" HAVE_STDIO_H) -check_include_file("stdlib.h" HAVE_STDLIB_H) -check_include_file("strings.h" HAVE_STRINGS_H) -check_include_file("string.h" HAVE_STRING_H) -check_include_file("sys/stat.h" HAVE_SYS_STAT_H) -check_include_file("sys/types.h" HAVE_SYS_TYPES_H) -check_include_file("unistd.h" HAVE_UNISTD_H) -check_include_file("wchar.h" HAVE_WCHAR_H) - -include(CheckFunctionExists) -check_function_exists(copy_file_range HAVE_COPY_FILE_RANGE) -check_function_exists(setlocale HAVE_SETLOCALE) -check_function_exists(symlink HAVE_SYMLINK) -check_function_exists(_NSGetExecutablePath HAVE__NSGETEXECUTABLEPATH) - -include(CheckCCompilerFlag) -check_c_compiler_flag("-fvisibility=hidden" HAVE_VISIBILITY) - -include(CheckSymbolExists) -check_symbol_exists(nl_langinfo "langinfo.h" HAVE_LANGINFO_CODESET) -check_symbol_exists(O_NOATIME "fcntl.h" HAVE_WORKING_O_NOATIME) -check_symbol_exists(O_NOFOLLOW "fcntl.h" HAVE_WORKING_O_NOFOLLOW) - -set(STDC_HEADERS - ${HAVE_STDINT_H} - ${HAVE_STDIO_H} - ${HAVE_STDLIB_H} - ${HAVE_STRING_H} - ${HAVE_STRINGS_H} -) - -set(SYSTEM_DEFINES - _ALL_SOURCE - _DARWIN_C_SOURCE - __EXTENSIONS__ - _GNU_SOURCE - _HPUX_ALT_XOPEN_SOCKET_API - _MINIX - _NETBSD_SOURCE - _OPENBSD_SOURCE - _POSIX_SOURCE - _POSIX_1_SOURCE - _POSIX_PTHREAD_SEMANTICS - __STDC_WANT_IEC_60559_ATTRIBS_EXT__ - __STDC_WANT_IEC_60559_BFP_EXT__ - __STDC_WANT_IEC_60559_DFP_EXT__ - __STDC_WANT_IEC_60559_EXT__ - __STDC_WANT_IEC_60559_FUNCS_EXT__ - __STDC_WANT_IEC_60559_TYPES_EXT__ - __STDC_WANT_LIB_EXT2__ - __STDC_WANT_MATH_SPEC_FUNCS__ - _TANDEM_SOURCE - _XOPEN_SOURCE -) - -foreach(def ${SYSTEM_DEFINES}) - add_compile_definitions(${def}) -endforeach() - -set(PACKAGE_NAME "${PROJECT_NAME}") -set(PACKAGE_STRING "${PROJECT_NAME} ${PROJECT_VERSION}") -set(PACKAGE_TARNAME "${PROJECT_NAME}") -set(PACKAGE_BUGREPORT "") -set(PACKAGE_URL "") -set(PACKAGE_VERSION "${PROJECT_VERSION}") -set(LT_OBJDIR ".libs") - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/config.h - @ONLY -) - -add_library(libcharset STATIC - lib/localcharset.c -) - -target_include_directories(libcharset - PUBLIC - $ - $ -) \ No newline at end of file diff --git a/Externals/liblzma/CMakeLists.txt b/Externals/liblzma/CMakeLists.txt deleted file mode 100644 index 84080aa383..0000000000 --- a/Externals/liblzma/CMakeLists.txt +++ /dev/null @@ -1,230 +0,0 @@ -project(lzma C) - -include(CheckTypeSize) -include(CheckFunctionExists) -include(CheckIncludeFile) - -check_include_file(sys/types.h HAVE_SYS_TYPES_H) -check_include_file(stdint.h HAVE_STDINT_H) -check_include_file(stddef.h HAVE_STDDEF_H) - -# Check to see if we have large file support -set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) -# We add these other definitions here because CheckTypeSize.cmake -# in CMake 2.4.x does not automatically do so and we want -# compatibility with CMake 2.4.x. -if(HAVE_SYS_TYPES_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) -endif() -if(HAVE_STDINT_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) -endif() -if(HAVE_STDDEF_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) -endif() -check_type_size(off64_t OFF64_T) -if(HAVE_OFF64_T) - add_definitions(-D_LARGEFILE64_SOURCE=1) -endif() -set(CMAKE_REQUIRED_DEFINITIONS) # clear variable - -# Check for fseeko -check_function_exists(fseeko HAVE_FSEEKO) -if(NOT HAVE_FSEEKO) - add_definitions(-DNO_FSEEKO) -endif() - -# -# Check for unistd.h -# -check_include_file(unistd.h HAVE_UNISTD_H) -if(HAVE_UNISTD_H) - add_definitions(-DHAVE_UNISTD_H) -endif() - - -if(MSVC) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) -endif() - -add_definitions(-DHAVE_CONFIG_H) -add_definitions(-DLZMA_API_STATIC) - -if(NOT MINGW) - add_definitions(-DHAVE_WCWIDTH=1) -endif() - -#============================================================================ -# lzma -#============================================================================ - -set(LZMA_PUBLIC_HDRS - api/lzma.h - api/lzma/base.h - api/lzma/bcj.h - api/lzma/block.h - api/lzma/check.h - api/lzma/container.h - api/lzma/delta.h - api/lzma/filter.h - api/lzma/hardware.h - api/lzma/index.h - api/lzma/index_hash.h - api/lzma/lzma12.h - api/lzma/stream_flags.h - api/lzma/version.h - api/lzma/vli.h -) - -set(LZMA_SRCS - check/check.c - check/check.h - check/crc32_fast.c - check/crc32_table_be.h - check/crc32_table.c - check/crc32_table_le.h - check/crc64_fast.c - check/crc64_table_be.h - check/crc64_table.c - check/crc64_table_le.h - check/crc_macros.h - check/sha256.c - common/alone_decoder.c - common/alone_decoder.h - common/alone_encoder.c - common/auto_decoder.c - common/block_buffer_decoder.c - common/block_buffer_encoder.c - common/block_buffer_encoder.h - common/block_decoder.c - common/block_decoder.h - common/block_encoder.c - common/block_encoder.h - common/block_header_decoder.c - common/block_header_encoder.c - common/block_util.c - common/common.c - common/common.h - common/easy_buffer_encoder.c - common/easy_decoder_memusage.c - common/easy_encoder.c - common/easy_encoder_memusage.c - common/easy_preset.c - common/easy_preset.h - common/filter_buffer_decoder.c - common/filter_buffer_encoder.c - common/filter_common.c - common/filter_common.h - common/filter_decoder.c - common/filter_decoder.h - common/filter_encoder.c - common/filter_encoder.h - common/filter_flags_decoder.c - common/filter_flags_encoder.c - common/hardware_cputhreads.c - common/hardware_physmem.c - common/index.c - common/index_decoder.c - common/index_encoder.c - common/index_encoder.h - common/index.h - common/index_hash.c - common/memcmplen.h - common/outqueue.c - common/outqueue.h - common/stream_buffer_decoder.c - common/stream_buffer_encoder.c - common/stream_decoder.c - common/stream_decoder.h - common/stream_encoder.c - common/stream_encoder_mt.c - common/stream_flags_common.c - common/stream_flags_common.h - common/stream_flags_decoder.c - common/stream_flags_encoder.c - common/vli_decoder.c - common/vli_encoder.c - common/vli_size.c - delta/delta_common.c - delta/delta_common.h - delta/delta_decoder.c - delta/delta_decoder.h - delta/delta_encoder.c - delta/delta_encoder.h - delta/delta_private.h - lz/lz_decoder.c - lz/lz_decoder.h - lz/lz_encoder.c - lz/lz_encoder.h - lz/lz_encoder_hash.h - lz/lz_encoder_hash_table.h - lz/lz_encoder_mf.c - lzma/fastpos.h - lzma/fastpos_table.c - lzma/lzma2_decoder.c - lzma/lzma2_decoder.h - lzma/lzma2_encoder.c - lzma/lzma2_encoder.h - lzma/lzma_common.h - lzma/lzma_decoder.c - lzma/lzma_decoder.h - lzma/lzma_encoder.c - lzma/lzma_encoder.h - lzma/lzma_encoder_optimum_fast.c - lzma/lzma_encoder_optimum_normal.c - lzma/lzma_encoder_presets.c - lzma/lzma_encoder_private.h - rangecoder/price.h - rangecoder/price_table.c - rangecoder/range_common.h - rangecoder/range_decoder.h - rangecoder/range_encoder.h - simple/simple_coder.c - simple/simple_coder.h - simple/simple_decoder.c - simple/simple_decoder.h - simple/simple_encoder.c - simple/simple_encoder.h - simple/simple_private.h - tuklib/mythread.h - tuklib/sysdefs.h - tuklib/tuklib_common.h - tuklib/tuklib_config.h - tuklib/tuklib_cpucores.c - tuklib/tuklib_cpucores.h - tuklib/tuklib_exit.c - tuklib/tuklib_exit.h - tuklib/tuklib_gettext.h - tuklib/tuklib_integer.h - tuklib/tuklib_mbstr_fw.c - tuklib/tuklib_mbstr.h - tuklib/tuklib_mbstr_width.c - tuklib/tuklib_open_stdxxx.c - tuklib/tuklib_open_stdxxx.h - tuklib/tuklib_physmem.c - tuklib/tuklib_physmem.h - tuklib/tuklib_progname.c - tuklib/tuklib_progname.h -) - -add_library(lzma STATIC ${LZMA_SRCS} ${LZMA_PUBLIC_HDRS}) -add_library(LibLZMA::LibLZMA ALIAS lzma) -dolphin_disable_warnings(lzma) - -target_compile_definitions(lzma PUBLIC LZMA_API_STATIC) - -target_include_directories(lzma - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/api - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/ - ${CMAKE_CURRENT_SOURCE_DIR}/check - ${CMAKE_CURRENT_SOURCE_DIR}/common - ${CMAKE_CURRENT_SOURCE_DIR}/delta - ${CMAKE_CURRENT_SOURCE_DIR}/lz - ${CMAKE_CURRENT_SOURCE_DIR}/lzma - ${CMAKE_CURRENT_SOURCE_DIR}/rangecoder - ${CMAKE_CURRENT_SOURCE_DIR}/simple - ${CMAKE_CURRENT_SOURCE_DIR}/tuklib -) diff --git a/Externals/libspng/CMakeLists.txt b/Externals/libspng/CMakeLists.txt deleted file mode 100644 index 476125e045..0000000000 --- a/Externals/libspng/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -option(SPNG_SHARED "Build shared lib" OFF) -option(SPNG_STATIC "Build static lib" ON) -option(BUILD_EXAMPLES "Build examples" OFF) - -set(_PREV_CMAKE_SKIP_INSTALL_RULES "${CMAKE_SKIP_INSTALL_RULES}") -set(CMAKE_SKIP_INSTALL_RULES TRUE) - -add_subdirectory(libspng) - -set(CMAKE_SKIP_INSTALL_RULES "${_PREV_CMAKE_SKIP_INSTALL_RULES}") - -add_library(spng::spng ALIAS spng_static) diff --git a/Externals/libusb/CMakeLists.txt b/Externals/libusb/CMakeLists.txt deleted file mode 100644 index 39c29608b3..0000000000 --- a/Externals/libusb/CMakeLists.txt +++ /dev/null @@ -1,139 +0,0 @@ -add_library(usb STATIC EXCLUDE_FROM_ALL - libusb/libusb/core.c - libusb/libusb/descriptor.c - libusb/libusb/hotplug.c - libusb/libusb/io.c - libusb/libusb/strerror.c - libusb/libusb/sync.c -) -dolphin_disable_warnings(usb) - -set_target_properties(usb PROPERTIES VERSION 1.0.26) -if(MSVC) - target_include_directories(usb BEFORE PUBLIC libusb/libusb PRIVATE libusb/msvc) -else() -target_include_directories(usb - # turns out other projects also have "config.h", so make sure the - # LibUSB one comes first - BEFORE - - PUBLIC libusb/libusb - PRIVATE "${CMAKE_CURRENT_BINARY_DIR}" -) -endif() - -if(WIN32 OR CYGWIN) - target_sources(usb PRIVATE - libusb/libusb/os/threads_windows.c - libusb/libusb/os/windows_common.c - libusb/libusb/os/windows_usbdk.c - libusb/libusb/os/windows_winusb.c - libusb/libusb/os/events_windows.c - ) - set(PLATFORM_WINDOWS TRUE) -elseif(APPLE) - target_sources(usb PRIVATE libusb/libusb/os/darwin_usb.c) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(IOKIT_LIBRARY IOKit) - find_library(OBJC_LIBRARY objc) - find_library(SECURITY_LIBRARY Security) - target_link_libraries(usb PRIVATE - ${COREFOUNDATION_LIBRARY} - ${IOKIT_LIBRARY} - ${OBJC_LIBRARY} - ${SECURITY_LIBRARY} - ) -# # Dolphin on Android doesn't use libusb. -#elseif(ANDROID) -# target_sources(usb PRIVATE -# libusb/libusb/os/linux_usbfs.c -# libusb/libusb/os/linux_netlink.c -# ) -# find_library(LOG_LIBRARY log) -# target_link_libraries(usb PRIVATE ${LOG_LIBRARY}) -elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_sources(usb PRIVATE libusb/libusb/os/linux_usbfs.c) - find_package(LIBUDEV) - if(LIBUDEV_FOUND) - target_sources(usb PRIVATE libusb/libusb/os/linux_udev.c) - target_link_libraries(usb PRIVATE "${LIBUDEV_LIBRARIES}") - target_include_directories(usb PRIVATE "${LIBUDEV_INCLUDE_DIR}") - set(HAVE_LIBUDEV TRUE) - else() - target_sources(usb PRIVATE libusb/libusb/os/linux_netlink.c) - endif() -elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") - target_sources(usb PRIVATE libusb/libusb/os/netbsd_usb.c) -elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") - target_sources(usb PRIVATE libusb/libusb/os/openbsd_usb.c) -endif() - -if(UNIX) - target_sources(usb PRIVATE - libusb/libusb/os/events_posix.c - libusb/libusb/os/threads_posix.c - ) - find_package(Threads REQUIRED) - if(THREADS_HAVE_PTHREAD_ARG) - target_compile_options(usb PUBLIC "-pthread") - endif() - if(CMAKE_THREAD_LIBS_INIT) - target_link_libraries(usb PRIVATE "${CMAKE_THREAD_LIBS_INIT}") - endif() - set(PLATFORM_POSIX TRUE) -endif() - -# Create config.h - -include(CheckFunctionExists) -include(CheckIncludeFiles) -#include(CheckLibraryExists) -include(CheckTypeSize) -include(CheckSymbolExists) - -check_include_files(asm/types.h HAVE_ASM_TYPES_H) -check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) -check_symbol_exists(EFD_CLOEXEC "sys/eventfd.h" HAVE_DECL_EFD_CLOEXEC) -check_symbol_exists(EFD_NONBLOCK "sys/eventfd.h" HAVE_DECL_EFD_NONBLOCK) -check_symbol_exists(TFD_CLOEXEC "sys/timerfd.h" HAVE_DECL_TFD_CLOEXEC) -check_symbol_exists(TFD_NONBLOCK "sys/timerfd.h" HAVE_DECL_TFD_NONBLOCK) -check_include_files(dlfcn.h HAVE_DLFCN_H) -check_include_files(sys/eventfd.h HAVE_EVENTFD) -check_include_files(inttypes.h HAVE_INTTYPES_H) -check_include_files(IOKit/usb/IOUSBHostFamilyDefinitions.h HAVE_IOKIT_USB_IOUSBHOSTFAMILYDEFINITIONS_H) -#check_library_exists(udev HAVE_LIBUDEV) -check_include_files(memory.h HAVE_MEMORY_H) - -set(CMAKE_EXTRA_INCLUDE_FILES poll.h) -check_type_size("nfds_t" NFDS_T) -unset(CMAKE_EXTRA_INCLUDE_FILES) - -check_function_exists(pipe2 HAVE_PIPE2) -check_function_exists(pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK) -check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP) -check_function_exists(pthread_threadid_np HAVE_PTHREAD_THREADID_NP) -check_include_files(stdint.h HAVE_STDINT_H) -check_include_files(stdlib.h HAVE_STDLIB_H) -check_include_files(strings.h HAVE_STRINGS_H) -check_include_files(string.h HAVE_STRING_H) -check_type_size("struct timespec" STRUCT_TIMESPEC) -check_function_exists(syslog HAVE_SYSLOG) -check_include_files(sys/stat.h HAVE_SYS_STAT_H) -check_include_files(sys/time.h HAVE_SYS_TIME_H) -check_include_files(sys/types.h HAVE_SYS_TYPES_H) -check_include_files(sys/timerfd.h HAVE_TIMERFD) -check_include_files(unistd.h HAVE_UNISTD_H) - -configure_file(config.h.in config.h) - -# We don't create an ALIAS here so that dependencies (SDL) that try_compile libusb -# don't fail due to LibUSB::LibUSB being an alias target -add_library(LibUSB::LibUSB INTERFACE IMPORTED GLOBAL) -target_link_libraries(LibUSB::LibUSB - INTERFACE - usb -) -target_include_directories(LibUSB::LibUSB - INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}/libusb/libusb -) diff --git a/Externals/lz4/CMakeLists.txt b/Externals/lz4/CMakeLists.txt deleted file mode 100644 index b1ee41c586..0000000000 --- a/Externals/lz4/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 3.13) - -# We only want the static library, nothing else. -set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) -set(LZ4_BUILD_CLI OFF) -set(LZ4_BUILD_LEGACY_LZ4C OFF) -set(LZ4_BUNDLED_MODE ON) - -add_subdirectory(lz4/build/cmake) - -dolphin_disable_warnings(lz4_static) -add_library(LZ4::LZ4 ALIAS lz4_static) -target_compile_definitions(lz4_static PRIVATE XXH_NAMESPACE=LZ4_) diff --git a/Externals/mGBA/CMakeLists.txt b/Externals/mGBA/CMakeLists.txt deleted file mode 100644 index 61736a02f1..0000000000 --- a/Externals/mGBA/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -set(LIBMGBA_ONLY ON) -set(USE_LZMA ON) -add_subdirectory(mgba EXCLUDE_FROM_ALL) -dolphin_disable_warnings(mgba) - -target_compile_definitions(mgba PUBLIC HAVE_CRC32 ENABLE_VFS ENABLE_DIRECTORIES) -target_link_libraries(mgba ZLIB::ZLIB) - -if(NOT MSVC) - target_compile_options(mgba PRIVATE -Wno-unused-parameter -Wno-unused-result -Wno-unused-variable) -endif() - -if(ANDROID) - target_compile_definitions(mgba PUBLIC ENABLE_VFS_FD) - target_compile_definitions(mgba PRIVATE -Dfutimes=futimens) -endif() - -add_library(mGBA::mgba ALIAS mgba) diff --git a/Externals/mbedtls/3rdparty/CMakeLists.txt b/Externals/mbedtls/3rdparty/CMakeLists.txt deleted file mode 100644 index 18945e52ee..0000000000 --- a/Externals/mbedtls/3rdparty/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -list (APPEND thirdparty_src) -list (APPEND thirdparty_lib) -list (APPEND thirdparty_inc_public) -list (APPEND thirdparty_inc) -list (APPEND thirdparty_def) - -execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/config.h get MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED RESULT_VARIABLE result) - -if(${result} EQUAL 0) - add_subdirectory(everest) -endif() - -set(thirdparty_src ${thirdparty_src} PARENT_SCOPE) -set(thirdparty_lib ${thirdparty_lib} PARENT_SCOPE) -set(thirdparty_inc_public ${thirdparty_inc_public} PARENT_SCOPE) -set(thirdparty_inc ${thirdparty_inc} PARENT_SCOPE) -set(thirdparty_def ${thirdparty_def} PARENT_SCOPE) diff --git a/Externals/mbedtls/3rdparty/everest/CMakeLists.txt b/Externals/mbedtls/3rdparty/everest/CMakeLists.txt deleted file mode 100644 index d81d995f1f..0000000000 --- a/Externals/mbedtls/3rdparty/everest/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -list (APPEND everest_src) -list (APPEND everest_inc_public) -list (APPEND everest_inc) -list (APPEND everest_def) - -set(everest_src - ${CMAKE_CURRENT_SOURCE_DIR}/library/everest.c - ${CMAKE_CURRENT_SOURCE_DIR}/library/x25519.c - ${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519_joined.c -) - -list(APPEND everest_inc_public ${CMAKE_CURRENT_SOURCE_DIR}/include) -list(APPEND everest_inc ${CMAKE_CURRENT_SOURCE_DIR}/include/everest ${CMAKE_CURRENT_SOURCE_DIR}/include/everest/kremlib) - -if(INSTALL_MBEDTLS_HEADERS) - - install(DIRECTORY include/everest - DESTINATION include - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - FILES_MATCHING PATTERN "*.h") - -endif(INSTALL_MBEDTLS_HEADERS) - -set(thirdparty_src ${thirdparty_src} ${everest_src} PARENT_SCOPE) -set(thirdparty_inc_public ${thirdparty_inc_public} ${everest_inc_public} PARENT_SCOPE) -set(thirdparty_inc ${thirdparty_inc} ${everest_inc} PARENT_SCOPE) -set(thirdparty_def ${thirdparty_def} ${everest_def} PARENT_SCOPE) diff --git a/Externals/mbedtls/CMakeLists.txt b/Externals/mbedtls/CMakeLists.txt deleted file mode 100644 index 953ebddc8c..0000000000 --- a/Externals/mbedtls/CMakeLists.txt +++ /dev/null @@ -1,274 +0,0 @@ -# -# CMake build system design considerations: -# -# - Include directories: -# + Do not define include directories globally using the include_directories -# command but rather at the target level using the -# target_include_directories command. That way, it is easier to guarantee -# that targets are built using the proper list of include directories. -# + Use the PUBLIC and PRIVATE keywords to specifiy the scope of include -# directories. That way, a target linking to a library (using the -# target_link_librairies command) inherits from the library PUBLIC include -# directories and not from the PRIVATE ones. -# + Note: there is currently one remaining include_directories command in the -# CMake files. It is related to ZLIB support which is planned to be removed. -# When the support is removed, the associated include_directories command -# will be removed as well as this note. -# - MBEDTLS_TARGET_PREFIX: CMake targets are designed to be alterable by calling -# CMake in order to avoid target name clashes, via the use of -# MBEDTLS_TARGET_PREFIX. The value of this variable is prefixed to the -# mbedtls, mbedx509, mbedcrypto and apidoc targets. -# - -cmake_minimum_required(VERSION 2.8.12...4.1.1) - -# https://cmake.org/cmake/help/latest/policy/CMP0011.html -# Setting this policy is required in CMake >= 3.18.0, otherwise a warning is generated. The OLD -# policy setting is deprecated, and will be removed in future versions. -cmake_policy(SET CMP0011 NEW) -# https://cmake.org/cmake/help/latest/policy/CMP0012.html -# Setting the CMP0012 policy to NEW is required for FindPython3 to work with CMake 3.18.2 -# (there is a bug in this particular version), otherwise, setting the CMP0012 policy is required -# for CMake versions >= 3.18.3 otherwise a deprecated warning is generated. The OLD policy setting -# is deprecated and will be removed in future versions. -cmake_policy(SET CMP0012 NEW) - -if(TEST_CPP) - project("mbed TLS" C CXX) -else() - project("mbed TLS" C) -endif() - -# Set the project root directory. -set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - -option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) -option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) - -option(ENABLE_PROGRAMS "Build mbed TLS programs." OFF) - -option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF) -# Dolphin: werror makes updating compilers painful -option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" OFF) - -string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}") -string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}") -string(REGEX MATCH "IAR" CMAKE_COMPILER_IS_IAR "${CMAKE_C_COMPILER_ID}") -string(REGEX MATCH "MSVC" CMAKE_COMPILER_IS_MSVC "${CMAKE_C_COMPILER_ID}") - -# the test suites currently have compile errors with MSVC -if(CMAKE_COMPILER_IS_MSVC) - option(ENABLE_TESTING "Build mbed TLS tests." OFF) -else() - option(ENABLE_TESTING "Build mbed TLS tests." OFF) -endif() - -# Warning string - created as a list for compatibility with CMake 2.8 -set(WARNING_BORDER "*******************************************************\n") -set(NULL_ENTROPY_WARN_L1 "**** WARNING! MBEDTLS_TEST_NULL_ENTROPY defined!\n") -set(NULL_ENTROPY_WARN_L2 "**** THIS BUILD HAS NO DEFINED ENTROPY SOURCES\n") -set(NULL_ENTROPY_WARN_L3 "**** AND IS *NOT* SUITABLE FOR PRODUCTION USE\n") - -set(NULL_ENTROPY_WARNING "${WARNING_BORDER}" - "${NULL_ENTROPY_WARN_L1}" - "${NULL_ENTROPY_WARN_L2}" - "${NULL_ENTROPY_WARN_L3}" - "${WARNING_BORDER}") - -set(CTR_DRBG_128_BIT_KEY_WARN_L1 "**** WARNING! MBEDTLS_CTR_DRBG_USE_128_BIT_KEY defined!\n") -set(CTR_DRBG_128_BIT_KEY_WARN_L2 "**** Using 128-bit keys for CTR_DRBG limits the security of generated\n") -set(CTR_DRBG_128_BIT_KEY_WARN_L3 "**** keys and operations that use random values generated to 128-bit security\n") - -set(CTR_DRBG_128_BIT_KEY_WARNING "${WARNING_BORDER}" - "${CTR_DRBG_128_BIT_KEY_WARN_L1}" - "${CTR_DRBG_128_BIT_KEY_WARN_L2}" - "${CTR_DRBG_128_BIT_KEY_WARN_L3}" - "${WARNING_BORDER}") - -# Python 3 is only needed here to check for configuration warnings. -if(NOT CMAKE_VERSION VERSION_LESS 3.15.0) - set(Python3_FIND_STRATEGY LOCATION) - find_package(Python3 COMPONENTS Interpreter) - if(Python3_Interpreter_FOUND) - set(MBEDTLS_PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) - endif() -else() - find_package(PythonInterp 3) - if(PYTHONINTERP_FOUND) - set(MBEDTLS_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) - endif() -endif() -if(MBEDTLS_PYTHON_EXECUTABLE) - - # If 128-bit keys are configured for CTR_DRBG, display an appropriate warning - execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls/config.h get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY - RESULT_VARIABLE result) - if(${result} EQUAL 0) - message(WARNING ${CTR_DRBG_128_BIT_KEY_WARNING}) - endif() - - # If NULL Entropy is configured, display an appropriate warning - execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls/config.h get MBEDTLS_TEST_NULL_ENTROPY - RESULT_VARIABLE result) - if(${result} EQUAL 0) - message(WARNING ${NULL_ENTROPY_WARNING}) - - if(NOT UNSAFE_BUILD) - message(FATAL_ERROR "\ -\n\ -Warning! You have enabled MBEDTLS_TEST_NULL_ENTROPY. \ -This option is not safe for production use and negates all security \ -It is intended for development use only. \ -\n\ -To confirm you want to build with this option, re-run cmake with the \ -option: \n\ - cmake -DUNSAFE_BUILD=ON ") - - return() - endif() - endif() -endif() - -# If this is the root project add longer list of available CMAKE_BUILD_TYPE values -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} - CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull" - FORCE) -endif() - -# Create a symbolic link from ${base_name} in the binary directory -# to the corresponding path in the source directory. -function(link_to_source base_name) - # Get OS dependent path to use in `execute_process` - if (CMAKE_HOST_WIN32) - #mklink is an internal command of cmd.exe it can only work with \ - string(REPLACE "/" "\\" link "${CMAKE_CURRENT_BINARY_DIR}/${base_name}") - string(REPLACE "/" "\\" target "${CMAKE_CURRENT_SOURCE_DIR}/${base_name}") - else() - set(link "${CMAKE_CURRENT_BINARY_DIR}/${base_name}") - set(target "${CMAKE_CURRENT_SOURCE_DIR}/${base_name}") - endif() - - if (NOT EXISTS ${link}) - if (CMAKE_HOST_UNIX) - set(command ln -s ${target} ${link}) - else() - if (IS_DIRECTORY ${target}) - set(command cmd.exe /c mklink /j ${link} ${target}) - else() - set(command cmd.exe /c mklink /h ${link} ${target}) - endif() - endif() - - execute_process(COMMAND ${command} - RESULT_VARIABLE result - ERROR_VARIABLE output) - - if (NOT ${result} EQUAL 0) - message(FATAL_ERROR "Could not create symbolic link for: ${target} --> ${output}") - endif() - endif() -endfunction(link_to_source) - -string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}") - -include(CheckCCompilerFlag) - -if(CMAKE_COMPILER_IS_GNU) - # some warnings we want are not available with old GCC versions - # note: starting with CMake 2.8 we could use CMAKE_C_COMPILER_VERSION - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion - OUTPUT_VARIABLE GCC_VERSION) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings") - if (GCC_VERSION VERSION_GREATER 3.0 OR GCC_VERSION VERSION_EQUAL 3.0) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat=2 -Wno-format-nonliteral") - endif() - if (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wvla") - endif() - if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlogical-op") - endif() - if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow") - endif() - if (GCC_VERSION VERSION_GREATER 5.0) - CHECK_C_COMPILER_FLAG("-Wformat-signedness" C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS) - if(C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-signedness") - endif() - endif() - if (GCC_VERSION VERSION_GREATER 7.0 OR GCC_VERSION VERSION_EQUAL 7.0) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation") - endif() - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") - set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") - set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3") - set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(CMAKE_C_FLAGS_CHECK "-Os") - set(CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual") -endif(CMAKE_COMPILER_IS_GNU) - -if(CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral") - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") - set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") - set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3") - set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(CMAKE_C_FLAGS_MEMSAN "-fsanitize=memory -O3") - set(CMAKE_C_FLAGS_MEMSANDBG "-fsanitize=memory -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2") - set(CMAKE_C_FLAGS_CHECK "-Os") -endif(CMAKE_COMPILER_IS_CLANG) - -if(CMAKE_COMPILER_IS_IAR) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts --warnings_are_errors -Ohz") -endif(CMAKE_COMPILER_IS_IAR) - -if(CMAKE_COMPILER_IS_MSVC) - # Strictest warnings - # Dolphin/MSVC: we want to disable all warnings for externals - #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") -endif(CMAKE_COMPILER_IS_MSVC) - -if(MBEDTLS_FATAL_WARNINGS) - if(CMAKE_COMPILER_IS_MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") - endif(CMAKE_COMPILER_IS_MSVC) - - if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNU) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - if(UNSAFE_BUILD) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=cpp") - set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS_ASAN} -Wno-error=cpp") - set(CMAKE_C_FLAGS_ASANDBG "${CMAKE_C_FLAGS_ASANDBG} -Wno-error=cpp") - endif(UNSAFE_BUILD) - endif(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNU) -endif(MBEDTLS_FATAL_WARNINGS) - -if(CMAKE_BUILD_TYPE STREQUAL "Coverage") - if(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG) - set(CMAKE_SHARED_LINKER_FLAGS "--coverage") - endif(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG) -endif(CMAKE_BUILD_TYPE STREQUAL "Coverage") - -if(LIB_INSTALL_DIR) -else() - set(LIB_INSTALL_DIR lib) -endif() - -if(ENABLE_ZLIB_SUPPORT) - find_package(ZLIB) - - if(ZLIB_FOUND) - include_directories(${ZLIB_INCLUDE_DIR}) - endif(ZLIB_FOUND) -endif(ENABLE_ZLIB_SUPPORT) - -add_subdirectory(include) - -add_subdirectory(3rdparty) -list(APPEND libs ${thirdparty_lib}) - -add_subdirectory(library) diff --git a/Externals/mbedtls/include/CMakeLists.txt b/Externals/mbedtls/include/CMakeLists.txt deleted file mode 100644 index 62c0f620af..0000000000 --- a/Externals/mbedtls/include/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) - -if(INSTALL_MBEDTLS_HEADERS) - - file(GLOB headers "mbedtls/*.h") - file(GLOB psa_headers "psa/*.h") - - install(FILES ${headers} - DESTINATION include/mbedtls - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) - - install(FILES ${psa_headers} - DESTINATION include/psa - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) - -endif(INSTALL_MBEDTLS_HEADERS) - -# Make config.h available in an out-of-source build. ssl-opt.sh requires it. -if (ENABLE_TESTING AND NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) - link_to_source(mbedtls) - link_to_source(psa) -endif() diff --git a/Externals/mbedtls/library/CMakeLists.txt b/Externals/mbedtls/library/CMakeLists.txt deleted file mode 100644 index 8aa6efd47b..0000000000 --- a/Externals/mbedtls/library/CMakeLists.txt +++ /dev/null @@ -1,248 +0,0 @@ -option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON) -option(USE_SHARED_MBEDTLS_LIBRARY "Build mbed TLS shared library." OFF) -option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) -option(LINK_WITH_TRUSTED_STORAGE "Explicitly link mbed TLS library to trusted_storage." OFF) - -# Set the project root directory if it's not already defined, as may happen if -# the library folder is included directly by a parent project, without -# including the top level CMakeLists.txt. -if(NOT DEFINED MBEDTLS_DIR) - set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR}) -endif() - -set(src_crypto - aes.c - aesni.c - arc4.c - aria.c - asn1parse.c - asn1write.c - base64.c - bignum.c - blowfish.c - camellia.c - ccm.c - chacha20.c - chachapoly.c - cipher.c - cipher_wrap.c - constant_time.c - cmac.c - ctr_drbg.c - des.c - dhm.c - ecdh.c - ecdsa.c - ecjpake.c - ecp.c - ecp_curves.c - entropy.c - entropy_poll.c - error.c - gcm.c - havege.c - hkdf.c - hmac_drbg.c - md.c - md2.c - md4.c - md5.c - memory_buffer_alloc.c - mps_reader.c - mps_trace.c - nist_kw.c - oid.c - padlock.c - pem.c - pk.c - pk_wrap.c - pkcs12.c - pkcs5.c - pkparse.c - pkwrite.c - platform.c - platform_util.c - poly1305.c - psa_crypto.c - psa_crypto_aead.c - psa_crypto_cipher.c - psa_crypto_client.c - psa_crypto_driver_wrappers.c - psa_crypto_ecp.c - psa_crypto_hash.c - psa_crypto_mac.c - psa_crypto_rsa.c - psa_crypto_se.c - psa_crypto_slot_management.c - psa_crypto_storage.c - psa_its_file.c - ripemd160.c - rsa.c - rsa_internal.c - sha1.c - sha256.c - sha512.c - threading.c - timing.c - version.c - version_features.c - xtea.c -) - -list(APPEND src_crypto ${thirdparty_src}) - -set(src_x509 - certs.c - pkcs11.c - x509.c - x509_create.c - x509_crl.c - x509_crt.c - x509_csr.c - x509write_crt.c - x509write_csr.c -) - -set(src_tls - debug.c - net_sockets.c - ssl_cache.c - ssl_ciphersuites.c - ssl_cli.c - ssl_cookie.c - ssl_msg.c - ssl_srv.c - ssl_ticket.c - ssl_tls.c - ssl_tls13_keys.c -) - -if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes") -endif(CMAKE_COMPILER_IS_GNUCC) - -if(CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes -Wunreachable-code") -endif(CMAKE_COMPILER_IS_CLANG) - -if(WIN32) - set(libs ${libs} ws2_32) -endif(WIN32) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - SET(CMAKE_C_ARCHIVE_CREATE " Scr ") - SET(CMAKE_CXX_ARCHIVE_CREATE " Scr ") - SET(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") - SET(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") -endif() - -if(HAIKU) - set(libs ${libs} network) -endif(HAIKU) - -if(USE_PKCS11_HELPER_LIBRARY) - set(libs ${libs} pkcs11-helper) -endif(USE_PKCS11_HELPER_LIBRARY) - -if(ENABLE_ZLIB_SUPPORT) - set(libs ${libs} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB_SUPPORT) - -if(LINK_WITH_PTHREAD) - set(libs ${libs} pthread) -endif() - -if(LINK_WITH_TRUSTED_STORAGE) - set(libs ${libs} trusted_storage) -endif() - -if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) - message(FATAL_ERROR "Need to choose static or shared mbedtls build!") -endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) - -set(mbedtls_target "${MBEDTLS_TARGET_PREFIX}mbedtls") -set(mbedx509_target "${MBEDTLS_TARGET_PREFIX}mbedx509") -set(mbedcrypto_target "${MBEDTLS_TARGET_PREFIX}mbedcrypto") - -set(mbedtls_target ${mbedtls_target} PARENT_SCOPE) -set(mbedx509_target ${mbedx509_target} PARENT_SCOPE) -set(mbedcrypto_target ${mbedcrypto_target} PARENT_SCOPE) - -if (USE_STATIC_MBEDTLS_LIBRARY) - set(mbedtls_static_target ${mbedtls_target}) - set(mbedx509_static_target ${mbedx509_target}) - set(mbedcrypto_static_target ${mbedcrypto_target}) -endif() - -set(target_libraries ${mbedcrypto_target} ${mbedx509_target} ${mbedtls_target}) - -if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) - string(APPEND mbedtls_static_target "_static") - string(APPEND mbedx509_static_target "_static") - string(APPEND mbedcrypto_static_target "_static") - - list(APPEND target_libraries - ${mbedcrypto_static_target} - ${mbedx509_static_target} - ${mbedtls_static_target}) -endif() - -if(USE_STATIC_MBEDTLS_LIBRARY) - add_library(${mbedcrypto_static_target} STATIC ${src_crypto}) - dolphin_disable_warnings(${mbedcrypto_static_target}) - set_target_properties(${mbedcrypto_static_target} PROPERTIES OUTPUT_NAME mbedcrypto) - target_link_libraries(${mbedcrypto_static_target} PUBLIC ${libs}) - - add_library(${mbedx509_static_target} STATIC ${src_x509}) - dolphin_disable_warnings(${mbedx509_static_target}) - set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509) - target_link_libraries(${mbedx509_static_target} PUBLIC ${libs} ${mbedcrypto_static_target}) - - add_library(${mbedtls_static_target} STATIC ${src_tls}) - dolphin_disable_warnings(${mbedtls_static_target}) - set_target_properties(${mbedtls_static_target} PROPERTIES OUTPUT_NAME mbedtls) - target_link_libraries(${mbedtls_static_target} PUBLIC ${libs} ${mbedx509_static_target}) -endif(USE_STATIC_MBEDTLS_LIBRARY) - -if(USE_SHARED_MBEDTLS_LIBRARY) - add_library(${mbedcrypto_target} SHARED ${src_crypto}) - dolphin_disable_warnings(${mbedcrypto_target}) - set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 2.28.0 SOVERSION 7) - target_link_libraries(${mbedcrypto_target} PUBLIC ${libs}) - - add_library(${mbedx509_target} SHARED ${src_x509}) - dolphin_disable_warnings(${mbedx509_target}) - set_target_properties(${mbedx509_target} PROPERTIES VERSION 2.28.0 SOVERSION 1) - target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target}) - - add_library(${mbedtls_target} SHARED ${src_tls}) - dolphin_disable_warnings(${mbedtls_target}) - set_target_properties(${mbedtls_target} PROPERTIES VERSION 2.28.0 SOVERSION 14) - target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target}) -endif(USE_SHARED_MBEDTLS_LIBRARY) - -foreach(target IN LISTS target_libraries) - add_library(MbedTLS::${target} ALIAS ${target}) # add_subdirectory support - # Include public header files from /include and other directories - # declared by /3rdparty/**/CMakeLists.txt. Include private header files - # from /library and others declared by /3rdparty/**/CMakeLists.txt. - # /library needs to be listed explicitly when building .c files outside - # of /library (which currently means: under /3rdparty). - target_include_directories(${target} - PUBLIC ${MBEDTLS_DIR}/include/ - PUBLIC ${thirdparty_inc_public} - PRIVATE ${MBEDTLS_DIR}/library/ - PRIVATE ${thirdparty_inc}) - target_compile_definitions(${target} - PRIVATE ${thirdparty_def}) - install(TARGETS ${target} - DESTINATION ${LIB_INSTALL_DIR} - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) -endforeach(target) - -set(lib_target "${MBEDTLS_TARGET_PREFIX}lib") - -add_custom_target(${lib_target} DEPENDS ${mbedcrypto_target} ${mbedx509_target} ${mbedtls_target}) -if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) - add_dependencies(${lib_target} ${mbedcrypto_static_target} ${mbedx509_static_target} ${mbedtls_static_target}) -endif() diff --git a/Externals/miniupnpc/CMakeLists.txt b/Externals/miniupnpc/CMakeLists.txt deleted file mode 100644 index 33f34fb7a8..0000000000 --- a/Externals/miniupnpc/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(UPNPC_BUILD_STATIC ON) -set(UPNPC_BUILD_SHARED OFF) -set(UPNPC_BUILD_TESTS OFF) -set(UPNPC_BUILD_SAMPLE OFF) -set(UPNPC_NO_INSTALL ON) - -add_subdirectory(miniupnp/miniupnpc) -dolphin_disable_warnings(libminiupnpc-static) - -add_library(Miniupnpc::miniupnpc ALIAS libminiupnpc-static) diff --git a/Externals/minizip-ng/CMakeLists.txt b/Externals/minizip-ng/CMakeLists.txt deleted file mode 100644 index 8ad7f98259..0000000000 --- a/Externals/minizip-ng/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -set(MZ_COMPAT OFF) -set(MZ_BUILD_TESTS OFF) -set(MZ_BUILD_UNIT_TESTS OFF) -set(MZ_BUILD_FUZZ_TESTS OFF) -set(MZ_CODE_COVERAGE OFF) -set(MZ_FETCH_LIBS OFF) -set(MZ_BZIP2 OFF) -set(MZ_PKCRYPT OFF) -set(MZ_WZAES OFF) -set(MZ_OPENSSL OFF) -set(MZ_LIBBSD OFF) -set(SKIP_INSTALL_ALL ON) - -if(Iconv_TYPE STREQUAL Bundled) - set(CMAKE_DISABLE_FIND_PACKAGE_Iconv TRUE) - set(Iconv_FOUND TRUE) - set(Iconv_LIBRARIES Iconv::Iconv) - get_target_property(Iconv_INCLUDE_DIRS ${Iconv_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES) -endif() -if(LibLZMA_TYPE STREQUAL Bundled) - set(CMAKE_DISABLE_FIND_PACKAGE_LibLZMA TRUE) - set(LIBLZMA_FOUND TRUE) - set(LIBLZMA_LIBRARIES LibLZMA::LibLZMA) - get_target_property(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES) -endif() -if(ZLIB_TYPE STREQUAL Bundled) - set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB TRUE) - set(ZLIB_FOUND TRUE) - set(ZLIB_LIBRARIES ZLIB::ZLIB) - set(ZLIB_INCLUDE_DIRS "$") -endif() -if(ZSTD_TYPE STREQUAL Bundled) - set(CMAKE_DISABLE_FIND_PACKAGE_ZSTD TRUE) - set(ZSTD_FOUND TRUE) - set(ZSTD_LIBRARIES zstd::zstd) - get_target_property(ZSTD_INCLUDE_DIRS ${ZSTD_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES) -endif() - -# minizip-ng otherwise uses system libraries when we provide them above -set(CMAKE_DISABLE_FIND_PACKAGE_PkgConfig TRUE) -set(PKGCONFIG_FOUND FALSE) - -add_subdirectory(minizip-ng) -dolphin_disable_warnings(minizip-ng) diff --git a/Externals/pugixml/CMakeLists.txt b/Externals/pugixml/CMakeLists.txt deleted file mode 100644 index b2ff0ab1b1..0000000000 --- a/Externals/pugixml/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(PUGIXML_NO_EXCEPTIONS ON) -set(PUGIXML_STATIC_CRT OFF) -set(PUGIXML_BUILD_DEFINES OFF) -set(PUGIXML_INSTALL OFF) - -add_subdirectory(pugixml) -dolphin_disable_warnings(pugixml-static) diff --git a/Externals/rcheevos/CMakeLists.txt b/Externals/rcheevos/CMakeLists.txt deleted file mode 100644 index dd75487339..0000000000 --- a/Externals/rcheevos/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -add_library(rcheevos - rcheevos/include/rc_api_editor.h - rcheevos/include/rc_api_info.h - rcheevos/include/rc_api_request.h - rcheevos/include/rc_api_runtime.h - rcheevos/include/rc_api_user.h - rcheevos/include/rc_client.h - rcheevos/include/rc_client_raintegration.h - rcheevos/include/rc_consoles.h - rcheevos/include/rc_error.h - rcheevos/include/rc_export.h - rcheevos/include/rc_hash.h - rcheevos/include/rcheevos.h - rcheevos/include/rc_runtime.h - rcheevos/include/rc_runtime_types.h - rcheevos/include/rc_util.h - rcheevos/src/rapi/rc_api_common.c - rcheevos/src/rapi/rc_api_common.h - rcheevos/src/rapi/rc_api_editor.c - rcheevos/src/rapi/rc_api_info.c - rcheevos/src/rapi/rc_api_runtime.c - rcheevos/src/rapi/rc_api_user.c - rcheevos/src/rcheevos/alloc.c - rcheevos/src/rcheevos/condition.c - rcheevos/src/rcheevos/condset.c - rcheevos/src/rcheevos/consoleinfo.c - rcheevos/src/rcheevos/format.c - rcheevos/src/rcheevos/lboard.c - rcheevos/src/rcheevos/memref.c - rcheevos/src/rcheevos/operand.c - rcheevos/src/rcheevos/rc_internal.h - rcheevos/src/rcheevos/rc_validate.c - rcheevos/src/rcheevos/rc_validate.h - rcheevos/src/rcheevos/richpresence.c - rcheevos/src/rcheevos/runtime.c - rcheevos/src/rcheevos/runtime_progress.c - rcheevos/src/rcheevos/trigger.c - rcheevos/src/rcheevos/value.c - rcheevos/src/rhash/aes.c - rcheevos/src/rhash/aes.h - rcheevos/src/rhash/cdreader.c - rcheevos/src/rhash/hash.c - rcheevos/src/rhash/hash_disc.c - rcheevos/src/rhash/md5.c - rcheevos/src/rhash/md5.h - rcheevos/src/rhash/rc_hash_internal.h - rcheevos/src/rc_client.c - rcheevos/src/rc_client_external.c - rcheevos/src/rc_client_external.h - rcheevos/src/rc_client_external_versions.h - rcheevos/src/rc_client_internal.h - rcheevos/src/rc_client_raintegration.c - rcheevos/src/rc_client_raintegration_internal.h - rcheevos/src/rc_compat.c - rcheevos/src/rc_compat.h - rcheevos/src/rc_util.c - rcheevos/src/rc_version.c - rcheevos/src/rc_version.h -) -dolphin_disable_warnings(rcheevos) - -target_include_directories(rcheevos PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/rcheevos/include") -target_include_directories(rcheevos INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") -target_compile_definitions(rcheevos PRIVATE "RC_DISABLE_LUA=1" "RCHEEVOS_URL_SSL") -target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_HASH") -target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_EXTERNAL") -target_compile_definitions(rcheevos PRIVATE "RC_HASH_NO_ENCRYPTED") -target_compile_definitions(rcheevos PRIVATE "RC_HASH_NO_ROM") -target_compile_definitions(rcheevos PRIVATE "RC_HASH_NO_ZIP") -if(CMAKE_SYSTEM_NAME MATCHES "Windows") - target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_RAINTEGRATION") - target_compile_definitions(rcheevos PRIVATE "_CRT_SECURE_NO_WARNINGS") -endif() diff --git a/Externals/spirv_cross/CMakeLists.txt b/Externals/spirv_cross/CMakeLists.txt deleted file mode 100644 index 2b9461dc07..0000000000 --- a/Externals/spirv_cross/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -set(SRCS - SPIRV-Cross/GLSL.std.450.h - SPIRV-Cross/spirv.h - SPIRV-Cross/spirv.hpp - SPIRV-Cross/spirv_cfg.cpp - SPIRV-Cross/spirv_cfg.hpp - SPIRV-Cross/spirv_common.hpp - SPIRV-Cross/spirv_cpp.cpp - SPIRV-Cross/spirv_cpp.hpp - SPIRV-Cross/spirv_cross.cpp - SPIRV-Cross/spirv_cross.hpp - SPIRV-Cross/spirv_cross_c.cpp - SPIRV-Cross/spirv_cross_c.h - SPIRV-Cross/spirv_cross_containers.hpp - SPIRV-Cross/spirv_cross_error_handling.hpp - SPIRV-Cross/spirv_cross_parsed_ir.cpp - SPIRV-Cross/spirv_cross_parsed_ir.hpp - SPIRV-Cross/spirv_cross_util.cpp - SPIRV-Cross/spirv_cross_util.hpp - SPIRV-Cross/spirv_glsl.cpp - SPIRV-Cross/spirv_glsl.hpp - SPIRV-Cross/spirv_hlsl.cpp - SPIRV-Cross/spirv_hlsl.hpp - SPIRV-Cross/spirv_msl.cpp - SPIRV-Cross/spirv_msl.hpp - SPIRV-Cross/spirv_parser.cpp - SPIRV-Cross/spirv_parser.hpp - SPIRV-Cross/spirv_reflect.cpp - SPIRV-Cross/spirv_reflect.hpp -) - -if(NOT MSVC) -# spirv_cross requires C++11 at a minimum to compile. -add_compile_options(-std=c++11) - -# Silence some warnings that occur frequently to reduce noise in build logs. -add_compile_options(-Wno-shadow) -add_compile_options(-Wno-reorder) -add_compile_options(-Wno-sign-compare) -add_compile_options(-Wno-parentheses) -add_compile_options(-Wno-unused-variable) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - add_compile_options(-Wno-unused-but-set-variable) -elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - add_compile_options(-Wno-missing-variable-declarations) -endif() -endif() - -add_library(spirv_cross STATIC ${SRCS}) -dolphin_disable_warnings(spirv_cross) - -target_compile_definitions(spirv_cross PUBLIC SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS) -target_include_directories(spirv_cross PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Cross/include ${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Cross) diff --git a/Externals/tinygltf/CMakeLists.txt b/Externals/tinygltf/CMakeLists.txt deleted file mode 100644 index b11ac09b68..0000000000 --- a/Externals/tinygltf/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -add_library(tinygltf STATIC) -target_compile_definitions(tinygltf PUBLIC TINYGLTF_NOEXCEPTION) -target_compile_definitions(tinygltf PUBLIC TINYGLTF_NO_EXTERNAL_IMAGE) -target_compile_definitions(tinygltf PUBLIC TINYGLTF_USE_CPP14) -if (NOT MSVC) - target_compile_features(tinygltf PRIVATE cxx_std_20) -endif() -target_sources(tinygltf PRIVATE - tinygltf/tiny_gltf.cc) -target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -dolphin_disable_warnings(tinygltf) diff --git a/Externals/watcher/CMakeLists.txt b/Externals/watcher/CMakeLists.txt deleted file mode 100644 index 044b258d63..0000000000 --- a/Externals/watcher/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_library(watcher INTERFACE IMPORTED GLOBAL) -set_target_properties(watcher PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/watcher/include -) - -if (MINGW) - target_compile_options(watcher INTERFACE -fexceptions) -endif() diff --git a/Externals/xxhash/CMakeLists.txt b/Externals/xxhash/CMakeLists.txt deleted file mode 100644 index a874dc4e90..0000000000 --- a/Externals/xxhash/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -project(xxhash C) - -add_library(xxhash STATIC xxHash/xxhash.c) -dolphin_disable_warnings(xxhash) -target_include_directories(xxhash -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/xxHash -) -add_library(xxhash::xxhash ALIAS xxhash) diff --git a/Externals/zlib-ng/CMakeLists.txt b/Externals/zlib-ng/CMakeLists.txt deleted file mode 100644 index 2b686c0b12..0000000000 --- a/Externals/zlib-ng/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -set(ZLIB_ENABLE_TESTS OFF) -set(ZLIB_COMPAT ON) -set(SKIP_INSTALL_ALL ON) - -option(BUILD_SHARED_LIBS "Build shared library" OFF) - -add_subdirectory(zlib-ng) - -# Set ZLIB variables for find_package used by other projects -set(ZLIB_INCLUDE_DIR ${CMAKE_BINARY_DIR}/zlib-ng CACHE STRING "Path to zlib include directory") -set(ZLIB_LIBRARY ZLIB::ZLIB CACHE STRING "Path to zlib library") - -# Setup zlib alias project so FindZLIB doesn't recreate it -add_library(ZLIB::ZLIB ALIAS zlib) -dolphin_disable_warnings(zlib) diff --git a/Externals/zstd/CMakeLists.txt b/Externals/zstd/CMakeLists.txt deleted file mode 100644 index d83ce4cb1f..0000000000 --- a/Externals/zstd/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.13...4.2.0) - -set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) -set(ZSTD_BUILD_PROGRAMS OFF) -set(ZSTD_BUILD_SHARED OFF) - -add_subdirectory(zstd EXCLUDE_FROM_ALL) - -dolphin_disable_warnings(libzstd_static) -add_library(zstd::zstd ALIAS libzstd_static) diff --git a/Makefile b/Makefile index f2bdd7a0bd..2d0fb666f6 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ ifneq (,$(filter win win64,$(platform))) endif # webOS SDK toolchains are plain Linux cross compilers; their name is what -# tells them apart, as in the CMake build. +# tells them apart. ifneq (,$(findstring webos,$(CC))) ifneq (,$(findstring unix,$(platform))) override platform := webos diff --git a/Makefile.common b/Makefile.common index 44afc67c2e..e7f34866af 100644 --- a/Makefile.common +++ b/Makefile.common @@ -9,7 +9,6 @@ # HAVE_VULKAN HAVE_D3D HAVE_SPIRV_CROSS # HAVE_BUNDLED_ICONV Externals/libiconv instead of libc # -# The lists mirror what the CMake -DLIBRETRO=ON build links into the core. # Units only the standalone frontends use are left out. EXT_DIR := $(CORE_DIR)/Externals @@ -18,7 +17,7 @@ SRC_DIR := $(CORE_DIR)/Source/Core # ---------------------------------------------------------------------------- # Generated files # ---------------------------------------------------------------------------- -# Plain substitutions of the templates the CMake build configures. The +# Plain substitutions of the upstream templates. The # per-platform configure results (curl_config.h, the libusb, libiconv and # libcharset config.h, mGBA's flags.h) are checked in under # Externals//makefile instead. @@ -1962,7 +1961,7 @@ endif # ---------------------------------------------------------------------------- # _FLAGS applies to every object of that library, _CFLAGS and # _CXXFLAGS to its C and C++ objects only. Third-party code builds -# with warnings off, as in the CMake build. +# with warnings off. BDISASM_FLAGS := -w -I$(EXT_DIR)/Bochs_disasm @@ -2151,9 +2150,7 @@ SPIRV_CROSS_CXXFLAGS := -std=c++11 ADRENOTOOLS_FLAGS := -w -I$(EXT_DIR)/libadrenotools/include -I$(EXT_DIR)/libadrenotools \ -I$(EXT_DIR)/libadrenotools/lib/linkernsbypass -# Dolphin itself: every Source/ unit shares one set, the union of what the -# CMake targets core, common, videocommon, the video backends, inputcommon, -# audiocommon, discio, uicommon and dolphin_libretro see. +# Dolphin itself: every Source/ unit shares one set. DOLPHIN_FLAGS := \ -DENABLE_DIRECTORIES -DENABLE_VFS -DHAS_LIBMGBA -DHAVE_CRC32 \ -DLZMA_API_STATIC -DPUGIXML_NO_EXCEPTIONS -DSFML_STATIC -DSPNG_STATIC \ @@ -2206,9 +2203,9 @@ ifeq ($(OS_ANDROID),1) -I$(EXT_DIR)/libadrenotools/include -I$(EXT_DIR)/libadrenotools/lib/linkernsbypass endif -# Per-file additions, as the CMake build sets them. +# Per-file additions. ifeq ($(OS_WIN),1) - # watcher's Windows backend throws; CMake gives its users -fexceptions on MinGW. + # watcher's Windows backend throws. FILE_FLAGS_$(abspath $(SRC_DIR)/Common/FilesystemWatcher.cpp) := -fexceptions endif ifeq ($(ARCH_X86_64),1) diff --git a/Readme.md b/Readme.md index a5cf890785..f4ff94983e 100644 --- a/Readme.md +++ b/Readme.md @@ -38,30 +38,27 @@ Dolphin can only be installed on devices that satisfy the above requirements. At ## Building -You may find building instructions on the appropriate wiki page for your operating system: - -* [Windows](https://github.com/dolphin-emu/dolphin/wiki/Building-for-Windows) -* [Linux](https://github.com/dolphin-emu/dolphin/wiki/Building-for-Linux) -* [macOS](https://github.com/dolphin-emu/dolphin/wiki/Building-for-macOS) -* [Android](#android-specific-instructions) -* [OpenBSD](https://github.com/dolphin-emu/dolphin/wiki/Building-for-OpenBSD) (unsupported) - -Before building, make sure to pull all submodules: +This tree builds the parallel_gamecubewii libretro core with the static Makefile. +Pull all submodules first: ```sh git submodule update --init --recursive ``` -### Android-specific instructions +Then run `make` from the top of the tree. Linux, macOS and Windows (MSYS2, any +environment) are detected; other targets take `platform=`: -These instructions assume familiarity with Android development. If you do not have an -Android dev environment set up, see [AndroidSetup.md](AndroidSetup.md). +| Target | Command | Output | +|---|---|---| +| Linux, webOS | `make` | `parallel_gamecubewii_libretro.so` | +| Windows (MinGW-w64) | `make` | `parallel_gamecubewii_libretro.dll` | +| macOS | `make` | `parallel_gamecubewii_libretro.dylib` | +| iOS | `make platform=ios-arm64` | `parallel_gamecubewii_libretro_ios.dylib` | +| tvOS | `make platform=tvos-arm64` | `parallel_gamecubewii_libretro_tvos.dylib` | +| Android | `make platform=android-arm64` (or `android-x86_64`), NDK from `ANDROID_NDK_ROOT` | `parallel_gamecubewii_libretro_android.so` | -If using Android Studio, import the Gradle project located in `./Source/Android`. - -Android apps are compiled using a build system called Gradle. Dolphin's native component, -however, is compiled using CMake. The Gradle script will attempt to run a CMake build -automatically while building the Java code. +Cross builds pass the compilers, e.g. `make CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++`. +`DEBUG=1`, `LTO=-flto` and `SANITIZER=address,undefined` are available everywhere. ## Uninstalling diff --git a/Source/Android/jni/AndroidCommon/CMakeLists.txt b/Source/Android/jni/AndroidCommon/CMakeLists.txt deleted file mode 100644 index c9c48e067a..0000000000 --- a/Source/Android/jni/AndroidCommon/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -add_library(androidcommon STATIC - AndroidCommon.cpp - AndroidCommon.h - IDCache.cpp - IDCache.h -) - -target_link_libraries(androidcommon -PRIVATE - android - common - log - "-Wl,--no-warn-mismatch" - "-Wl,--whole-archive" - "-Wl,--no-whole-archive" -) diff --git a/Source/Android/jni/CMakeLists.txt b/Source/Android/jni/CMakeLists.txt deleted file mode 100644 index 0ce0636997..0000000000 --- a/Source/Android/jni/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ -add_library(main SHARED - AchievementAdapter.cpp - ActivityTracker.cpp - Cheats/ARCheat.cpp - Cheats/Cheats.h - Cheats/GeckoCheat.cpp - Cheats/GraphicsMod.cpp - Cheats/GraphicsModGroup.cpp - Cheats/PatchCheat.cpp - Config/ConfigChangedCallback.cpp - Config/NativeConfig.cpp - Config/PostProcessing.cpp - GameList/GameFile.cpp - GameList/GameFile.h - GameList/GameFileCache.cpp - GpuDriver.cpp - InfinityConfig.cpp - Input/Control.cpp - Input/Control.h - Input/ControlGroup.cpp - Input/ControlGroup.h - Input/ControlReference.cpp - Input/ControlReference.h - Input/CoreDevice.cpp - Input/CoreDevice.h - Input/EmulatedController.cpp - Input/EmulatedController.h - Input/InputDetector.cpp - Input/InputOverrider.cpp - Input/MappingCommon.cpp - Input/NumericSetting.cpp - Input/NumericSetting.h - NetPlay/Netplay.cpp - NetPlay/NetPlayUICallbacks.cpp - NetPlay/NetPlayUICallbacks.h - MainAndroid.cpp - RiivolutionPatches.cpp - SkylanderConfig.cpp - WiiUtils.cpp -) - -target_link_libraries(main -PRIVATE - androidcommon - common - core - inputcommon - uicommon -) - -target_link_libraries(main -PRIVATE - android - log - "-Wl,--no-warn-mismatch" - "-Wl,--whole-archive" - "-Wl,--no-whole-archive" -) - -target_include_directories(main -PRIVATE - ${CMAKE_SOURCE_DIR}/Externals/libadrenotools/include - ${CMAKE_SOURCE_DIR}/Externals/VulkanMemoryAllocator/include -) - -file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/) -file(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/Sys/) -file(COPY ${CMAKE_SOURCE_DIR}/Data/Sys DESTINATION ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/) - -# Delete folders that aren't used by the Android version of Dolphin -file(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/Sys/Themes/) - -set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} main) - -add_subdirectory(AndroidCommon) - -if(LIBRETRO) - set_target_properties(main PROPERTIES EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE) -endif() diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt deleted file mode 100644 index a455d6ca56..0000000000 --- a/Source/CMakeLists.txt +++ /dev/null @@ -1,100 +0,0 @@ -option(DOLPHIN_CXX_FLAGS "Flags used to compile Dolphin-only sources" "") -if(DOLPHIN_CXX_FLAGS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DOLPHIN_CXX_FLAGS}") -endif() - -if(CMAKE_SYSTEM_NAME MATCHES "Windows" OR MINGW) - add_definitions(-DNOMINMAX) - add_definitions(-DUNICODE) - add_definitions(-D_UNICODE) - add_definitions(-DWIN32_LEAN_AND_MEAN) - add_definitions(-D_SCL_SECURE_NO_WARNINGS) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) - add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) - add_definitions(-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING) -endif() - -if (NOT MSVC) - set(CMAKE_CXX_STANDARD 23) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -if (MINGW) - set(CMAKE_CXX_STANDARD 23) -endif() - -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -if (MSVC) - # Compile PCH - add_subdirectory(PCH) -else() - check_and_add_flag(HAVE_WALL -Wall) - # TODO: would like these but they produce overwhelming amounts of warnings - #check_and_add_flag(EXTRA -Wextra) - #check_and_add_flag(MISSING_FIELD_INITIALIZERS -Wmissing-field-initializers) - #check_and_add_flag(SWITCH_DEFAULT -Wswitch-default) - #check_and_add_flag(FLOAT_EQUAL -Wfloat-equal) - #check_and_add_flag(CONVERSION -Wconversion) - #check_and_add_flag(ZERO_AS_NULL_POINTER_CONSTANT -Wzero-as-null-pointer-constant) - check_and_add_flag(TYPE_LIMITS -Wtype-limits) - check_and_add_flag(SIGN_COMPARE -Wsign-compare) - check_and_add_flag(IGNORED_QUALIFIERS -Wignored-qualifiers) - check_and_add_flag(UNINITIALIZED -Wuninitialized) - check_and_add_flag(LOGICAL_OP -Wlogical-op) - check_and_add_flag(SHADOW -Wshadow) - check_and_add_flag(SHADOW_FIELD_IN_CONSTRUCTOR -Wshadow-field-in-constructor) - check_and_add_flag(INIT_SELF -Winit-self) - check_and_add_flag(MISSING_DECLARATIONS -Wmissing-declarations) - check_and_add_flag(MISSING_VARIABLE_DECLARATIONS -Wmissing-variable-declarations) - check_and_add_flag(IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough) - - # Disable -Wstringop-truncation warnings as they result in many false positives. - # In most (all?) cases where std::strncpy is used, we want to fill the entire buffer - # or match emulated code that also ignores the null terminator, so the warnings are not useful. - # Given that Dolphin itself mostly uses std::string, they do not really help catch any bugs. - check_cxx_compiler_flag(-Wstringop-truncation HAS_STRINGOP_TRUNCATION_WARNING) - if (HAS_STRINGOP_TRUNCATION_WARNING) - check_and_add_flag(NO_STRINGOP_TRUNCATION -Wno-stringop-truncation) - endif() - - # Format string issues that the compiler can detect should be compile time errors. - check_cxx_compiler_flag(-Wformat HAS_FORMAT_WARNING) - if (HAS_FORMAT_WARNING) - check_and_add_flag(FORMAT_WARNING_TO_ERROR -Werror=format) - endif() - - # Trigraphs support is generally disabled by default, but some compilers (GCC) may still warn when - # one hypothetical trigraph is encountered. The warning is generally not interesting. - check_cxx_compiler_flag(-Wtrigraphs HAS_TRIGRAPHS_WARNING) - if (HAS_TRIGRAPHS_WARNING) - check_and_add_flag(NO_TRIGRAPHS_WARNING -Wno-trigraphs) - endif() -endif() - -# These aren't actually needed for C11/C++11 -# but some dependencies require them (LLVM, libav). -add_definitions(-D__STDC_LIMIT_MACROS) -add_definitions(-D__STDC_CONSTANT_MACROS) - -check_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO) -if(HAVE_ELF_AUX_INFO) - add_definitions(-DHAVE_ELF_AUX_INFO) -endif() - -add_subdirectory(Core) -if (ANDROID) - add_subdirectory(Android/jni) -endif() - -if (ENABLE_TESTS) - add_subdirectory(UnitTests) -endif() - -if (DSPTOOL) - add_subdirectory(DSPTool) -endif() - -# TODO: Add DSPSpy. Preferably make it option() and cpack component diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt deleted file mode 100644 index f3d16f8096..0000000000 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ /dev/null @@ -1,108 +0,0 @@ -add_library(audiocommon - AudioCommon.cpp - AudioCommon.h - CubebStream.h - Enums.h - Mixer.cpp - Mixer.h - SurroundDecoder.cpp - SurroundDecoder.h - NullSoundStream.cpp - NullSoundStream.h - WaveFile.cpp - WaveFile.h -) - -if(ENABLE_CUBEB) - message(STATUS "Cubeb found, enabling Cubeb sound backend") - target_sources(audiocommon PRIVATE - CubebStream.cpp - CubebUtils.cpp - CubebUtils.h - ) - target_link_libraries(audiocommon PRIVATE cubeb) -endif() - -if(ANDROID) - find_package(OpenSLES) - if(OPENSLES_FOUND) - message(STATUS "OpenSLES found, enabling OpenSLES sound backend") - target_sources(audiocommon PRIVATE - OpenSLESStream.cpp - OpenSLESStream.h - ) - target_link_libraries(audiocommon PRIVATE OpenSLES::OpenSLES) - target_compile_definitions(audiocommon PRIVATE HAVE_OPENSL_ES=1) - endif() -endif() - -if(ENABLE_ALSA) - find_package(ALSA) - if(ALSA_FOUND) - message(STATUS "ALSA found, enabling ALSA sound backend") - target_sources(audiocommon PRIVATE - AlsaSoundStream.cpp - AlsaSoundStream.h - ) - target_link_libraries(audiocommon PRIVATE ALSA::ALSA) - target_compile_definitions(audiocommon PRIVATE HAVE_ALSA=1) - else() - message(STATUS "ALSA NOT found, disabling ALSA sound backend") - endif() -else() - message(STATUS "ALSA explicitly disabled, disabling ALSA sound backend") -endif() - -if(ENABLE_PULSEAUDIO) - # PulseAudio ships with a PulseAudioConfig.cmake with no imported target - # So we use our own FindPulseAudio instead with "MODULE" - find_package(PulseAudio MODULE QUIET) - if(PulseAudio_FOUND) - message(STATUS "PulseAudio found, enabling PulseAudio sound backend") - target_sources(audiocommon PRIVATE - PulseAudioStream.cpp - PulseAudioStream.h - ) - target_link_libraries(audiocommon PRIVATE PulseAudio::PulseAudio) - target_compile_definitions(audiocommon PRIVATE HAVE_PULSEAUDIO=1) - else() - message(STATUS "PulseAudio NOT found, disabling PulseAudio sound backend") - endif() -else() - message(STATUS "PulseAudio explicitly disabled, disabling PulseAudio sound backend") -endif() - -if(WIN32) - target_sources(audiocommon PRIVATE - # Dolphin loads openal32.dll at runtime - OpenALStream.cpp - OpenALStream.h - ) -endif() - -if(MSVC) - target_sources(audiocommon PRIVATE - WASAPIStream.cpp - WASAPIStream.h - ) -endif() - -target_link_libraries(audiocommon -PUBLIC - common - -PRIVATE - FreeSurround) - -if(ENABLE_CUBEB) - target_link_libraries(audiocommon PRIVATE cubeb::cubeb) -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(audiocommon PRIVATE use_pch) -endif() - -if(LIBRETRO) - target_include_directories(audiocommon PRIVATE ${CMAKE_SOURCE_DIR}/Externals/libretro-common/include) -endif() diff --git a/Source/Core/CMakeLists.txt b/Source/Core/CMakeLists.txt deleted file mode 100644 index 0cfb94183f..0000000000 --- a/Source/Core/CMakeLists.txt +++ /dev/null @@ -1,92 +0,0 @@ -add_subdirectory(AudioCommon) -add_subdirectory(Common) -add_subdirectory(Core) -add_subdirectory(DiscIO) -add_subdirectory(InputCommon) -add_subdirectory(UICommon) -add_subdirectory(VideoCommon) -add_subdirectory(VideoBackends) - -if(ENABLE_NOGUI) - add_subdirectory(DolphinNoGUI) -endif() - -if(ENABLE_CLI_TOOL) - add_subdirectory(DolphinTool) -endif() - -if(ENABLE_QT) - add_subdirectory(DolphinQt) -endif() - -if(LIBRETRO) - add_subdirectory(DolphinLibretro) -endif() - -if (APPLE OR WIN32) - add_subdirectory(UpdaterCommon) -endif() - -if (APPLE AND ENABLE_AUTOUPDATE) - add_subdirectory(MacUpdater) -endif() - -if (WIN32 AND ENABLE_AUTOUPDATE) - add_subdirectory(WinUpdater) -endif() - -if (APPLE AND ENABLE_QT) - set(DOLPHIN_MAC_BUNDLE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Dolphin.app") - - add_custom_target(build_final_bundle ALL - COMMAND ${CMAKE_COMMAND} -E remove_directory - ${DOLPHIN_MAC_BUNDLE} - - COMMAND cp -R - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DolphinQt.app - ${DOLPHIN_MAC_BUNDLE} - - # HACK: The Updater does not support setting the executable bit on new files, - # so don't use the new executable name, and instead continue to use "Dolphin". - COMMAND ${CMAKE_COMMAND} -E rename - ${DOLPHIN_MAC_BUNDLE}/Contents/MacOS/DolphinQt - ${DOLPHIN_MAC_BUNDLE}/Contents/MacOS/Dolphin - - COMMAND plutil - -replace CFBundleExecutable -string Dolphin - ${DOLPHIN_MAC_BUNDLE}/Contents/Info.plist - - DEPENDS dolphin-emu) - - if (ENABLE_AUTOUPDATE) - add_dependencies(build_final_bundle MacUpdater) - - add_custom_command(TARGET build_final_bundle - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory - "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers" - - COMMAND cp -R - "$" - "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers/Dolphin Updater.app") - - if (MACOS_CODE_SIGNING) - add_custom_command(TARGET build_final_bundle - POST_BUILD - COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh" - "-t" - "${MACOS_CODE_SIGNING_IDENTITY}" - "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers/Dolphin Updater.app") - endif() - endif() - - if (MACOS_CODE_SIGNING) - add_custom_command(TARGET build_final_bundle - POST_BUILD - COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh" - "-t" - "-e" "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu$<$:Debug>.entitlements" - "${MACOS_CODE_SIGNING_IDENTITY}" - "${DOLPHIN_MAC_BUNDLE}") - endif() -endif() diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt deleted file mode 100644 index cae05e4867..0000000000 --- a/Source/Core/Common/CMakeLists.txt +++ /dev/null @@ -1,422 +0,0 @@ -add_library(common - Analytics.cpp - Analytics.h - Assembler/AssemblerShared.cpp - Assembler/AssemblerShared.h - Assembler/AssemblerTables.cpp - Assembler/AssemblerTables.h - Assembler/GekkoAssembler.cpp - Assembler/GekkoAssembler.h - Assembler/GekkoIRGen.cpp - Assembler/GekkoIRGen.h - Assembler/GekkoLexer.cpp - Assembler/GekkoLexer.h - Assembler/GekkoParser.cpp - Assembler/GekkoParser.h - Assert.h - BitField.h - BitSet.h - BitUtils.h - BlockingLoop.h - Buffer.h - ChunkFile.h - CodeBlock.h - ColorUtil.cpp - ColorUtil.h - Common.h - CommonFuncs.cpp - CommonFuncs.h - CommonPaths.h - CommonTypes.h - Config/Config.cpp - Config/Config.h - Config/ConfigInfo.cpp - Config/ConfigInfo.h - Config/Enums.h - Config/Layer.cpp - Config/Layer.h - Contains.h - CPUDetect.h - Crypto/AES.cpp - Crypto/AES.h - Crypto/bn.cpp - Crypto/bn.h - Crypto/ec.cpp - Crypto/ec.h - Crypto/HMAC.cpp - Crypto/HMAC.h - Crypto/SHA1.cpp - Crypto/SHA1.h - CWDemangler.cpp - CWDemangler.h - Debug/MemoryPatches.cpp - Debug/MemoryPatches.h - Debug/Threads.h - Debug/Watches.cpp - Debug/Watches.h - DirectIOFile.cpp - DirectIOFile.h - DynamicLibrary.cpp - DynamicLibrary.h - ENet.cpp - ENet.h - EnumFormatter.h - EnumMap.h - Event.h - FatFsUtil.cpp - FatFsUtil.h - FileSearch.cpp - FileSearch.h - FilesystemWatcher.cpp - FilesystemWatcher.h - FileUtil.cpp - FileUtil.h - FixedSizeQueue.h - Flag.h - FloatUtils.cpp - FloatUtils.h - Functional.h - FormatUtil.h - FPURoundMode.h - GekkoDisassembler.cpp - GekkoDisassembler.h - Hash.cpp - Hash.h - HookableEvent.h - HostDisassembler.cpp - HostDisassembler.h - HttpRequest.cpp - HttpRequest.h - Image.cpp - Image.h - IniFile.cpp - IniFile.h - Inline.h - IOFile.cpp - IOFile.h - JitRegister.cpp - JitRegister.h - JsonUtil.h - JsonUtil.cpp - Lazy.h - LinearDiskCache.h - UnixUtil.h - Logging/ConsoleListener.h - Logging/Log.h - Logging/LogManager.cpp - Logging/LogManager.h - MathUtil.h - Matrix.cpp - Matrix.h - MemArena.h - MemoryUtil.cpp - MemoryUtil.h - MinizipUtil.h - MsgHandler.cpp - MsgHandler.h - Mutex.h - NandPaths.cpp - NandPaths.h - Network.cpp - Network.h - OneShotEvent.h - PcapFile.cpp - PcapFile.h - Profiler.cpp - Profiler.h - Projection.h - QoSSession.cpp - QoSSession.h - Random.cpp - Random.h - RangeSet.h - RangeSizeSet.h - ScopeGuard.h - SDCardUtil.cpp - SDCardUtil.h - SettingsHandler.cpp - SettingsHandler.h - SFMLHelper.cpp - SFMLHelper.h - SmallVector.h - SocketContext.cpp - SocketContext.h - SpanUtils.h - SPSCQueue.h - StringUtil.cpp - StringUtil.h - SymbolDB.cpp - SymbolDB.h - Thread.cpp - Thread.h - Timer.cpp - Timer.h - TimeUtil.cpp - TimeUtil.h - TransferableSharedMutex.h - TraversalClient.cpp - TraversalClient.h - TraversalProto.h - TypeUtils.h - UPnP.cpp - UPnP.h - VariantUtil.h - Version.cpp - Version.h - WaitableFlag.h - WindowSystemInfo.h - WorkQueueThread.h -) - -add_dependencies(common dolphin_scmrev) - -if(NOT MSVC AND _M_ARM_64) - set_source_files_properties( - Crypto/AES.cpp - Crypto/SHA1.cpp - PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") -endif() - -target_link_libraries(common -PUBLIC - ${CMAKE_THREAD_LIBS_INIT} - enet::enet - fmt::fmt - MbedTLS::mbedtls - MINIZIP::minizip-ng - sfml-network - -PRIVATE - CURL::libcurl - FatFs - spng::spng - $<$>:watcher> - ${VTUNE_LIBRARIES} -) - -if ((DEFINED CMAKE_ANDROID_ARCH_ABI AND CMAKE_ANDROID_ARCH_ABI MATCHES "x86|x86_64") OR - (NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86_64)) - target_link_libraries(common PRIVATE bdisasm) -endif() - -if (APPLE) - target_link_libraries(common - PRIVATE - ${APPKIT_LIBRARY} - ${COREFOUNDATION_LIBRARY} - ${FOUNDATION_LIBRARY} - ${IOK_LIBRARY} - ) -elseif(WIN32 AND NOT LIBRETRO) - target_link_libraries(common - PRIVATE - kernel32.lib - shlwapi.lib - winmm.lib - ) - if (_M_X86_64) - target_link_libraries(common PRIVATE opengl32.lib) - endif() -elseif (ANDROID) - target_link_libraries(common - PRIVATE - androidcommon - ) -elseif(HAIKU) - target_link_libraries(common PRIVATE be GL) -endif() - -if(ANDROID) - target_sources(common PRIVATE - Logging/ConsoleListenerDroid.cpp - MemArenaAndroid.cpp - ) -elseif(WIN32) - if(MSVC) - target_sources(common PRIVATE - LdrWatcher.cpp - LdrWatcher.h - ) - endif() - target_sources(common PRIVATE - Logging/ConsoleListenerWin.cpp - MemArenaWin.cpp - ) -elseif(IOS) - target_sources(common PRIVATE - Logging/ConsoleListenerNix.cpp - JITMemoryTracker.h - JITMemoryTracker.cpp - MemArenaDarwin.cpp - ) -elseif(APPLE) - target_sources(common PRIVATE - CommonFuncsObjC.mm - Logging/ConsoleListenerNix.cpp - MemArenaDarwin.cpp - ) -else() - target_sources(common PRIVATE - Logging/ConsoleListenerNix.cpp - MemArenaUnix.cpp - ) -endif() - -if(_M_ARM_64) - target_sources(common PRIVATE - Arm64Emitter.cpp - Arm64Emitter.h - ArmCommon.h - ArmCPUDetect.cpp - ArmFPURoundMode.cpp - ) -else() - if(_M_X86_64) #X86 - target_sources(common PRIVATE - x64ABI.cpp - x64ABI.h - x64Emitter.cpp - x64Emitter.h - x64FPURoundMode.cpp - x64CPUDetect.cpp - x64Reg.h - ) - else() # Generic - target_sources(common PRIVATE - GenericFPURoundMode.cpp - GenericCPUDetect.cpp - ) - endif() -endif() - -# OpenGL Interface -target_sources(common PRIVATE - GL/GLContext.cpp - GL/GLContext.h - GL/GLUtil.cpp - GL/GLUtil.h - GL/GLExtensions/GLExtensions.cpp - GL/GLExtensions/GLExtensions.h -) - -if(ENABLE_EGL AND EGL_FOUND) - target_sources(common PRIVATE - GL/GLInterface/EGL.cpp - GL/GLInterface/EGL.h - ) - if(ANDROID AND NOT LIBRETRO) - target_sources(common PRIVATE - GL/GLInterface/EGLAndroid.cpp - GL/GLInterface/EGLAndroid.h - ) - elseif(ENABLE_X11 AND X11_FOUND) - target_sources(common PRIVATE - GL/GLInterface/EGLX11.cpp - GL/GLInterface/EGLX11.h - ) - endif() - target_include_directories(common PRIVATE ${EGL_INCLUDE_DIRS}) - target_link_libraries(common PUBLIC ${EGL_LIBRARIES}) -endif() - -if(WIN32) - target_sources(common PRIVATE - WindowsRegistry.cpp - WindowsDevice.cpp - WindowsDevice.h - ) - if(NOT LIBRETRO) - target_sources(common PRIVATE - GL/GLInterface/WGL.cpp - GL/GLInterface/WGL.h - ) - endif() - if(MSVC) - target_sources(common PRIVATE - CompatPatches.cpp - ) - endif() -elseif(APPLE AND NOT LIBRETRO) - target_sources(common PRIVATE - GL/GLInterface/AGL.h - GL/GLInterface/AGL.mm - ) -elseif(HAIKU) - target_sources(common PRIVATE - GL/GLInterface/BGL.h - GL/GLInterface/BGL.cpp - ) -elseif(ENABLE_X11 AND X11_FOUND) - target_sources(common PRIVATE - GL/GLX11Window.cpp - GL/GLX11Window.h - ) -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - target_link_libraries(common PUBLIC dl rt) -endif() - -if(WIN32) - target_sources(common PRIVATE HRWrap.h HRWrap.cpp) -else() - target_link_libraries(common PRIVATE Iconv::Iconv) -endif() - -if(USE_UPNP) - target_link_libraries(common PRIVATE Miniupnpc::miniupnpc) -endif() - -if(ENABLE_LLVM) - find_package(LLVM CONFIG) - if(LLVM_FOUND) - message(STATUS "LLVM found, enabling LLVM support in disassembler") - target_compile_definitions(common PRIVATE HAVE_LLVM) - # Minimal documentation about LLVM's CMake functions is available here: - # https://releases.llvm.org/16.0.0/docs/CMake.html#embedding-llvm-in-your-project - # https://groups.google.com/g/llvm-dev/c/YeEVe7HTasQ?pli=1 - # - # However, you have to read the source code in any case. - # Look for LLVM-Config.cmake in your (Unix) system: - # $ find /usr -name LLVM-Config\\.cmake 2>/dev/null - llvm_expand_pseudo_components(LLVM_EXPAND_COMPONENTS - AllTargetsInfos AllTargetsDisassemblers AllTargetsCodeGens - ) - llvm_config(common USE_SHARED - mcdisassembler target ${LLVM_EXPAND_COMPONENTS} - ) - target_include_directories(common PRIVATE ${LLVM_INCLUDE_DIRS}) - endif() -endif() - -if(UNIX AND NOT LIBRETRO) - # Posix networking code needs to be fixed for Windows - add_executable(traversal_server TraversalServer.cpp) - target_link_libraries(traversal_server PRIVATE common fmt::fmt) - if(SYSTEMD_FOUND) - target_link_libraries(traversal_server PRIVATE ${SYSTEMD_LIBRARIES}) - endif() - elseif(WIN32 AND NOT LIBRETRO) - find_package(PowerShell REQUIRED) - execute_process( - COMMAND ${POWERSHELL_EXE} -Command "[System.Diagnostics.FileVersionInfo]::GetVersionInfo('$ENV{VCToolsRedistDir}vc_redist.x64.exe').ProductVersion" - OUTPUT_VARIABLE VC_TOOLS_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/build_info.txt.in" - "${CMAKE_BINARY_DIR}/build_info.txt" - ) - - target_link_libraries(common PRIVATE "-INCLUDE:enableCompatPatches") -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(common PRIVATE use_pch) -endif() - -if(LIBRETRO) - target_include_directories(common PRIVATE ${CMAKE_SOURCE_DIR}/Externals/libretro-common/include) - target_link_libraries(common PRIVATE dolphin_libretro_videocontexts) -endif() diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt deleted file mode 100644 index baad9c0941..0000000000 --- a/Source/Core/Core/CMakeLists.txt +++ /dev/null @@ -1,866 +0,0 @@ -add_library(core - AchievementManager.cpp - AchievementManager.h - ActionReplay.cpp - ActionReplay.h - ARDecrypt.cpp - ARDecrypt.h - Boot/AncastTypes.h - Boot/Boot_BS2Emu.cpp - Boot/Boot_WiiWAD.cpp - Boot/Boot.cpp - Boot/Boot.h - Boot/DolReader.cpp - Boot/DolReader.h - Boot/ElfReader.cpp - Boot/ElfReader.h - Boot/ElfTypes.h - BootManager.cpp - BootManager.h - CheatCodes.h - CheatGeneration.cpp - CheatGeneration.h - CheatSearch.cpp - CheatSearch.h - CommonTitles.h - Config/AchievementSettings.cpp - Config/AchievementSettings.h - Config/DefaultLocale.cpp - Config/DefaultLocale.h - Config/FreeLookSettings.cpp - Config/FreeLookSettings.h - Config/GraphicsSettings.cpp - Config/GraphicsSettings.h - Config/MainSettings.cpp - Config/MainSettings.h - Config/NetplaySettings.cpp - Config/NetplaySettings.h - Config/SessionSettings.cpp - Config/SessionSettings.h - Config/SYSCONFSettings.cpp - Config/SYSCONFSettings.h - Config/UISettings.cpp - Config/UISettings.h - Config/WiimoteSettings.cpp - Config/WiimoteSettings.h - ConfigLoaders/BaseConfigLoader.cpp - ConfigLoaders/BaseConfigLoader.h - ConfigLoaders/GameConfigLoader.cpp - ConfigLoaders/GameConfigLoader.h - ConfigLoaders/IsSettingSaveable.cpp - ConfigLoaders/IsSettingSaveable.h - ConfigLoaders/MovieConfigLoader.cpp - ConfigLoaders/MovieConfigLoader.h - ConfigLoaders/NetPlayConfigLoader.cpp - ConfigLoaders/NetPlayConfigLoader.h - ConfigManager.cpp - ConfigManager.h - Core.cpp - Core.h - CoreTiming.cpp - CoreTiming.h - CPUThreadConfigCallback.cpp - CPUThreadConfigCallback.h - Debugger/BranchWatch.cpp - Debugger/BranchWatch.h - Debugger/CodeTrace.cpp - Debugger/CodeTrace.h - Debugger/DebugInterface.h - Debugger/Debugger_SymbolMap.cpp - Debugger/Debugger_SymbolMap.h - Debugger/Dump.cpp - Debugger/Dump.h - Debugger/OSThread.cpp - Debugger/OSThread.h - Debugger/PPCDebugInterface.cpp - Debugger/PPCDebugInterface.h - Debugger/RSO.cpp - Debugger/RSO.h - DolphinAnalytics.cpp - DolphinAnalytics.h - DSP/DSPAccelerator.cpp - DSP/DSPAccelerator.h - DSP/DSPAnalyzer.cpp - DSP/DSPAnalyzer.h - DSP/DSPAssembler.cpp - DSP/DSPAssembler.h - DSP/DSPCaptureLogger.cpp - DSP/DSPCaptureLogger.h - DSP/DSPCodeUtil.cpp - DSP/DSPCodeUtil.h - DSP/DSPCommon.h - DSP/DSPCore.cpp - DSP/DSPCore.h - DSP/DSPDisassembler.cpp - DSP/DSPDisassembler.h - DSP/DSPHWInterface.cpp - DSP/DSPMemoryMap.cpp - DSP/DSPStacks.cpp - DSP/DSPTables.cpp - DSP/DSPTables.h - DSP/Interpreter/DSPIntArithmetic.cpp - DSP/Interpreter/DSPIntBranch.cpp - DSP/Interpreter/DSPIntCCUtil.h - DSP/Interpreter/DSPInterpreter.cpp - DSP/Interpreter/DSPInterpreter.h - DSP/Interpreter/DSPIntExtOps.cpp - DSP/Interpreter/DSPIntLoadStore.cpp - DSP/Interpreter/DSPIntMisc.cpp - DSP/Interpreter/DSPIntMultiplier.cpp - DSP/Interpreter/DSPIntTables.cpp - DSP/Interpreter/DSPIntTables.h - DSP/Interpreter/DSPIntUtil.h - DSP/Jit/DSPEmitterBase.cpp - DSP/Jit/DSPEmitterBase.h - DSP/LabelMap.cpp - DSP/LabelMap.h - DSPEmulator.cpp - DSPEmulator.h - FifoPlayer/FifoDataFile.cpp - FifoPlayer/FifoDataFile.h - FifoPlayer/FifoPlayer.cpp - FifoPlayer/FifoPlayer.h - FifoPlayer/FifoRecorder.cpp - FifoPlayer/FifoRecorder.h - FreeLookManager.cpp - FreeLookManager.h - GeckoCode.cpp - GeckoCode.h - GeckoCodeConfig.cpp - GeckoCodeConfig.h - HLE/HLE_Misc.cpp - HLE/HLE_Misc.h - HLE/HLE_OS.cpp - HLE/HLE_OS.h - HLE/HLE_VarArgs.cpp - HLE/HLE_VarArgs.h - HLE/HLE.cpp - HLE/HLE.h - Host.h - HotkeyManager.cpp - HotkeyManager.h - HW/AddressSpace.cpp - HW/AddressSpace.h - HW/AudioInterface.cpp - HW/AudioInterface.h - HW/CPU.cpp - HW/CPU.h - HW/DSP.cpp - HW/DSP.h - HW/DSPHLE/DSPHLE.cpp - HW/DSPHLE/DSPHLE.h - HW/DSPHLE/MailHandler.cpp - HW/DSPHLE/MailHandler.h - HW/DSPHLE/UCodes/ASnd.cpp - HW/DSPHLE/UCodes/ASnd.h - HW/DSPHLE/UCodes/AESnd.cpp - HW/DSPHLE/UCodes/AESnd.h - HW/DSPHLE/UCodes/AX.cpp - HW/DSPHLE/UCodes/AX.h - HW/DSPHLE/UCodes/AXStructs.h - HW/DSPHLE/UCodes/AXVoice.h - HW/DSPHLE/UCodes/AXWii.cpp - HW/DSPHLE/UCodes/AXWii.h - HW/DSPHLE/UCodes/CARD.cpp - HW/DSPHLE/UCodes/CARD.h - HW/DSPHLE/UCodes/GBA.cpp - HW/DSPHLE/UCodes/GBA.h - HW/DSPHLE/UCodes/INIT.cpp - HW/DSPHLE/UCodes/INIT.h - HW/DSPHLE/UCodes/ROM.cpp - HW/DSPHLE/UCodes/ROM.h - HW/DSPHLE/UCodes/UCodes.cpp - HW/DSPHLE/UCodes/UCodes.h - HW/DSPHLE/UCodes/Zelda.cpp - HW/DSPHLE/UCodes/Zelda.h - HW/DSPLLE/DSPHost.cpp - HW/DSPLLE/DSPLLE.cpp - HW/DSPLLE/DSPLLE.h - HW/DSPLLE/DSPSymbols.cpp - HW/DSPLLE/DSPSymbols.h - HW/DVD/DVDInterface.cpp - HW/DVD/DVDInterface.h - HW/DVD/AMMediaboard.cpp - HW/DVD/AMMediaboard.h - HW/DVD/DVDMath.cpp - HW/DVD/DVDMath.h - HW/DVD/DVDThread.cpp - HW/DVD/DVDThread.h - HW/DVD/FileMonitor.cpp - HW/DVD/FileMonitor.h - HW/EXI/BBA/TAPServerConnection.cpp - HW/EXI/BBA/TAPServerBBA.cpp - HW/EXI/BBA/XLINK_KAI_BBA.cpp - HW/EXI/BBA/BuiltIn.cpp - HW/EXI/BBA/BuiltIn.h - HW/EXI/Modem/TAPServerModem.cpp - HW/EXI/EXI_Channel.cpp - HW/EXI/EXI_Channel.h - HW/EXI/EXI_Device.cpp - HW/EXI/EXI_Device.h - HW/EXI/EXI_DeviceAD16.cpp - HW/EXI/EXI_DeviceAD16.h - HW/EXI/EXI_DeviceAGP.cpp - HW/EXI/EXI_DeviceAGP.h - HW/EXI/EXI_DeviceBaseboard.cpp - HW/EXI/EXI_DeviceBaseboard.h - HW/EXI/EXI_DeviceDummy.cpp - HW/EXI/EXI_DeviceDummy.h - HW/EXI/EXI_DeviceEthernet.cpp - HW/EXI/EXI_DeviceEthernet.h - HW/EXI/EXI_DeviceGecko.cpp - HW/EXI/EXI_DeviceGecko.h - HW/EXI/EXI_DeviceIPL.cpp - HW/EXI/EXI_DeviceIPL.h - HW/EXI/EXI_DeviceMemoryCard.cpp - HW/EXI/EXI_DeviceMemoryCard.h - HW/EXI/EXI_DeviceModem.cpp - HW/EXI/EXI_DeviceModem.h - HW/EXI/EXI.cpp - HW/EXI/EXI.h - HW/GBAPad.cpp - HW/GBAPad.h - HW/GBAPadEmu.cpp - HW/GBAPadEmu.h - HW/GCKeyboard.cpp - HW/GCKeyboard.h - HW/GCKeyboardEmu.cpp - HW/GCKeyboardEmu.h - HW/GCMemcard/GCIFile.cpp - HW/GCMemcard/GCIFile.h - HW/GCMemcard/GCMemcard.cpp - HW/GCMemcard/GCMemcard.h - HW/GCMemcard/GCMemcardBase.h - HW/GCMemcard/GCMemcardDirectory.cpp - HW/GCMemcard/GCMemcardDirectory.h - HW/GCMemcard/GCMemcardRaw.cpp - HW/GCMemcard/GCMemcardRaw.h - HW/GCMemcard/GCMemcardUtils.cpp - HW/GCMemcard/GCMemcardUtils.h - HW/GCPad.cpp - HW/GCPad.h - HW/GCPadEmu.cpp - HW/GCPadEmu.h - HW/GPFifo.cpp - HW/GPFifo.h - HW/HSP/HSP.cpp - HW/HSP/HSP.h - HW/HSP/HSP_Device.cpp - HW/HSP/HSP_Device.h - HW/HSP/HSP_DeviceARAMExpansion.cpp - HW/HSP/HSP_DeviceARAMExpansion.h - HW/HSP/HSP_DeviceGBPlayer.cpp - HW/HSP/HSP_DeviceGBPlayer.h - HW/HSP/HSP_DeviceNull.cpp - HW/HSP/HSP_DeviceNull.h - HW/HW.cpp - HW/HW.h - HW/MagCard/C1231BR.cpp - HW/MagCard/C1231BR.h - HW/MagCard/C1231LR.cpp - HW/MagCard/C1231LR.h - HW/MagCard/MagneticCardReader.cpp - HW/MagCard/MagneticCardReader.h - HW/Memmap.cpp - HW/Memmap.h - HW/MemoryInterface.cpp - HW/MemoryInterface.h - HW/MMIO.cpp - HW/MMIO.h - HW/ProcessorInterface.cpp - HW/ProcessorInterface.h - HW/SI/SI_Device.cpp - HW/SI/SI_Device.h - HW/SI/SI_DeviceDanceMat.cpp - HW/SI/SI_DeviceDanceMat.h - HW/SI/SI_DeviceGBA.cpp - HW/SI/SI_DeviceGBA.h - HW/SI/SI_DeviceGCAdapter.cpp - HW/SI/SI_DeviceGCAdapter.h - HW/SI/SI_DeviceGCController.cpp - HW/SI/SI_DeviceGCController.h - HW/SI/SI_DeviceGCSteeringWheel.cpp - HW/SI/SI_DeviceGCSteeringWheel.h - HW/SI/SI_DeviceKeyboard.cpp - HW/SI/SI_DeviceKeyboard.h - HW/SI/SI_DeviceAMBaseboard.cpp - HW/SI/SI_DeviceAMBaseboard.h - HW/SI/SI_DeviceNull.cpp - HW/SI/SI_DeviceNull.h - HW/SI/SI.cpp - HW/SI/SI.h - HW/Sram.cpp - HW/Sram.h - HW/StreamADPCM.cpp - HW/StreamADPCM.h - HW/SystemTimers.cpp - HW/SystemTimers.h - HW/Triforce/DeckReader.cpp - HW/Triforce/DeckReader.h - HW/Triforce/FZeroAX.cpp - HW/Triforce/FZeroAX.h - HW/Triforce/ICCardReader.cpp - HW/Triforce/ICCardReader.h - HW/Triforce/IOPorts.cpp - HW/Triforce/IOPorts.h - HW/Triforce/JVSIO.cpp - HW/Triforce/JVSIO.h - HW/Triforce/MarioKartGP.cpp - HW/Triforce/MarioKartGP.h - HW/Triforce/SerialDevice.cpp - HW/Triforce/SerialDevice.h - HW/Triforce/Touchscreen.cpp - HW/Triforce/Touchscreen.h - HW/VideoInterface.cpp - HW/VideoInterface.h - HW/WII_IPC.cpp - HW/WII_IPC.h - HW/Wiimote.cpp - HW/Wiimote.h - HW/WiimoteCommon/DataReport.cpp - HW/WiimoteCommon/DataReport.h - HW/WiimoteCommon/WiimoteConstants.h - HW/WiimoteCommon/WiimoteHid.h - HW/WiimoteCommon/WiimoteReport.h - HW/WiimoteEmu/Camera.cpp - HW/WiimoteEmu/Camera.h - HW/WiimoteEmu/DesiredWiimoteState.cpp - HW/WiimoteEmu/DesiredWiimoteState.h - HW/WiimoteEmu/Dynamics.cpp - HW/WiimoteEmu/Dynamics.h - HW/WiimoteEmu/EmuSubroutines.cpp - HW/WiimoteEmu/Encryption.cpp - HW/WiimoteEmu/Encryption.h - HW/WiimoteEmu/Extension/Classic.cpp - HW/WiimoteEmu/Extension/Classic.h - HW/WiimoteEmu/Extension/DesiredExtensionState.h - HW/WiimoteEmu/Extension/DrawsomeTablet.cpp - HW/WiimoteEmu/Extension/DrawsomeTablet.h - HW/WiimoteEmu/Extension/Drums.cpp - HW/WiimoteEmu/Extension/Drums.h - HW/WiimoteEmu/Extension/Extension.cpp - HW/WiimoteEmu/Extension/Extension.h - HW/WiimoteEmu/Extension/Guitar.cpp - HW/WiimoteEmu/Extension/Guitar.h - HW/WiimoteEmu/Extension/Nunchuk.cpp - HW/WiimoteEmu/Extension/Nunchuk.h - HW/WiimoteEmu/Extension/Shinkansen.cpp - HW/WiimoteEmu/Extension/Shinkansen.h - HW/WiimoteEmu/Extension/TaTaCon.cpp - HW/WiimoteEmu/Extension/TaTaCon.h - HW/WiimoteEmu/Extension/Turntable.cpp - HW/WiimoteEmu/Extension/Turntable.h - HW/WiimoteEmu/Extension/UDrawTablet.cpp - HW/WiimoteEmu/Extension/UDrawTablet.h - HW/WiimoteEmu/ExtensionPort.cpp - HW/WiimoteEmu/ExtensionPort.h - HW/WiimoteEmu/I2CBus.cpp - HW/WiimoteEmu/I2CBus.h - HW/WiimoteEmu/MotionPlus.cpp - HW/WiimoteEmu/MotionPlus.h - HW/WiimoteEmu/Speaker.cpp - HW/WiimoteEmu/Speaker.h - HW/WiimoteEmu/WiimoteEmu.cpp - HW/WiimoteEmu/WiimoteEmu.h - HW/WiimoteReal/WiimoteReal.cpp - HW/WiimoteReal/WiimoteReal.h - HW/WiiSave.cpp - HW/WiiSave.h - HW/WiiSaveStructs.h - IOS/Device.cpp - IOS/Device.h - IOS/DeviceStub.cpp - IOS/DeviceStub.h - IOS/Crypto/AesDevice.cpp - IOS/Crypto/AesDevice.h - IOS/Crypto/Sha.cpp - IOS/Crypto/Sha.h - IOS/DI/DI.cpp - IOS/DI/DI.h - IOS/DolphinDevice.cpp - IOS/DolphinDevice.h - IOS/ES/ES.cpp - IOS/ES/ES.h - IOS/ES/Formats.cpp - IOS/ES/Formats.h - IOS/ES/Identity.cpp - IOS/ES/NandUtils.cpp - IOS/ES/TitleContents.cpp - IOS/ES/TitleInformation.cpp - IOS/ES/TitleManagement.cpp - IOS/ES/Views.cpp - IOS/FS/FileSystem.h - IOS/FS/FileSystemCommon.cpp - IOS/FS/FileSystemProxy.cpp - IOS/FS/FileSystemProxy.h - IOS/FS/HostBackend/File.cpp - IOS/FS/HostBackend/FS.cpp - IOS/FS/HostBackend/FS.h - IOS/IOS.cpp - IOS/IOS.h - IOS/IOSC.cpp - IOS/IOSC.h - IOS/MIOS.cpp - IOS/MIOS.h - IOS/Network/ICMP.h - IOS/Network/ICMPLin.cpp - IOS/Network/IP/Top.cpp - IOS/Network/IP/Top.h - IOS/Network/KD/NetKDRequest.cpp - IOS/Network/KD/NetKDRequest.h - IOS/Network/KD/NetKDTime.cpp - IOS/Network/KD/NetKDTime.h - IOS/Network/KD/NWC24Config.cpp - IOS/Network/KD/NWC24Config.h - IOS/Network/KD/NWC24DL.cpp - IOS/Network/KD/NWC24DL.h - IOS/Network/KD/VFF/VFFUtil.cpp - IOS/Network/KD/VFF/VFFUtil.h - IOS/Network/KD/WC24File.h - IOS/Network/KD/Mail/MailCommon.h - IOS/Network/KD/Mail/WC24FriendList.cpp - IOS/Network/KD/Mail/WC24FriendList.h - IOS/Network/KD/Mail/WC24Send.cpp - IOS/Network/KD/Mail/WC24Send.h - IOS/Network/MACUtils.cpp - IOS/Network/MACUtils.h - IOS/Network/NCD/Manage.cpp - IOS/Network/NCD/Manage.h - IOS/Network/NCD/WiiNetConfig.cpp - IOS/Network/NCD/WiiNetConfig.h - IOS/Network/Socket.cpp - IOS/Network/Socket.h - IOS/Network/SSL.cpp - IOS/Network/SSL.h - IOS/Network/WD/Command.cpp - IOS/Network/WD/Command.h - IOS/SDIO/SDIOSlot0.cpp - IOS/SDIO/SDIOSlot0.h - IOS/STM/STM.cpp - IOS/STM/STM.h - IOS/USB/Bluetooth/BTBase.cpp - IOS/USB/Bluetooth/BTBase.h - IOS/USB/Bluetooth/BTEmu.cpp - IOS/USB/Bluetooth/BTEmu.h - IOS/USB/Bluetooth/BTStub.cpp - IOS/USB/Bluetooth/BTStub.h - IOS/USB/Bluetooth/hci.h - IOS/USB/Bluetooth/l2cap.h - IOS/USB/Bluetooth/WiimoteDevice.cpp - IOS/USB/Bluetooth/WiimoteDevice.h - IOS/USB/Bluetooth/WiimoteHIDAttr.cpp - IOS/USB/Bluetooth/WiimoteHIDAttr.h - IOS/USB/Common.cpp - IOS/USB/Common.h - IOS/USB/Emulated/Infinity.cpp - IOS/USB/Emulated/Infinity.h - IOS/USB/Emulated/Microphone.cpp - IOS/USB/Emulated/Microphone.h - IOS/USB/Emulated/Skylanders/Skylander.cpp - IOS/USB/Emulated/Skylanders/Skylander.h - IOS/USB/Emulated/Skylanders/SkylanderCrypto.cpp - IOS/USB/Emulated/Skylanders/SkylanderCrypto.h - IOS/USB/Emulated/Skylanders/SkylanderFigure.cpp - IOS/USB/Emulated/Skylanders/SkylanderFigure.h - IOS/USB/Emulated/WiiSpeak.cpp - IOS/USB/Emulated/WiiSpeak.h - IOS/USB/Emulated/LogitechMic.cpp - IOS/USB/Emulated/LogitechMic.h - IOS/USB/Host.cpp - IOS/USB/Host.h - IOS/USB/OH0/OH0.cpp - IOS/USB/OH0/OH0.h - IOS/USB/OH0/OH0Device.cpp - IOS/USB/OH0/OH0Device.h - IOS/USB/USB_HID/HIDv4.cpp - IOS/USB/USB_HID/HIDv4.h - IOS/USB/USB_HID/HIDv5.cpp - IOS/USB/USB_HID/HIDv5.h - IOS/USB/USB_KBD.cpp - IOS/USB/USB_KBD.h - IOS/USB/USB_VEN/VEN.cpp - IOS/USB/USB_VEN/VEN.h - IOS/USB/USBScanner.cpp - IOS/USB/USBScanner.h - IOS/USB/USBV0.cpp - IOS/USB/USBV0.h - IOS/USB/USBV4.cpp - IOS/USB/USBV4.h - IOS/USB/USBV5.cpp - IOS/USB/USBV5.h - IOS/VersionInfo.cpp - IOS/VersionInfo.h - IOS/WFS/WFSI.cpp - IOS/WFS/WFSI.h - IOS/WFS/WFSSRV.cpp - IOS/WFS/WFSSRV.h - LibusbUtils.cpp - LibusbUtils.h - MemTools.cpp - MemTools.h - Movie.cpp - Movie.h - NetPlayClient.cpp - NetPlayClient.h - NetPlayCommon.cpp - NetPlayCommon.h - NetPlayServer.cpp - NetPlayServer.h - NetworkCaptureLogger.cpp - NetworkCaptureLogger.h - PatchEngine.cpp - PatchEngine.h - PowerPC/BreakPoints.cpp - PowerPC/BreakPoints.h - PowerPC/CachedInterpreter/CachedInterpreter_Disassembler.cpp - PowerPC/CachedInterpreter/CachedInterpreter.cpp - PowerPC/CachedInterpreter/CachedInterpreter.h - PowerPC/CachedInterpreter/CachedInterpreterBlockCache.cpp - PowerPC/CachedInterpreter/CachedInterpreterBlockCache.h - PowerPC/CachedInterpreter/CachedInterpreterEmitter.cpp - PowerPC/CachedInterpreter/CachedInterpreterEmitter.h - PowerPC/ConditionRegister.cpp - PowerPC/ConditionRegister.h - PowerPC/Expression.cpp - PowerPC/Expression.h - PowerPC/Interpreter/ExceptionUtils.h - PowerPC/Interpreter/Interpreter_Branch.cpp - PowerPC/Interpreter/Interpreter_FloatingPoint.cpp - PowerPC/Interpreter/Interpreter_FPUtils.h - PowerPC/Interpreter/Interpreter_Integer.cpp - PowerPC/Interpreter/Interpreter_LoadStore.cpp - PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp - PowerPC/Interpreter/Interpreter_Paired.cpp - PowerPC/Interpreter/Interpreter_SystemRegisters.cpp - PowerPC/Interpreter/Interpreter_Tables.cpp - PowerPC/Interpreter/Interpreter.cpp - PowerPC/Interpreter/Interpreter.h - PowerPC/JitCommon/ConstantPropagation.cpp - PowerPC/JitCommon/ConstantPropagation.h - PowerPC/JitCommon/DivUtils.cpp - PowerPC/JitCommon/DivUtils.h - PowerPC/JitCommon/JitAsmCommon.cpp - PowerPC/JitCommon/JitAsmCommon.h - PowerPC/JitCommon/JitBase.cpp - PowerPC/JitCommon/JitBase.h - PowerPC/JitCommon/JitCache.cpp - PowerPC/JitCommon/JitCache.h - PowerPC/JitInterface.cpp - PowerPC/JitInterface.h - PowerPC/GDBStub.cpp - PowerPC/GDBStub.h - PowerPC/MMU.cpp - PowerPC/MMU.h - PowerPC/PowerPC.cpp - PowerPC/PowerPC.h - PowerPC/PPCAnalyst.cpp - PowerPC/PPCAnalyst.h - PowerPC/PPCCache.cpp - PowerPC/PPCCache.h - PowerPC/PPCSymbolDB.cpp - PowerPC/PPCSymbolDB.h - PowerPC/PPCTables.cpp - PowerPC/PPCTables.h - PowerPC/SignatureDB/CSVSignatureDB.cpp - PowerPC/SignatureDB/CSVSignatureDB.h - PowerPC/SignatureDB/DSYSignatureDB.cpp - PowerPC/SignatureDB/DSYSignatureDB.h - PowerPC/SignatureDB/MEGASignatureDB.cpp - PowerPC/SignatureDB/MEGASignatureDB.h - PowerPC/SignatureDB/SignatureDB.cpp - PowerPC/SignatureDB/SignatureDB.h - State.cpp - State.h - SyncIdentifier.h - SysConf.cpp - SysConf.h - System.cpp - System.h - TimePlayed.cpp - TimePlayed.h - TitleDatabase.cpp - TitleDatabase.h - USBUtils.cpp - USBUtils.h - WC24PatchEngine.cpp - WC24PatchEngine.h - WiiRoot.cpp - WiiRoot.h - WiiUtils.cpp - WiiUtils.h -) - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/AchievementApprovedHash.h - COMMAND ${CMAKE_COMMAND} - -DJSON_FILE=${CMAKE_SOURCE_DIR}/Data/Sys/ApprovedInis.json - -DTEMPLATE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/AchievementApprovedHash.h.in - -DOUTPUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/AchievementApprovedHash.h - -P ${CMAKE_SOURCE_DIR}/CMake/GenerateAchievementHash.cmake - DEPENDS ${CMAKE_SOURCE_DIR}/Data/Sys/ApprovedInis.json - ${CMAKE_CURRENT_SOURCE_DIR}/AchievementApprovedHash.h.in - COMMENT "Generating AchievementApprovedHash.h" -) - -target_sources(core PRIVATE AchievementApprovedHash.h) - -if(_M_X86_64) - target_sources(core PRIVATE - DSP/Jit/x64/DSPEmitter.cpp - DSP/Jit/x64/DSPEmitter.h - DSP/Jit/x64/DSPJitArithmetic.cpp - DSP/Jit/x64/DSPJitBranch.cpp - DSP/Jit/x64/DSPJitCCUtil.cpp - DSP/Jit/x64/DSPJitExtOps.cpp - DSP/Jit/x64/DSPJitLoadStore.cpp - DSP/Jit/x64/DSPJitMisc.cpp - DSP/Jit/x64/DSPJitMultiplier.cpp - DSP/Jit/x64/DSPJitRegCache.cpp - DSP/Jit/x64/DSPJitRegCache.h - DSP/Jit/x64/DSPJitTables.cpp - DSP/Jit/x64/DSPJitTables.h - DSP/Jit/x64/DSPJitUtil.cpp - PowerPC/Jit64/Jit.cpp - PowerPC/Jit64/Jit.h - PowerPC/Jit64/Jit64_Tables.cpp - PowerPC/Jit64/Jit_Branch.cpp - PowerPC/Jit64/Jit_FloatingPoint.cpp - PowerPC/Jit64/Jit_Integer.cpp - PowerPC/Jit64/Jit_LoadStore.cpp - PowerPC/Jit64/Jit_LoadStoreFloating.cpp - PowerPC/Jit64/Jit_LoadStorePaired.cpp - PowerPC/Jit64/Jit_Paired.cpp - PowerPC/Jit64/Jit_SystemRegisters.cpp - PowerPC/Jit64/JitAsm.cpp - PowerPC/Jit64/JitAsm.h - PowerPC/Jit64/RegCache/CachedReg.h - PowerPC/Jit64/RegCache/FPURegCache.cpp - PowerPC/Jit64/RegCache/FPURegCache.h - PowerPC/Jit64/RegCache/GPRRegCache.cpp - PowerPC/Jit64/RegCache/GPRRegCache.h - PowerPC/Jit64/RegCache/JitRegCache.cpp - PowerPC/Jit64/RegCache/JitRegCache.h - PowerPC/Jit64/RegCache/RCMode.h - PowerPC/Jit64Common/BlockCache.cpp - PowerPC/Jit64Common/BlockCache.h - PowerPC/Jit64Common/ConstantPool.cpp - PowerPC/Jit64Common/ConstantPool.h - PowerPC/Jit64Common/EmuCodeBlock.cpp - PowerPC/Jit64Common/EmuCodeBlock.h - PowerPC/Jit64Common/FarCodeCache.cpp - PowerPC/Jit64Common/FarCodeCache.h - PowerPC/Jit64Common/Jit64AsmCommon.cpp - PowerPC/Jit64Common/Jit64AsmCommon.h - PowerPC/Jit64Common/Jit64Constants.h - PowerPC/Jit64Common/Jit64PowerPCState.h - PowerPC/Jit64Common/TrampolineCache.cpp - PowerPC/Jit64Common/TrampolineCache.h - PowerPC/Jit64Common/TrampolineInfo.h - ) -elseif(_M_ARM_64) - target_sources(core PRIVATE - PowerPC/JitArm64/Jit.cpp - PowerPC/JitArm64/Jit.h - PowerPC/JitArm64/JitAsm.cpp - PowerPC/JitArm64/JitArm64Cache.cpp - PowerPC/JitArm64/JitArm64_BackPatch.cpp - PowerPC/JitArm64/JitArm64_Branch.cpp - PowerPC/JitArm64/JitArm64_FloatingPoint.cpp - PowerPC/JitArm64/JitArm64_Integer.cpp - PowerPC/JitArm64/JitArm64_LoadStore.cpp - PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp - PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp - PowerPC/JitArm64/JitArm64_Paired.cpp - PowerPC/JitArm64/JitArm64_RegCache.cpp - PowerPC/JitArm64/JitArm64_RegCache.h - PowerPC/JitArm64/JitArm64_SystemRegisters.cpp - PowerPC/JitArm64/Jit_Util.cpp - PowerPC/JitArm64/Jit_Util.h - PowerPC/JitArm64/JitArm64_Tables.cpp - PowerPC/JitArmCommon/BackPatch.h - ) -endif() - -target_link_libraries(core -PUBLIC - audiocommon - common - discio - enet::enet - expr - inputcommon - MbedTLS::mbedtls - pugixml - sfml-network - videonull - videoogl - videosoftware - -PRIVATE - FatFs - fmt::fmt - LZO::LZO - LZ4::LZ4 - ZLIB::ZLIB -) - -if(LIBUDEV_FOUND) - target_include_directories(core PRIVATE ${LIBUDEV_INCLUDE_DIR}) - target_link_libraries(core PRIVATE ${LIBUDEV_LIBRARY}) -endif() - -if (APPLE) - target_link_libraries(core - PRIVATE - ${CORESERV_LIBRARY} - ${IOB_LIBRARY} - ${IOK_LIBRARY} - resolv - ) -elseif (ANDROID) - target_link_libraries(core - PRIVATE - androidcommon - ) -endif() - -if(ENABLE_CUBEB) - target_link_libraries(core PUBLIC cubeb) -endif() -if(ENABLE_CUBEB OR LIBRETRO) - target_sources(core PRIVATE - HW/EXI/EXI_DeviceMic.cpp - HW/EXI/EXI_DeviceMic.h - ) -endif() - -if(TARGET LibUSB::LibUSB) - target_link_libraries(core PUBLIC LibUSB::LibUSB) - target_sources(core PRIVATE - IOS/USB/LibusbDevice.cpp - IOS/USB/LibusbDevice.h - IOS/USB/Bluetooth/BTReal.cpp - IOS/USB/Bluetooth/BTReal.h - IOS/USB/Bluetooth/LibUSBBluetoothAdapter.cpp - IOS/USB/Bluetooth/LibUSBBluetoothAdapter.h - IOS/USB/Bluetooth/RealtekFirmwareLoader.cpp - IOS/USB/Bluetooth/RealtekFirmwareLoader.h - ) -endif() - -if(ENABLE_VULKAN) - target_link_libraries(core PUBLIC videovulkan) -endif() - -if(APPLE AND NOT LIBRETRO) - target_link_libraries(core PUBLIC videometal) -endif() - -if(USE_MGBA) - target_sources(core PRIVATE - HW/GBACore.cpp - HW/GBACore.h - HW/SI/SI_DeviceGBAEmu.cpp - HW/SI/SI_DeviceGBAEmu.h - ) - target_link_libraries(core PUBLIC mGBA::mgba) - target_compile_definitions(core PUBLIC -DHAS_LIBMGBA) -endif() - -if(WIN32) - target_sources(core PRIVATE - HW/EXI/BBA/TAP_Win32.cpp - HW/EXI/BBA/TAP_Win32.h - HW/WiimoteReal/IOWin.cpp - HW/WiimoteReal/IOWin.h - ) - target_link_libraries(core PUBLIC - videod3d - videod3d12 - setupapi.lib - iphlpapi.lib - ) - target_compile_definitions(core PRIVATE "-D_WINSOCK_DEPRECATED_NO_WARNINGS") -elseif(APPLE) - target_sources(core PRIVATE - HW/EXI/BBA/TAP_Apple.cpp - ) - target_link_libraries(core PUBLIC ${IOB_LIBRARY}) -elseif(UNIX) - target_sources(core PRIVATE - HW/EXI/BBA/TAP_Unix.cpp - ) - if(ANDROID AND NOT LIBRETRO) - target_sources(core PRIVATE - HW/WiimoteReal/IOAndroid.cpp - HW/WiimoteReal/IOAndroid.h - ) - endif() -endif() - -# Bluez doesn't support all the communication modes on FreeBSD, so only using it on Linux -if(LINUX) - option(ENABLE_BLUEZ "Enables bluetooth support" ON) - if(ENABLE_BLUEZ) - find_package(BlueZ) - if(BlueZ_FOUND) - message(STATUS "BlueZ found, enabling bluetooth support") - target_sources(core PRIVATE - HW/WiimoteReal/IOLinux.cpp - HW/WiimoteReal/IOLinux.h - ) - target_link_libraries(core PUBLIC BlueZ::BlueZ) - target_compile_definitions(core PRIVATE -DHAVE_BLUEZ=1) - else() - message(STATUS "BlueZ NOT found, disabling bluetooth support") - endif() - else() - message(STATUS "BlueZ explicitly disabled, disabling bluetooth support") - endif() -endif() - -if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") - # OpenBSD doesn't allow memory to be both writable and executable by default. - # The JIT currently needs this. - target_link_options(core PUBLIC -Wl,-zwxneeded) -endif() - -if(TARGET Hidapi::Hidapi) - target_sources(core PRIVATE - HW/WiimoteReal/IOhidapi.cpp - HW/WiimoteReal/IOhidapi.h - ) - target_link_libraries(core PUBLIC Hidapi::Hidapi) - target_compile_definitions(core PRIVATE -DHAVE_HIDAPI=1) -endif() - -if(UNIX) - target_sources(core PRIVATE - MemoryWatcher.cpp - MemoryWatcher.h - ) -endif() - -if(TARGET cpp-ipc::ipc) - target_sources(core PRIVATE HW/EXI/BBA/IPC.cpp) - target_link_libraries(core PRIVATE cpp-ipc::ipc) -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(core PRIVATE use_pch) -endif() - -if(USE_RETRO_ACHIEVEMENTS) - target_link_libraries(core PUBLIC rcheevos) - target_compile_definitions(core PUBLIC -DUSE_RETRO_ACHIEVEMENTS) - target_compile_definitions(core PUBLIC -DRC_CLIENT_SUPPORTS_HASH) - if(RC_CLIENT_SUPPORTS_RAINTEGRATION) - target_compile_definitions(core PUBLIC -DRC_CLIENT_SUPPORTS_RAINTEGRATION) - endif() -endif() - -if(LIBRETRO) - # for Microphone - target_include_directories(core PRIVATE ${CMAKE_SOURCE_DIR}/Externals/Libretro/Include) -endif() diff --git a/Source/Core/DiscIO/CMakeLists.txt b/Source/Core/DiscIO/CMakeLists.txt deleted file mode 100644 index bfec96dd9d..0000000000 --- a/Source/Core/DiscIO/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -add_library(discio - Blob.cpp - Blob.h - CISOBlob.cpp - CISOBlob.h - CachedBlob.cpp - CachedBlob.h - CompressedBlob.cpp - CompressedBlob.h - DirectoryBlob.cpp - DirectoryBlob.h - DiscExtractor.cpp - DiscExtractor.h - DiscScrubber.cpp - DiscScrubber.h - DiscUtils.cpp - DiscUtils.h - Enums.cpp - Enums.h - FileBlob.cpp - FileBlob.h - FileSystemGCWii.cpp - FileSystemGCWii.h - Filesystem.cpp - Filesystem.h - GameModDescriptor.cpp - GameModDescriptor.h - LaggedFibonacciGenerator.cpp - LaggedFibonacciGenerator.h - MultithreadedCompressor.h - NANDImporter.cpp - NANDImporter.h - NFSBlob.cpp - NFSBlob.h - RiivolutionParser.cpp - RiivolutionParser.h - RiivolutionPatcher.cpp - RiivolutionPatcher.h - ScrubbedBlob.cpp - ScrubbedBlob.h - SplitFileBlob.cpp - SplitFileBlob.h - TGCBlob.cpp - TGCBlob.h - Volume.cpp - Volume.h - VolumeDisc.cpp - VolumeDisc.h - VolumeFileBlobReader.cpp - VolumeFileBlobReader.h - VolumeGC.cpp - VolumeGC.h - VolumeVerifier.cpp - VolumeVerifier.h - VolumeWad.cpp - VolumeWad.h - VolumeWii.cpp - VolumeWii.h - WbfsBlob.cpp - WbfsBlob.h - WIABlob.cpp - WIABlob.h - WIACompression.cpp - WIACompression.h - WiiEncryptionCache.cpp - WiiEncryptionCache.h - WiiSaveBanner.cpp - WiiSaveBanner.h -) - -target_link_libraries(discio -PUBLIC - core - BZip2::BZip2 - LibLZMA::LibLZMA - zstd::zstd - -PRIVATE - fmt::fmt - MINIZIP::minizip-ng - pugixml - ZLIB::ZLIB -) - -if(MSVC) - # Add precompiled header - target_link_libraries(discio PRIVATE use_pch) -endif() diff --git a/Source/Core/DolphinLibretro/CMakeLists.txt b/Source/Core/DolphinLibretro/CMakeLists.txt deleted file mode 100644 index 2023b8b1a5..0000000000 --- a/Source/Core/DolphinLibretro/CMakeLists.txt +++ /dev/null @@ -1,94 +0,0 @@ - -add_library(dolphin_libretro SHARED - Audio.cpp - Boot.cpp - Host.cpp - Input.cpp - Log.cpp - Main.cpp - Video.cpp - VR.cpp -) - -if(ENABLE_VULKAN) - target_sources(dolphin_libretro PRIVATE - Vulkan.cpp - ) -endif() - -include_directories(${CMAKE_SOURCE_DIR}/Externals/libretro-common/include) - -if(ENABLE_VULKAN) - include_directories(${CMAKE_SOURCE_DIR}/Externals/Vulkan-Headers/include) - include_directories(${CMAKE_SOURCE_DIR}/Externals/VulkanMemoryAllocator/include) -endif() - -target_include_directories(dolphin_libretro PRIVATE ${CMAKE_SOURCE_DIR}/Externals/libretro-common/include) - -set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}") - -set_target_properties(dolphin_libretro PROPERTIES PREFIX "") -if(ANDROID) - target_sources(dolphin_libretro PRIVATE - ../../Android/jni/AndroidCommon/IDCache.cpp - ) - set_target_properties(dolphin_libretro PROPERTIES SUFFIX "_android.so") -endif() - -if(CMAKE_C_COMPILER_ID MATCHES "Clang") - set(CLANG 1) -endif() - -if(NOT MSVC AND NOT CLANG) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") -endif() - -if(MSVC) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:OpenGL32.dll /DELAYLOAD:DInput8.dll") - target_link_libraries(dolphin_libretro PRIVATE - Delayimp.lib - core - dxguid - hid - uicommon - windowsapp - ${LIBS} - ) -else() - target_link_libraries(dolphin_libretro PRIVATE - core - uicommon - ${LIBS} - ) -endif() - -set(LIBRETRO_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/Externals/libretro-common/include) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Common) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/VideoContexts) - -target_link_libraries(dolphin_libretro PRIVATE - dolphin_libretro_common - dolphin_libretro_videocontexts -) - -if(MINGW) - target_link_libraries(dolphin_libretro PRIVATE - common - setupapi - ) -endif() - -if(MINGW OR LIBRETRO_STATIC OR WEBOS) - target_link_options(dolphin_libretro PRIVATE -static-libgcc -static-libstdc++) -endif() - -if(MINGW AND CMAKE_BUILD_TYPE STREQUAL "Debug") - target_link_options(dolphin_libretro PRIVATE -Wl,--allow-multiple-definition) -endif() - -if(APPLE) - target_sources(dolphin_libretro PRIVATE - ${CMAKE_SOURCE_DIR}/Source/Core/Common/CommonFuncsObjC.mm - ) -endif() diff --git a/Source/Core/DolphinLibretro/Common/CMakeLists.txt b/Source/Core/DolphinLibretro/Common/CMakeLists.txt deleted file mode 100644 index 01007d61f7..0000000000 --- a/Source/Core/DolphinLibretro/Common/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -add_library(dolphin_libretro_common STATIC - VFile.cpp - Globals.cpp - Options.cpp -) - -target_include_directories(dolphin_libretro_common PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${LIBRETRO_INCLUDE_DIR} -) - -target_include_directories(videoogl PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${LIBRETRO_INCLUDE_DIR} -) - -# needed for VFS when overriding Source/Core/Common/IOFile.h -target_include_directories(common PUBLIC - ${LIBRETRO_INCLUDE_DIR} -) - -# needed for windows cmake compile -target_link_libraries(dolphin_libretro_common fmt) diff --git a/Source/Core/DolphinLibretro/VideoContexts/CMakeLists.txt b/Source/Core/DolphinLibretro/VideoContexts/CMakeLists.txt deleted file mode 100644 index 9f215857f1..0000000000 --- a/Source/Core/DolphinLibretro/VideoContexts/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -add_library(dolphin_libretro_videocontexts STATIC - GLContextLR.cpp - GLContextLR.h - ContextStatus.cpp - ContextStatus.h -) - -target_include_directories(dolphin_libretro_videocontexts PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) - -target_link_libraries(dolphin_libretro_videocontexts PRIVATE - dolphin_libretro_common -) diff --git a/Source/Core/DolphinNoGUI/CMakeLists.txt b/Source/Core/DolphinNoGUI/CMakeLists.txt deleted file mode 100644 index 51c3fff708..0000000000 --- a/Source/Core/DolphinNoGUI/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -add_executable(dolphin-nogui - Platform.cpp - Platform.h - PlatformHeadless.cpp - MainNoGUI.cpp -) - -if(X11_FOUND) - target_sources(dolphin-nogui PRIVATE PlatformX11.cpp) - target_link_libraries(dolphin-nogui PRIVATE PkgConfig::XRANDR PkgConfig::X11) -endif() - -if(WIN32) - target_sources(dolphin-nogui PRIVATE PlatformWin32.cpp) -endif() - -if(APPLE) - target_sources(dolphin-nogui PRIVATE PlatformMacos.mm) - target_compile_options(dolphin-nogui PRIVATE -fobjc-arc) -endif() - -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - target_sources(dolphin-nogui PRIVATE PlatformFBDev.cpp) -endif() - -if (WIN32) - target_sources(dolphin-nogui PRIVATE DolphinNoGUI.exe.manifest DolphinNoGUI.rc) - - set_target_properties(dolphin-nogui PROPERTIES - DEBUG_POSTFIX D - OUTPUT_NAME DolphinNoGUI - ) -else() - set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui) -endif() - -target_link_libraries(dolphin-nogui -PRIVATE - core - uicommon - cpp-optparse -) - -if(APPLE) - target_link_libraries(dolphin-nogui - PRIVATE - ${APPKIT_LIBRARY} - ${COREFOUNDATION_LIBRARY} - ${IOK_LIBRARY} - ) -endif() - -if(WIN32) - # needed for adjusting window decorations with DwmSetWindowAttribute - target_link_libraries(dolphin-nogui PRIVATE dwmapi.lib) -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(dolphin-nogui PRIVATE use_pch) -endif() - -if(USE_DISCORD_PRESENCE) - target_compile_definitions(dolphin-nogui PRIVATE -DUSE_DISCORD_PRESENCE) -endif() - -set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-nogui) -if (NOT WIN32) - install(TARGETS dolphin-nogui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt deleted file mode 100644 index 599bc541db..0000000000 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ /dev/null @@ -1,763 +0,0 @@ -if (WIN32) - set(DOLPHIN_QT_X64_ROOT "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.8.3/x64") - set(DOLPHIN_QT_ARM64_ROOT "${CMAKE_SOURCE_DIR}/Externals/Qt/Qt6.8.3/ARM64") - - if(_M_ARM_64) - set(DOLPHIN_QT_ROOT "${DOLPHIN_QT_ARM64_ROOT}") - set(DOLPHIN_QT_TARGET_SPEC "win32-arm64-msvc") - else() - set(DOLPHIN_QT_ROOT "${DOLPHIN_QT_X64_ROOT}") - set(DOLPHIN_QT_TARGET_SPEC "win32-msvc") - endif() - - if(DOLPHIN_HOST STREQUAL "ARM64") - set(DOLPHIN_QT_HOST_ROOT "${DOLPHIN_QT_ARM64_ROOT}") - else() - set(DOLPHIN_QT_HOST_ROOT "${DOLPHIN_QT_X64_ROOT}") - endif() - - list(APPEND CMAKE_PREFIX_PATH "${DOLPHIN_QT_ROOT}") -endif() - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Svg) - -if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0) - # GuiPrivate is needed to #include qplatformnativeinterface.h in MainWindow.cpp with Qt 6.10+. - set(NEED_QT_GUI_PRIVATE_COMPONENT ON) - find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) -endif() - -message(STATUS "Found Qt version ${Qt6_VERSION}") - -set_property(TARGET Qt6::Core PROPERTY INTERFACE_COMPILE_FEATURES "") - -add_executable(dolphin-emu - AboutDialog.cpp - AboutDialog.h - CheatSearchFactoryWidget.cpp - CheatSearchFactoryWidget.h - CheatSearchWidget.cpp - CheatSearchWidget.h - CheatsManager.cpp - CheatsManager.h - Achievements/AchievementBox.cpp - Achievements/AchievementBox.h - Achievements/AchievementHeaderWidget.cpp - Achievements/AchievementHeaderWidget.h - Achievements/AchievementLeaderboardWidget.cpp - Achievements/AchievementLeaderboardWidget.h - Achievements/AchievementProgressWidget.cpp - Achievements/AchievementProgressWidget.h - Achievements/AchievementSettingsWidget.cpp - Achievements/AchievementSettingsWidget.h - Achievements/AchievementsWindow.cpp - Achievements/AchievementsWindow.h - Config/ARCodeWidget.cpp - Config/ARCodeWidget.h - Config/CheatCodeEditor.cpp - Config/CheatCodeEditor.h - Config/CheatWarningWidget.cpp - Config/CheatWarningWidget.h - Config/CommonControllersWidget.cpp - Config/CommonControllersWidget.h - Config/ConfigControls/ConfigBool.cpp - Config/ConfigControls/ConfigBool.h - Config/ConfigControls/ConfigChoice.cpp - Config/ConfigControls/ConfigChoice.h - Config/ConfigControls/ConfigControl.h - Config/ConfigControls/ConfigInteger.cpp - Config/ConfigControls/ConfigInteger.h - Config/ConfigControls/ConfigRadio.cpp - Config/ConfigControls/ConfigRadio.h - Config/ConfigControls/ConfigFloatSlider.cpp - Config/ConfigControls/ConfigFloatSlider.h - Config/ConfigControls/ConfigSlider.cpp - Config/ConfigControls/ConfigSlider.h - Config/ConfigControls/ConfigText.cpp - Config/ConfigControls/ConfigText.h - Config/ConfigControls/ConfigUserPath.cpp - Config/ConfigControls/ConfigUserPath.h - Config/ControllerInterface/ControllerInterfaceWindow.cpp - Config/ControllerInterface/ControllerInterfaceWindow.h - Config/SDLHints/SDLHintsWindow.cpp - Config/SDLHints/SDLHintsWindow.h - Config/ControllerInterface/DualShockUDPClientEditServerDialog.cpp - Config/ControllerInterface/DualShockUDPClientEditServerDialog.h - Config/ControllerInterface/DualShockUDPClientWidget.cpp - Config/ControllerInterface/DualShockUDPClientWidget.h - Config/ControllerInterface/DualShockUDPSettings.cpp - Config/ControllerInterface/DualShockUDPSettings.h - Config/ControllerInterface/ServerStringValidator.cpp - Config/ControllerInterface/ServerStringValidator.h - Config/ControllersPane.cpp - Config/ControllersPane.h - Config/FilesystemWidget.cpp - Config/FilesystemWidget.h - Config/FreeLookWidget.cpp - Config/FreeLookWidget.h - Config/FreeLookWindow.cpp - Config/FreeLookWindow.h - Config/GameConfigEdit.cpp - Config/GameConfigEdit.h - Config/GameConfigHighlighter.cpp - Config/GameConfigHighlighter.h - Config/GameConfigWidget.cpp - Config/GameConfigWidget.h - Config/GamecubeControllersWidget.cpp - Config/GamecubeControllersWidget.h - Config/GeckoCodeWidget.cpp - Config/GeckoCodeWidget.h - Config/Graphics/AdvancedWidget.cpp - Config/Graphics/AdvancedWidget.h - Config/Graphics/EnhancementsWidget.cpp - Config/Graphics/EnhancementsWidget.h - Config/Graphics/GeneralWidget.cpp - Config/Graphics/GeneralWidget.h - Config/Graphics/GraphicsPane.cpp - Config/Graphics/GraphicsPane.h - Config/Graphics/HacksWidget.cpp - Config/Graphics/HacksWidget.h - Config/Graphics/ColorCorrectionConfigWindow.cpp - Config/Graphics/ColorCorrectionConfigWindow.h - Config/Graphics/PostProcessingConfigWindow.cpp - Config/Graphics/PostProcessingConfigWindow.h - Config/GraphicsModListWidget.cpp - Config/GraphicsModListWidget.h - Config/GraphicsModWarningWidget.cpp - Config/GraphicsModWarningWidget.h - Config/HardcoreWarningWidget.cpp - Config/HardcoreWarningWidget.h - Config/InfoWidget.cpp - Config/InfoWidget.h - Config/LogConfigWidget.cpp - Config/LogConfigWidget.h - Config/LogWidget.cpp - Config/LogWidget.h - Config/Mapping/FreeLookGeneral.cpp - Config/Mapping/FreeLookGeneral.h - Config/Mapping/FreeLookRotation.cpp - Config/Mapping/FreeLookRotation.h - Config/Mapping/GBAPadEmu.cpp - Config/Mapping/GBAPadEmu.h - Config/Mapping/GCKeyboardEmu.cpp - Config/Mapping/GCKeyboardEmu.h - Config/Mapping/GCMicrophone.cpp - Config/Mapping/GCMicrophone.h - Config/Mapping/GCPadEmu.cpp - Config/Mapping/GCPadEmu.h - Config/Mapping/GCPadWiiUConfigDialog.cpp - Config/Mapping/GCPadWiiUConfigDialog.h - Config/Mapping/Hotkey3D.cpp - Config/Mapping/Hotkey3D.h - Config/Mapping/HotkeyControllerProfile.cpp - Config/Mapping/HotkeyControllerProfile.h - Config/Mapping/HotkeyDebugging.cpp - Config/Mapping/HotkeyDebugging.h - Config/Mapping/HotkeyGBA.cpp - Config/Mapping/HotkeyGBA.h - Config/Mapping/HotkeyGeneral.cpp - Config/Mapping/HotkeyGeneral.h - Config/Mapping/HotkeyGraphics.cpp - Config/Mapping/HotkeyGraphics.h - Config/Mapping/HotkeyStates.cpp - Config/Mapping/HotkeyStates.h - Config/Mapping/HotkeyStatesOther.cpp - Config/Mapping/HotkeyStatesOther.h - Config/Mapping/HotkeyTAS.cpp - Config/Mapping/HotkeyTAS.h - Config/Mapping/HotkeyUSBEmu.cpp - Config/Mapping/HotkeyUSBEmu.h - Config/Mapping/HotkeyWii.cpp - Config/Mapping/HotkeyWii.h - Config/Mapping/IOWindow.cpp - Config/Mapping/MappingButton.cpp - Config/Mapping/MappingButton.h - Config/Mapping/MappingCommon.cpp - Config/Mapping/MappingCommon.h - Config/Mapping/MappingIndicator.cpp - Config/Mapping/MappingIndicator.h - Config/Mapping/MappingNumeric.cpp - Config/Mapping/MappingNumeric.h - Config/Mapping/MappingWidget.cpp - Config/Mapping/MappingWidget.h - Config/Mapping/MappingWindow.cpp - Config/Mapping/MappingWindow.h - Config/Mapping/WiimoteEmuExtension.cpp - Config/Mapping/WiimoteEmuExtension.h - Config/Mapping/WiimoteEmuExtensionMotionInput.cpp - Config/Mapping/WiimoteEmuExtensionMotionInput.h - Config/Mapping/WiimoteEmuExtensionMotionSimulation.cpp - Config/Mapping/WiimoteEmuExtensionMotionSimulation.h - Config/Mapping/WiimoteEmuGeneral.cpp - Config/Mapping/WiimoteEmuGeneral.h - Config/Mapping/WiimoteEmuMotionControl.cpp - Config/Mapping/WiimoteEmuMotionControl.h - Config/Mapping/WiimoteEmuMotionControlIMU.cpp - Config/Mapping/WiimoteEmuMotionControlIMU.h - Config/NewPatchDialog.cpp - Config/NewPatchDialog.h - Config/PatchesWidget.cpp - Config/PatchesWidget.h - Config/PropertiesDialog.cpp - Config/PropertiesDialog.h - Config/SettingsWindow.cpp - Config/SettingsWindow.h - Config/ToolTipControls/BalloonTip.cpp - Config/ToolTipControls/BalloonTip.h - Config/ToolTipControls/ToolTipCheckBox.cpp - Config/ToolTipControls/ToolTipCheckBox.h - Config/ToolTipControls/ToolTipComboBox.cpp - Config/ToolTipControls/ToolTipComboBox.h - Config/ToolTipControls/ToolTipPushButton.cpp - Config/ToolTipControls/ToolTipPushButton.h - Config/ToolTipControls/ToolTipRadioButton.cpp - Config/ToolTipControls/ToolTipRadioButton.h - Config/ToolTipControls/ToolTipSlider.cpp - Config/ToolTipControls/ToolTipSlider.h - Config/ToolTipControls/ToolTipSpinBox.cpp - Config/ToolTipControls/ToolTipSpinBox.h - Config/ToolTipControls/ToolTipWidget.h - Config/VerifyWidget.cpp - Config/VerifyWidget.h - Config/WiimoteControllersWidget.cpp - Config/WiimoteControllersWidget.h - ConvertDialog.cpp - ConvertDialog.h - Debugger/AssembleInstructionDialog.cpp - Debugger/AssembleInstructionDialog.h - Debugger/AssemblerWidget.cpp - Debugger/AssemblerWidget.h - Debugger/AssemblyEditor.cpp - Debugger/AssemblyEditor.h - Debugger/BranchWatchDialog.cpp - Debugger/BranchWatchDialog.h - Debugger/BranchWatchTableModel.cpp - Debugger/BranchWatchTableModel.h - Debugger/BreakpointDialog.cpp - Debugger/BreakpointDialog.h - Debugger/BreakpointWidget.cpp - Debugger/BreakpointWidget.h - Debugger/CodeViewWidget.cpp - Debugger/CodeViewWidget.h - Debugger/CodeWidget.cpp - Debugger/CodeWidget.h - Debugger/EditSymbolDialog.cpp - Debugger/EditSymbolDialog.h - Debugger/GekkoSyntaxHighlight.cpp - Debugger/GekkoSyntaxHighlight.h - Debugger/JitBlockTableModel.cpp - Debugger/JitBlockTableModel.h - Debugger/JITWidget.cpp - Debugger/JITWidget.h - Debugger/MemoryViewWidget.cpp - Debugger/MemoryViewWidget.h - Debugger/MemoryWidget.cpp - Debugger/MemoryWidget.h - Debugger/NetworkWidget.cpp - Debugger/NetworkWidget.h - Debugger/PatchInstructionDialog.cpp - Debugger/PatchInstructionDialog.h - Debugger/RegisterColumn.cpp - Debugger/RegisterColumn.h - Debugger/RegisterWidget.cpp - Debugger/RegisterWidget.h - Debugger/ThreadWidget.cpp - Debugger/ThreadWidget.h - Debugger/WatchWidget.cpp - Debugger/WatchWidget.h - DiscordHandler.cpp - DiscordHandler.h - DiscordJoinRequestDialog.cpp - DiscordJoinRequestDialog.h - EmulatedUSB/WiiSpeakWindow.cpp - EmulatedUSB/WiiSpeakWindow.h - EmulatedUSB/LogitechMicWindow.cpp - EmulatedUSB/LogitechMicWindow.h - FIFO/FIFOAnalyzer.cpp - FIFO/FIFOAnalyzer.h - FIFO/FIFOPlayerWindow.cpp - FIFO/FIFOPlayerWindow.h - GameCount.cpp - GameCount.h - GameList/GameList.cpp - GameList/GameList.h - GameList/GameListModel.cpp - GameList/GameListModel.h - GameList/GameTracker.cpp - GameList/GameTracker.h - GameList/GridProxyModel.cpp - GameList/GridProxyModel.h - GameList/ListProxyModel.cpp - GameList/ListProxyModel.h - GCMemcardCreateNewDialog.cpp - GCMemcardCreateNewDialog.h - GCMemcardManager.cpp - GCMemcardManager.h - Host.cpp - Host.h - HotkeyScheduler.cpp - HotkeyScheduler.h - InfinityBase/InfinityBaseWindow.cpp - InfinityBase/InfinityBaseWindow.h - Main.cpp - MainWindow.cpp - MainWindow.h - MenuBar.cpp - MenuBar.h - NetPlay/ChunkedProgressDialog.cpp - NetPlay/ChunkedProgressDialog.h - NetPlay/GameDigestDialog.cpp - NetPlay/GameDigestDialog.h - NetPlay/GameListDialog.cpp - NetPlay/GameListDialog.h - NetPlay/ClickBlurLabel.cpp - NetPlay/ClickBlurLabel.h - NetPlay/NetPlayBrowser.cpp - NetPlay/NetPlayBrowser.h - NetPlay/NetPlayDialog.cpp - NetPlay/NetPlayDialog.h - NetPlay/NetPlaySetupDialog.cpp - NetPlay/NetPlaySetupDialog.h - NetPlay/PadMappingDialog.cpp - NetPlay/PadMappingDialog.h - NANDRepairDialog.cpp - NANDRepairDialog.h - NKitWarningDialog.cpp - NKitWarningDialog.h - QtUtils/AnalyticsPrompt.cpp - QtUtils/AnalyticsPrompt.h - QtUtils/AspectRatioWidget.cpp - QtUtils/AspectRatioWidget.h - QtUtils/BlockUserInputFilter.cpp - QtUtils/BlockUserInputFilter.h - QtUtils/ClearLayoutRecursively.cpp - QtUtils/ClearLayoutRecursively.h - QtUtils/ClickableStatusBar.h - QtUtils/DolphinFileDialog.cpp - QtUtils/DolphinFileDialog.h - QtUtils/DoubleClickEventFilter.cpp - QtUtils/DoubleClickEventFilter.h - QtUtils/ElidedButton.cpp - QtUtils/ElidedButton.h - QtUtils/FileOpenEventFilter.cpp - QtUtils/FileOpenEventFilter.h - QtUtils/FromStdString.h - QtUtils/ImageConverter.cpp - QtUtils/ImageConverter.h - QtUtils/ModalMessageBox.cpp - QtUtils/ModalMessageBox.h - QtUtils/NonAutodismissibleMenu.cpp - QtUtils/NonAutodismissibleMenu.h - QtUtils/NonDefaultQPushButton.cpp - QtUtils/NonDefaultQPushButton.h - QtUtils/ParallelProgressDialog.h - QtUtils/PartiallyClosableTabWidget.cpp - QtUtils/PartiallyClosableTabWidget.h - QtUtils/QtUtils.cpp - QtUtils/QtUtils.h - QtUtils/SetWindowDecorations.cpp - QtUtils/SetWindowDecorations.h - QtUtils/SignalBlocking.h - QtUtils/UTF8CodePointCountValidator.cpp - QtUtils/UTF8CodePointCountValidator.h - QtUtils/WindowActivationEventFilter.cpp - QtUtils/WindowActivationEventFilter.h - QtUtils/WrapInScrollArea.cpp - QtUtils/WrapInScrollArea.h - RenderWidget.cpp - RenderWidget.h - ResourcePackManager.cpp - ResourcePackManager.h - Resources.cpp - Resources.h - RiivolutionBootWidget.cpp - RiivolutionBootWidget.h - SearchBar.cpp - SearchBar.h - Settings.cpp - Settings.h - Settings/AdvancedPane.cpp - Settings/AdvancedPane.h - Settings/AudioPane.cpp - Settings/AudioPane.h - Settings/BroadbandAdapterSettingsDialog.cpp - Settings/BroadbandAdapterSettingsDialog.h - Settings/GameCubePane.cpp - Settings/GameCubePane.h - Settings/GeneralPane.cpp - Settings/GeneralPane.h - Settings/InterfacePane.cpp - Settings/InterfacePane.h - Settings/OnScreenDisplayPane.cpp - Settings/OnScreenDisplayPane.h - Settings/PathPane.cpp - Settings/PathPane.h - Settings/TriforcePane.cpp - Settings/TriforcePane.h - Settings/USBDevicePicker.cpp - Settings/USBDevicePicker.h - Settings/WiiPane.cpp - Settings/WiiPane.h - SkylanderPortal/SkylanderModifyDialog.cpp - SkylanderPortal/SkylanderModifyDialog.h - SkylanderPortal/SkylanderPortalWindow.cpp - SkylanderPortal/SkylanderPortalWindow.h - TAS/GCTASInputWindow.cpp - TAS/GCTASInputWindow.h - TAS/GBATASInputWindow.cpp - TAS/GBATASInputWindow.h - TAS/IRWidget.cpp - TAS/IRWidget.h - TAS/StickWidget.cpp - TAS/StickWidget.h - TAS/TASCheckBox.cpp - TAS/TASCheckBox.h - TAS/TASControlState.cpp - TAS/TASControlState.h - TAS/TASInputWindow.cpp - TAS/TASInputWindow.h - TAS/TASSlider.cpp - TAS/TASSlider.h - TAS/TASSpinBox.cpp - TAS/TASSpinBox.h - TAS/WiiTASInputWindow.cpp - TAS/WiiTASInputWindow.h - ToolBar.cpp - ToolBar.h - Translation.cpp - Translation.h - Updater.cpp - Updater.h - WiiUpdate.cpp - WiiUpdate.h -) - -if (WIN32) - target_sources(dolphin-emu PRIVATE - Styles/Dark/dark.qrc - ) -endif() - -if (NOT WIN32) - target_sources(dolphin-emu PRIVATE - QtUtils/SignalDaemon.cpp - QtUtils/SignalDaemon.h - ) -endif() - -target_compile_definitions(dolphin-emu -PRIVATE - -DQT_USE_QSTRINGBUILDER - -DQT_NO_CAST_FROM_ASCII - -DQT_NO_CAST_TO_ASCII - # This Qt version should match Externals/Qt. - # It disables deprecation warnings we can't fix yet. - -DQT_WARN_DEPRECATED_UP_TO=0x060501 -) - -target_include_directories(dolphin-emu -PRIVATE - ${CMAKE_CURRENT_BINARY_DIR} - ${Qt6Gui_PRIVATE_INCLUDE_DIRS} -) - -target_link_libraries(dolphin-emu -PRIVATE - core - Qt6::Widgets - uicommon - imgui - implot -) - -if(ENABLE_SDL) - target_link_libraries(dolphin-emu - PRIVATE - SDL3::SDL3 - ) -endif() - -if (NEED_QT_GUI_PRIVATE_COMPONENT) - target_link_libraries(dolphin-emu - PRIVATE - Qt6::GuiPrivate - ) -endif() - -if (WIN32) - target_link_libraries(dolphin-emu - PRIVATE - gdi32.lib - shell32.lib - dwmapi.lib # Needed to set window decorations for dark theme - ) -endif() - -if (MSVC) - set(qtGui "") - set(qtGuiPriv "") - set(qtWidgetsPriv "") - list(TRANSFORM Qt6Gui_INCLUDE_DIRS PREPEND "/external:I" OUTPUT_VARIABLE qtGui) - list(TRANSFORM Qt6Gui_PRIVATE_INCLUDE_DIRS PREPEND "/external:I" OUTPUT_VARIABLE qtGuiPriv) - list(TRANSFORM Qt6Widgets_PRIVATE_INCLUDE_DIRS PREPEND "/external:I" OUTPUT_VARIABLE qtWidgetsPriv) - target_compile_options(dolphin-emu PRIVATE "${qtGui}") - target_compile_options(dolphin-emu PRIVATE "${qtGuiPriv}") - target_compile_options(dolphin-emu PRIVATE "${qtWidgets}") - - # Qt 6.3.0 headers use std::aligned_storage instead of alignas - target_compile_definitions(dolphin-emu PRIVATE _SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING) - - # Qt6 requires RTTI - remove_cxx_flag_from_target(dolphin-emu "/GR-") - target_compile_options(dolphin-emu PRIVATE "/GR") -endif() - -if (NOT APPLE AND NOT ANDROID) - # Symlink Sys - add_custom_command(TARGET dolphin-emu POST_BUILD - COMMAND ${CMAKE_COMMAND} - -Dtarget="${CMAKE_SOURCE_DIR}/Data/Sys" - -Dlink="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sys" - -P="${CMAKE_SOURCE_DIR}/CMake/DolphinSymlinkOrCopy.cmake" - ) - - # Symlink COPYING - add_custom_command(TARGET dolphin-emu POST_BUILD - COMMAND ${CMAKE_COMMAND} - -Dtarget="${CMAKE_SOURCE_DIR}/COPYING" - -Dlink="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/COPYING" - -P="${CMAKE_SOURCE_DIR}/CMake/DolphinSymlinkOrCopy.cmake" - ) - - # Symlink Licenses dir - add_custom_command(TARGET dolphin-emu POST_BUILD - COMMAND ${CMAKE_COMMAND} - -Dtarget="${CMAKE_SOURCE_DIR}/LICENSES" - -Dlink="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Licenses" - -P="${CMAKE_SOURCE_DIR}/CMake/DolphinSymlinkOrCopy.cmake" - ) -endif() -if (WIN32) - # Symlink qt.conf - add_custom_command(TARGET dolphin-emu POST_BUILD - COMMAND ${CMAKE_COMMAND} - -Dtarget="${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.win" - -Dlink="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf" - -P="${CMAKE_SOURCE_DIR}/CMake/DolphinSymlinkOrCopy.cmake" - ) - - if (ENABLE_AUTOUPDATE) - # Symlink build_info.txt - add_custom_command(TARGET dolphin-emu POST_BUILD - COMMAND ${CMAKE_COMMAND} - -Dtarget="${CMAKE_BINARY_DIR}/build_info.txt" - -Dlink="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/build_info.txt" - -P="${CMAKE_SOURCE_DIR}/CMake/DolphinSymlinkOrCopy.cmake" - ) - endif() - - - target_sources(dolphin-emu PRIVATE DolphinQt.manifest DolphinQt.rc) - - set_target_properties(dolphin-emu PROPERTIES - DEBUG_POSTFIX D - OUTPUT_NAME Dolphin - WIN32_EXECUTABLE TRUE - ) - # Delegate to Qt's official deployment binary on Windows to copy over the necessary Qt-specific libraries, etc. - get_target_property(MOC_EXECUTABLE_LOCATION Qt6::moc IMPORTED_LOCATION) - get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY) - find_program(WINDEPLOYQT_EXE windeployqt HINTS "${QT_BINARY_DIRECTORY}" REQUIRED) - find_program(QTPATHS_EXE NAMES qtpaths6 qtpaths HINTS "${QT_BINARY_DIRECTORY}" REQUIRED) - - # We don't use target_qt.conf/qtpaths.bat from a Qt build because they use absolute paths. - configure_file( - "target_qt.conf.in" - "${CMAKE_BINARY_DIR}/target_qt.conf" - @ONLY - ) - configure_file( - "qtpaths.bat.in" - "${CMAKE_BINARY_DIR}/qtpaths.bat" - @ONLY - ) - set(QTPATHS_SHIM "${CMAKE_BINARY_DIR}/qtpaths.bat") - - # Note: We set the PATH for the duration of this command so that the - # deployment application is able to locate the Qt libraries to copy. - # if the necessary paths aren't already set beforehand. - # - # For example, consider a hypothetical emulation project named Orca. - # Orca supplies its own version of Qt instead of having developers actually - # install the officially supported Qt libraries -- a method that would make - # wrangling around with Qt through CMake much nicer and lessen the external - # library maintenance burden of the project, but alas. - # - # In this case, as Qt is not installed through the official binary, this also - # means proper path variables will not be set up, thus the need to ensure they're - # always set up. - # - add_custom_command(TARGET dolphin-emu POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E env PATH="${QT_BINARY_DIRECTORY}" - "${WINDEPLOYQT_EXE}" --qtpaths="${QTPATHS_SHIM}" - --libdir="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - --plugindir="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/QtPlugins" - $,--debug,--release> - --no-translations - --no-compiler-runtime - --no-system-d3d-compiler - --no-system-dxc-compiler - --no-opengl-sw - "$" - ) -endif() - -# Handle localization -find_package(Gettext) - -if(WIN32 AND NOT Gettext_FOUND) - message(STATUS "Using Gettext from Externals") - set(GETTEXT_MSGFMT_EXECUTABLE "${CMAKE_SOURCE_DIR}/Externals/gettext/msgfmt.exe") -endif() - -if(GETTEXT_MSGFMT_EXECUTABLE) - set(pot_file "${CMAKE_SOURCE_DIR}/Languages/po/dolphin-emu.pot") - file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po) - - target_sources(dolphin-emu PRIVATE ${pot_file} ${LINGUAS}) - source_group("Localization" FILES ${LINGUAS}) - source_group("Localization\\\\Generated" FILES ${pot_file}) - - foreach(po ${LINGUAS}) - get_filename_component(lang ${po} NAME_WE) - - set(mo_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages/${lang}) - set(mo ${mo_dir}/dolphin-emu.mo) - - target_sources(dolphin-emu PRIVATE ${mo}) - source_group("Localization\\\\Generated" FILES ${mo}) - - if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set_source_files_properties(${mo} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${lang}.lproj") - else() - install(FILES ${mo} DESTINATION share/locale/${lang}/LC_MESSAGES) - endif() - - add_custom_command(OUTPUT ${mo} - COMMAND ${CMAKE_COMMAND} -E make_directory ${mo_dir} - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po} - DEPENDS ${po} - ) - endforeach() -endif() - -if(APPLE) - include(BundleUtilities) - - # Ask for an application bundle. - set_target_properties(dolphin-emu PROPERTIES - MACOSX_BUNDLE true - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in" - XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" - OUTPUT_NAME DolphinQt - ) - - # Copy qt.conf into the bundle - target_sources(dolphin-emu PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf") - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - - # Copy icon into the bundle - target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns") - set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/Dolphin.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - - # Manually include plugins - find_package(Qt6QMacStylePlugin REQUIRED PATHS ${Qt6Widgets_DIR}) - find_package(Qt6QCocoaIntegrationPlugin REQUIRED PATHS ${Qt6Gui_DIR}) - - # Copy Qt plugins into the bundle - get_target_property(qtcocoa_location Qt6::QCocoaIntegrationPlugin LOCATION) - target_sources(dolphin-emu PRIVATE "${qtcocoa_location}") - set_source_files_properties("${qtcocoa_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/platforms) - - get_target_property(qtmacstyle_location Qt6::QMacStylePlugin LOCATION) - target_sources(dolphin-emu PRIVATE "${qtmacstyle_location}") - set_source_files_properties("${qtmacstyle_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/styles) - - # Copy resources into the bundle - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/Data/Sys") - file(GLOB_RECURSE resources RELATIVE "${CMAKE_SOURCE_DIR}/Data" "${CMAKE_SOURCE_DIR}/Data/Sys/*") - foreach(res ${resources}) - target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/${res}") - get_filename_component(resdir "${res}" DIRECTORY) - set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/${res}" PROPERTIES - MACOSX_PACKAGE_LOCATION "Resources/${resdir}") - source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}") - endforeach() - - include(DolphinInjectVersionInfo) - dolphin_inject_version_info(dolphin-emu) - - # Copy MoltenVK into the bundle - if(ENABLE_VULKAN) - if(USE_BUNDLED_MOLTENVK) - add_dependencies(dolphin-emu MoltenVK) - ExternalProject_Get_Property(MoltenVK SOURCE_DIR) - target_sources(dolphin-emu PRIVATE "${SOURCE_DIR}/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib") - set_source_files_properties("${SOURCE_DIR}/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks GENERATED ON) - else() - find_file(MOLTENVK_DYLIB NAMES libMoltenVK.dylib PATH_SUFFIXES lib) - if(NOT MOLTENVK_DYLIB) - message(FATAL_ERROR "Couldn't find libMoltenVK.dylib. Enable USE_BUNDLED_MOLTENVK?") - endif() - target_sources(dolphin-emu PRIVATE ${MOLTENVK_DYLIB}) - set_source_files_properties(${MOLTENVK_DYLIB} PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks) - endif() - endif() - - if(POSTPROCESS_BUNDLE) - # Update library references to make the bundle portable - include(DolphinPostprocessBundle) - dolphin_postprocess_bundle(dolphin-emu) - # Fix rpath - add_custom_command(TARGET dolphin-emu - POST_BUILD COMMAND - ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/" - $) - endif() - - if(MACOS_CODE_SIGNING) - add_custom_command(TARGET dolphin-emu - POST_BUILD - COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh" - "-e" "${CMAKE_CURRENT_SOURCE_DIR}/DolphinEmu$<$:Debug>.entitlements" - "${MACOS_CODE_SIGNING_IDENTITY}" - "$" - ) - endif() -elseif (NOT WIN32) - install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() - -if(USE_MGBA) - target_sources(dolphin-emu PRIVATE - GBAHost.cpp - GBAHost.h - GBAWidget.cpp - GBAWidget.h - ) -endif() - -if(USE_DISCORD_PRESENCE) - target_compile_definitions(dolphin-emu PRIVATE -DUSE_DISCORD_PRESENCE) -endif() - -if(USE_RETRO_ACHIEVEMENTS) - target_link_libraries(dolphin-emu PRIVATE rcheevos) - target_compile_definitions(dolphin-emu PRIVATE -DUSE_RETRO_ACHIEVEMENTS) - if(RC_CLIENT_SUPPORTS_RAINTEGRATION) - target_compile_definitions(dolphin-emu PRIVATE -DRC_CLIENT_SUPPORTS_RAINTEGRATION) - endif() -endif() diff --git a/Source/Core/DolphinTool/CMakeLists.txt b/Source/Core/DolphinTool/CMakeLists.txt deleted file mode 100644 index cbc15fe85f..0000000000 --- a/Source/Core/DolphinTool/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -add_executable(dolphin-tool - ToolHeadlessPlatform.cpp - ExtractCommand.cpp - ExtractCommand.h - ConvertCommand.cpp - ConvertCommand.h - VerifyCommand.cpp - VerifyCommand.h - HeaderCommand.cpp - HeaderCommand.h - ToolMain.cpp -) - -if (WIN32) - target_sources(dolphin-tool PRIVATE DolphinTool.exe.manifest DolphinTool.rc) - - set_target_properties(dolphin-tool PROPERTIES - DEBUG_POSTFIX D - OUTPUT_NAME DolphinTool - ) -endif() - -target_link_libraries(dolphin-tool -PRIVATE - discio - uicommon - cpp-optparse - fmt::fmt -) - -if(MSVC) - # Add precompiled header - target_link_libraries(dolphin-tool PRIVATE use_pch) -endif() - -set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-tool) -if (NOT WIN32) - install(TARGETS dolphin-tool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt deleted file mode 100644 index f510604d3b..0000000000 --- a/Source/Core/InputCommon/CMakeLists.txt +++ /dev/null @@ -1,212 +0,0 @@ -add_library(inputcommon - DynamicInputTextureManager.cpp - DynamicInputTextureManager.h - GCAdapter.cpp - GCAdapter.h - ImageOperations.cpp - ImageOperations.h - InputConfig.cpp - InputConfig.h - InputProfile.cpp - InputProfile.h - ControllerEmu/ControllerEmu.cpp - ControllerEmu/ControllerEmu.h - ControllerEmu/StickGate.cpp - ControllerEmu/StickGate.h - ControllerEmu/Control/Control.cpp - ControllerEmu/Control/Control.h - ControllerEmu/Control/Input.cpp - ControllerEmu/Control/Input.h - ControllerEmu/Control/Output.cpp - ControllerEmu/Control/Output.h - ControllerEmu/ControlGroup/AnalogStick.cpp - ControllerEmu/ControlGroup/AnalogStick.h - ControllerEmu/ControlGroup/Attachments.cpp - ControllerEmu/ControlGroup/Attachments.h - ControllerEmu/ControlGroup/Buttons.cpp - ControllerEmu/ControlGroup/Buttons.h - ControllerEmu/ControlGroup/ControlGroup.cpp - ControllerEmu/ControlGroup/ControlGroup.h - ControllerEmu/ControlGroup/Cursor.cpp - ControllerEmu/ControlGroup/Cursor.h - ControllerEmu/ControlGroup/Force.cpp - ControllerEmu/ControlGroup/Force.h - ControllerEmu/ControlGroup/IMUAccelerometer.cpp - ControllerEmu/ControlGroup/IMUAccelerometer.h - ControllerEmu/ControlGroup/IMUCursor.cpp - ControllerEmu/ControlGroup/IMUCursor.h - ControllerEmu/ControlGroup/IMUGyroscope.cpp - ControllerEmu/ControlGroup/IMUGyroscope.h - ControllerEmu/ControlGroup/IRPassthrough.cpp - ControllerEmu/ControlGroup/IRPassthrough.h - ControllerEmu/ControlGroup/MixedTriggers.cpp - ControllerEmu/ControlGroup/MixedTriggers.h - ControllerEmu/ControlGroup/ModifySettingsButton.cpp - ControllerEmu/ControlGroup/ModifySettingsButton.h - ControllerEmu/ControlGroup/Slider.cpp - ControllerEmu/ControlGroup/Slider.h - ControllerEmu/ControlGroup/Tilt.cpp - ControllerEmu/ControlGroup/Tilt.h - ControllerEmu/ControlGroup/Triggers.cpp - ControllerEmu/ControlGroup/Triggers.h - ControllerEmu/Setting/NumericSetting.cpp - ControllerEmu/Setting/NumericSetting.h - ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp - ControllerInterface/DualShockUDPClient/DualShockUDPClient.h - ControllerInterface/DualShockUDPClient/DualShockUDPProto.h - ControllerInterface/ControllerInterface.cpp - ControllerInterface/ControllerInterface.h - ControllerInterface/CoreDevice.cpp - ControllerInterface/CoreDevice.h - ControllerInterface/InputBackend.cpp - ControllerInterface/InputBackend.h - ControllerInterface/MappingCommon.cpp - ControllerInterface/MappingCommon.h - ControllerInterface/Wiimote/WiimoteController.cpp - ControllerInterface/Wiimote/WiimoteController.h - ControlReference/ControlReference.cpp - ControlReference/ControlReference.h - ControlReference/ExpressionParser.cpp - ControlReference/ExpressionParser.h - ControlReference/FunctionExpression.cpp - ControlReference/FunctionExpression.h - DynamicInputTextures/DITConfiguration.cpp - DynamicInputTextures/DITConfiguration.h - DynamicInputTextures/DITData.h - DynamicInputTextures/DITSpecification.cpp - DynamicInputTextures/DITSpecification.h -) - -target_link_libraries(inputcommon -PUBLIC - common - -PRIVATE - fmt::fmt - sfml-network - spng::spng -) - -if(WIN32) - if(NOT LIBRETRO) - target_sources(inputcommon PRIVATE - ControllerInterface/DInput/DInput.cpp - ControllerInterface/DInput/DInput.h - ControllerInterface/DInput/DInput8.h - ControllerInterface/DInput/DInputJoystick.cpp - ControllerInterface/DInput/DInputJoystick.h - ControllerInterface/DInput/DInputKeyboardMouse.cpp - ControllerInterface/DInput/DInputKeyboardMouse.h - ControllerInterface/DInput/NamedKeys.h - ControllerInterface/DInput/XInputFilter.cpp - ControllerInterface/DInput/XInputFilter.h - ControllerInterface/Win32/Win32.cpp - ControllerInterface/Win32/Win32.h - ControllerInterface/WGInput/WGInput.cpp - ControllerInterface/WGInput/WGInput.h - ControllerInterface/XInput/XInput.cpp - ControllerInterface/XInput/XInput.h - ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp - ControllerInterface/ForceFeedback/ForceFeedbackDevice.h - ) - target_link_libraries(inputcommon PRIVATE dinput8) - endif() - if(MINGW) - set_source_files_properties( - ControllerInterface/WGInput/WGInput.cpp - PROPERTIES COMPILE_OPTIONS "-fexceptions" - ) - target_link_libraries(inputcommon - PRIVATE - cfgmgr32 - ) - endif() -elseif(APPLE AND NOT LIBRETRO) - target_sources(inputcommon PRIVATE - ControllerInterface/Quartz/Quartz.h - ControllerInterface/Quartz/Quartz.mm - ControllerInterface/Quartz/QuartzKeyboardAndMouse.h - ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm - ) - target_link_libraries(inputcommon PRIVATE - ${COREFOUNDATION_LIBRARY} - ${CARBON_LIBRARY} - ${COCOA_LIBRARY} - ${FORCEFEEDBACK_LIBRARY} - ) - target_compile_options(inputcommon PRIVATE - -fobjc-arc - ) -elseif(X11_FOUND) - target_include_directories(inputcommon PUBLIC ${X11_INPUT_INCLUDE_DIRS}) - target_sources(inputcommon PRIVATE - ControllerInterface/Xlib/XInput2.cpp - ControllerInterface/Xlib/XInput2.h - ) - target_link_libraries(inputcommon PRIVATE PkgConfig::X11_INPUT) -elseif(ANDROID) - target_compile_definitions(inputcommon PRIVATE -DCIFACE_USE_ANDROID) - target_sources(inputcommon PRIVATE - ControllerInterface/Android/Android.cpp - ControllerInterface/Android/Android.h - ControllerInterface/Touch/InputOverrider.cpp - ControllerInterface/Touch/InputOverrider.h - ) - target_link_libraries(inputcommon PRIVATE - androidcommon - ) -endif() - -if(NOT ANDROID AND NOT IOS AND NOT WEBOS AND LIBUSB_FOUND) - target_link_libraries(inputcommon PUBLIC LibUSB::LibUSB) -endif() - -if(LIBEVDEV_FOUND AND LIBUDEV_FOUND) - target_sources(inputcommon - PRIVATE - ControllerInterface/evdev/evdev.cpp - ControllerInterface/evdev/evdev.h - ) - target_include_directories(inputcommon - PRIVATE - ${LIBEVDEV_INCLUDE_DIR} - ${LIBUDEV_INCLUDE_DIR} - ) - target_link_libraries(inputcommon - PRIVATE - ${LIBEVDEV_LIBRARY} - ${LIBUDEV_LIBRARY} - ) -endif() - -if(UNIX) - target_sources(inputcommon PRIVATE - ControllerInterface/Pipes/Pipes.cpp - ControllerInterface/Pipes/Pipes.h - ) -endif() - -if(ENABLE_SDL) - target_sources(inputcommon PRIVATE - ControllerInterface/SDL/SDL.cpp - ControllerInterface/SDL/SDL.h - ControllerInterface/SDL/SDLGamepad.cpp - ControllerInterface/SDL/SDLGamepad.h - ) - target_link_libraries(inputcommon PRIVATE SDL3::SDL3) -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(inputcommon PRIVATE use_pch) -endif() - -if(TARGET Hidapi::Hidapi) - target_sources(inputcommon - PRIVATE - ControllerInterface/SteamDeck/SteamDeck.cpp - ControllerInterface/SteamDeck/SteamDeck.h - ) - target_link_libraries(inputcommon PUBLIC Hidapi::Hidapi) - target_compile_definitions(inputcommon PRIVATE -DHAVE_HIDAPI=1) -endif() diff --git a/Source/Core/MacUpdater/CMakeLists.txt b/Source/Core/MacUpdater/CMakeLists.txt deleted file mode 100644 index 459531d39a..0000000000 --- a/Source/Core/MacUpdater/CMakeLists.txt +++ /dev/null @@ -1,75 +0,0 @@ -set(STORYBOARDS Main.storyboard) - -set(SOURCES - main.m - AppDelegate.h - AppDelegate.mm - ViewController.h - ViewController.m - MacUI.mm - ${STORYBOARDS} -) - -add_executable(MacUpdater ${SOURCES}) - -add_dependencies(MacUpdater dolphin_scmrev) - -set_target_properties(MacUpdater PROPERTIES - MACOSX_BUNDLE true - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in" - OUTPUT_NAME "Dolphin Updater") - -# Copy icon into the bundle -target_sources(MacUpdater PRIVATE "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns") -set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/Dolphin.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - -target_link_libraries(MacUpdater PRIVATE - "-framework Cocoa" - "-framework AppKit" - "-framework CoreData" - "-framework Foundation" - uicommon - updatercommon -) - -# Compile storyboards (Adapted from https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/OSX-InterfaceBuilderFiles) - -# Make sure we can find the 'ibtool' program. If we can NOT find it we -# skip generation of this project -find_program(IBTOOL ibtool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin") -if (${IBTOOL} STREQUAL "IBTOOL-NOTFOUND") - message(SEND_ERROR "ibtool can not be found and is needed to compile the .storyboard files. It should have been installed with - the Apple developer tools. The default system paths were searched in addition to ${OSX_DEVELOPER_ROOT}/usr/bin") -endif() - -foreach(sb ${STORYBOARDS}) - set(output $/Contents/Resources/${sb}c) - set(input ${CMAKE_CURRENT_SOURCE_DIR}/${sb}) - add_custom_command(TARGET MacUpdater POST_BUILD - COMMAND ${IBTOOL} --errors --warnings --notices --output-format human-readable-text --compile ${output} ${input} - COMMENT "Compiling Storyboard ${sb}...") -endforeach() - -include(DolphinInjectVersionInfo) -dolphin_inject_version_info(MacUpdater) - -if(POSTPROCESS_BUNDLE) - # Update library references to make the bundle portable - include(DolphinPostprocessBundle) - dolphin_postprocess_bundle(MacUpdater) - - # Fix rpath - add_custom_command(TARGET MacUpdater - POST_BUILD COMMAND - ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/" - $) -endif() - -if(MACOS_CODE_SIGNING) - add_custom_command(TARGET MacUpdater - POST_BUILD - COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh" - "${MACOS_CODE_SIGNING_IDENTITY}" - "$" - ) -endif() diff --git a/Source/Core/UICommon/CMakeLists.txt b/Source/Core/UICommon/CMakeLists.txt deleted file mode 100644 index e141eab6f9..0000000000 --- a/Source/Core/UICommon/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -add_library(uicommon - AutoUpdate.cpp - AutoUpdate.h - CommandLineParse.cpp - CommandLineParse.h - DiscordPresence.cpp - DiscordPresence.h - GameFile.cpp - GameFile.h - GameFileCache.cpp - GameFileCache.h - NetPlayIndex.cpp - NetPlayIndex.h - ResourcePack/Manager.cpp - ResourcePack/Manager.h - ResourcePack/Manifest.cpp - ResourcePack/Manifest.h - ResourcePack/ResourcePack.cpp - ResourcePack/ResourcePack.h - UICommon.cpp - UICommon.h -) - -target_link_libraries(uicommon -PUBLIC - common - core - cpp-optparse - MINIZIP::minizip-ng - pugixml - -PRIVATE - fmt::fmt - $<$:${IOK_LIBRARY}> -) - -if ((DEFINED CMAKE_ANDROID_ARCH_ABI AND CMAKE_ANDROID_ARCH_ABI MATCHES "x86|x86_64") OR - (NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86_64)) - target_link_libraries(uicommon PRIVATE bdisasm) -endif() - -if(UNIX AND NOT APPLE AND NOT ANDROID AND ENABLE_QT) - find_package(Qt6 REQUIRED COMPONENTS DBus) - target_sources(uicommon PRIVATE DBusUtils.cpp) - target_compile_definitions(uicommon PRIVATE -DHAVE_QTDBUS=1) - target_link_libraries(uicommon PUBLIC Qt6::DBus) -endif() - -if(X11_FOUND) - target_sources(uicommon PRIVATE X11Utils.cpp) - target_link_libraries(uicommon PUBLIC PkgConfig::XRANDR PkgConfig::X11) -endif() - -if(TARGET LibUSB::LibUSB) - target_link_libraries(uicommon PRIVATE LibUSB::LibUSB) -endif() - -if(USE_DISCORD_PRESENCE) - target_compile_definitions(uicommon PRIVATE -DUSE_DISCORD_PRESENCE) - target_link_libraries(uicommon PRIVATE discord-rpc) -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(uicommon PRIVATE use_pch) -endif() diff --git a/Source/Core/UpdaterCommon/CMakeLists.txt b/Source/Core/UpdaterCommon/CMakeLists.txt deleted file mode 100644 index 9bc1f9ab45..0000000000 --- a/Source/Core/UpdaterCommon/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_library(updatercommon - UI.h - UpdaterCommon.cpp - UpdaterCommon.h -) - -target_link_libraries(updatercommon PRIVATE - uicommon - MbedTLS::mbedtls - ZLIB::ZLIB - ed25519 - cpp-optparse -) - -if(MSVC) - # Add precompiled header - target_link_libraries(updatercommon PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/CMakeLists.txt b/Source/Core/VideoBackends/CMakeLists.txt deleted file mode 100644 index 0efc74ff8d..0000000000 --- a/Source/Core/VideoBackends/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -add_subdirectory(OGL) -add_subdirectory(Null) -add_subdirectory(Software) - -if(WIN32) - add_subdirectory(D3DCommon) - add_subdirectory(D3D) - add_subdirectory(D3D12) -endif() - -if(APPLE AND NOT LIBRETRO) - add_subdirectory(Metal) -endif() - -if(ENABLE_VULKAN) - add_subdirectory(Vulkan) -endif() diff --git a/Source/Core/VideoBackends/D3D/CMakeLists.txt b/Source/Core/VideoBackends/D3D/CMakeLists.txt deleted file mode 100644 index ed75b29b77..0000000000 --- a/Source/Core/VideoBackends/D3D/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -add_library(videod3d - D3DBase.cpp - D3DBase.h - D3DBoundingBox.cpp - D3DBoundingBox.h - D3DMain.cpp - D3DNativeVertexFormat.cpp - D3DPerfQuery.cpp - D3DPerfQuery.h - D3DGfx.cpp - D3DGfx.h - D3DState.cpp - D3DState.h - D3DSwapChain.cpp - D3DVertexManager.cpp - D3DVertexManager.h - DXPipeline.cpp - DXPipeline.h - DXShader.cpp - DXShader.h - DXTexture.cpp - DXTexture.h - VideoBackend.h -) - -target_link_libraries(videod3d -PUBLIC - common - videocommon - videod3dcommon -) - -if(MSVC) - # Add precompiled header - target_link_libraries(videod3d PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/D3D12/CMakeLists.txt b/Source/Core/VideoBackends/D3D12/CMakeLists.txt deleted file mode 100644 index bc89b89df3..0000000000 --- a/Source/Core/VideoBackends/D3D12/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -add_library(videod3d12 - D3D12BoundingBox.cpp - D3D12BoundingBox.h - D3D12PerfQuery.cpp - D3D12PerfQuery.h - D3D12Gfx.cpp - D3D12Gfx.h - D3D12StreamBuffer.cpp - D3D12StreamBuffer.h - D3D12SwapChain.cpp - D3D12SwapChain.h - D3D12VertexManager.cpp - D3D12VertexManager.h - DescriptorAllocator.cpp - DescriptorAllocator.h - DescriptorHeapManager.cpp - DescriptorHeapManager.h - DX12Context.cpp - DX12Context.h - DX12Pipeline.cpp - DX12Pipeline.h - DX12Shader.cpp - DX12Shader.h - DX12Texture.cpp - DX12Texture.h - DX12VertexFormat.cpp - DX12VertexFormat.h - VideoBackend.cpp - VideoBackend.h -) - -target_link_libraries(videod3d12 -PUBLIC - common - videocommon - videod3dcommon -) - -if(MSVC) - # Add precompiled header - target_link_libraries(videod3d12 PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt b/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt deleted file mode 100644 index 90464c72e7..0000000000 --- a/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -add_library(videod3dcommon - D3DCommon.cpp - D3DCommon.h - Shader.cpp - Shader.h - SwapChain.cpp - SwapChain.h -) - -target_link_libraries(videod3dcommon -PUBLIC - common - videocommon - spirv_cross -) - -if(MSVC) - # Add precompiled header - target_link_libraries(videod3dcommon PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/Metal/CMakeLists.txt b/Source/Core/VideoBackends/Metal/CMakeLists.txt deleted file mode 100644 index db633a0380..0000000000 --- a/Source/Core/VideoBackends/Metal/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -add_library(videometal - MRCHelpers.h - MTLBoundingBox.mm - MTLBoundingBox.h - MTLGfx.mm - MTLGfx.h - MTLMain.mm - MTLObjectCache.h - MTLObjectCache.mm - MTLPerfQuery.mm - MTLPerfQuery.h - MTLPipeline.mm - MTLPipeline.h - MTLShader.mm - MTLShader.h - MTLStateTracker.mm - MTLStateTracker.h - MTLTexture.mm - MTLTexture.h - MTLUtil.mm - MTLUtil.h - MTLVertexFormat.mm - MTLVertexFormat.h - MTLVertexManager.mm - MTLVertexManager.h - VideoBackend.h -) - -find_library(METAL_LIBRARY Metal) -find_library(QUARTZCORE_LIBRARY QuartzCore) - -target_link_libraries(videometal -PUBLIC - common - videocommon -PRIVATE - spirv_cross - ${FOUNDATION_LIBRARY} - ${METAL_LIBRARY} - ${QUARTZCORE_LIBRARY} -) - -target_compile_options(videometal PRIVATE -fno-objc-arc) diff --git a/Source/Core/VideoBackends/Null/CMakeLists.txt b/Source/Core/VideoBackends/Null/CMakeLists.txt deleted file mode 100644 index e8ad21bbe8..0000000000 --- a/Source/Core/VideoBackends/Null/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -add_library(videonull - NullBackend.cpp - NullBoundingBox.h - NullGfx.cpp - NullGfx.h - NullTexture.cpp - NullTexture.h - NullVertexManager.cpp - NullVertexManager.h - PerfQuery.h - TextureCache.h - VideoBackend.h -) - -target_link_libraries(videonull -PUBLIC - common - videocommon -) - -if(MSVC) - # Add precompiled header - target_link_libraries(videonull PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/OGL/CMakeLists.txt b/Source/Core/VideoBackends/OGL/CMakeLists.txt deleted file mode 100644 index d48624b7e7..0000000000 --- a/Source/Core/VideoBackends/OGL/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -add_library(videoogl - OGLBoundingBox.cpp - OGLBoundingBox.h - OGLConfig.cpp - OGLConfig.h - OGLGfx.cpp - OGLGfx.h - OGLMain.cpp - OGLNativeVertexFormat.cpp - OGLPerfQuery.cpp - OGLPerfQuery.h - OGLPipeline.cpp - OGLPipeline.h - OGLShader.cpp - OGLShader.h - OGLStreamBuffer.cpp - OGLStreamBuffer.h - OGLTexture.cpp - OGLTexture.h - OGLVertexManager.cpp - OGLVertexManager.h - ProgramShaderCache.cpp - ProgramShaderCache.h - SamplerCache.cpp - SamplerCache.h - VideoBackend.h -) - -target_link_libraries(videoogl PUBLIC common videocommon) -if(X11_FOUND) - target_link_libraries(videoogl PRIVATE PkgConfig::X11) -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(videoogl PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/Software/CMakeLists.txt b/Source/Core/VideoBackends/Software/CMakeLists.txt deleted file mode 100644 index acf152da8b..0000000000 --- a/Source/Core/VideoBackends/Software/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -add_library(videosoftware - Clipper.cpp - Clipper.h - CopyRegion.h - EfbCopy.cpp - EfbCopy.h - NativeVertexFormat.h - Rasterizer.cpp - Rasterizer.h - SetupUnit.cpp - SetupUnit.h - SWmain.cpp - SWBoundingBox.cpp - SWBoundingBox.h - SWEfbInterface.cpp - SWEfbInterface.h - SWGfx.cpp - SWGfx.h - SWOGLWindow.cpp - SWOGLWindow.h - SWTexture.cpp - SWTexture.h - SWVertexLoader.cpp - SWVertexLoader.h - Tev.cpp - Tev.h - TextureEncoder.cpp - TextureEncoder.h - TextureSampler.cpp - TextureSampler.h - TransformUnit.cpp - TransformUnit.h - VideoBackend.h -) - -target_link_libraries(videosoftware -PUBLIC - common - videocommon -) - -if(MSVC) - # Add precompiled header - target_link_libraries(videosoftware PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoBackends/Vulkan/CMakeLists.txt b/Source/Core/VideoBackends/Vulkan/CMakeLists.txt deleted file mode 100644 index 5f5583f2b0..0000000000 --- a/Source/Core/VideoBackends/Vulkan/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -add_library(videovulkan - CommandBufferManager.cpp - CommandBufferManager.h - Constants.h - ObjectCache.cpp - ObjectCache.h - ShaderCompiler.cpp - ShaderCompiler.h - StagingBuffer.cpp - StagingBuffer.h - StateTracker.cpp - StateTracker.h - VKBoundingBox.cpp - VKBoundingBox.h - VKMain.cpp - VKPerfQuery.cpp - VKPerfQuery.h - VKPipeline.cpp - VKPipeline.h - VKGfx.cpp - VKGfx.h - VKShader.cpp - VKShader.h - VKStreamBuffer.cpp - VKStreamBuffer.h - VKSwapChain.cpp - VKSwapChain.h - VKTexture.cpp - VKTexture.h - VKVertexFormat.cpp - VKVertexFormat.h - VKVertexManager.cpp - VKVertexManager.h - VulkanContext.cpp - VulkanContext.h - VulkanLoader.cpp - VulkanLoader.h -) - -target_link_libraries(videovulkan -PUBLIC - common - videocommon - -PRIVATE - xxhash::xxhash -) - -if (ANDROID AND _M_ARM_64) - target_link_libraries(videovulkan - PRIVATE - adrenotools - ) -endif() - -# Only include the Vulkan headers when building the Vulkan backend -target_include_directories(videovulkan -PRIVATE - ${CMAKE_SOURCE_DIR}/Externals/Vulkan-Headers/include - ${CMAKE_SOURCE_DIR}/Externals/VulkanMemoryAllocator/include - ${CMAKE_SOURCE_DIR}/Externals/libadrenotools/include -) - -if(MSVC) - # Add precompiled header - target_link_libraries(videovulkan PRIVATE use_pch) -endif() diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt deleted file mode 100644 index 69a0968e4d..0000000000 --- a/Source/Core/VideoCommon/CMakeLists.txt +++ /dev/null @@ -1,295 +0,0 @@ -add_library(videocommon - AbstractFramebuffer.cpp - AbstractFramebuffer.h - AbstractGfx.cpp - AbstractGfx.h - AbstractShader.h - AbstractStagingTexture.cpp - AbstractStagingTexture.h - AbstractTexture.cpp - AbstractTexture.h - Assets/AssetListener.h - Assets/CustomAsset.cpp - Assets/CustomAsset.h - Assets/CustomAssetCache.cpp - Assets/CustomAssetCache.h - Assets/CustomAssetLibrary.h - Assets/CustomAssetLoader.cpp - Assets/CustomAssetLoader.h - Assets/CustomTextureData.cpp - Assets/CustomTextureData.h - Assets/DirectFilesystemAssetLibrary.cpp - Assets/DirectFilesystemAssetLibrary.h - Assets/MaterialAsset.cpp - Assets/MaterialAsset.h - Assets/MeshAsset.cpp - Assets/MeshAsset.h - Assets/ShaderAsset.cpp - Assets/ShaderAsset.h - Assets/TextureAsset.cpp - Assets/TextureAsset.h - Assets/TextureAssetUtils.cpp - Assets/TextureAssetUtils.h - Assets/TextureSamplerValue.cpp - Assets/TextureSamplerValue.h - Assets/Types.h - Assets/WatchableFilesystemAssetLibrary.h - AsyncRequests.cpp - AsyncRequests.h - AsyncShaderCompiler.cpp - AsyncShaderCompiler.h - BoundingBox.cpp - BoundingBox.h - BPFunctions.cpp - BPFunctions.h - BPMemory.cpp - BPMemory.h - BPStructs.cpp - BPStructs.h - CommandProcessor.cpp - CommandProcessor.h - ConstantManager.h - Constants.h - CPMemory.cpp - CPMemory.h - CPUCull.cpp - CPUCull.h - CPUCullImpl.h - DriverDetails.cpp - DriverDetails.h - EFBInterface.cpp - EFBInterface.h - Fifo.cpp - Fifo.h - FramebufferManager.cpp - FramebufferManager.h - FramebufferShaderGen.cpp - FramebufferShaderGen.h - FrameDumper.cpp - FrameDumper.h - FrameDumpFFMpeg.h - FreeLookCamera.cpp - FreeLookCamera.h - GeometryShaderGen.cpp - GeometryShaderGen.h - GeometryShaderManager.cpp - GeometryShaderManager.h - GraphicsModSystem/Config/GraphicsMod.cpp - GraphicsModSystem/Config/GraphicsMod.h - GraphicsModSystem/Config/GraphicsModAsset.cpp - GraphicsModSystem/Config/GraphicsModAsset.h - GraphicsModSystem/Config/GraphicsModFeature.cpp - GraphicsModSystem/Config/GraphicsModFeature.h - GraphicsModSystem/Config/GraphicsModGroup.cpp - GraphicsModSystem/Config/GraphicsModGroup.h - GraphicsModSystem/Config/GraphicsTarget.cpp - GraphicsModSystem/Config/GraphicsTarget.h - GraphicsModSystem/Config/GraphicsTargetGroup.cpp - GraphicsModSystem/Config/GraphicsTargetGroup.h - GraphicsModSystem/Constants.h - GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp - GraphicsModSystem/Runtime/Actions/CustomPipelineAction.h - GraphicsModSystem/Runtime/Actions/MoveAction.cpp - GraphicsModSystem/Runtime/Actions/MoveAction.h - GraphicsModSystem/Runtime/Actions/PrintAction.cpp - GraphicsModSystem/Runtime/Actions/PrintAction.h - GraphicsModSystem/Runtime/Actions/ScaleAction.cpp - GraphicsModSystem/Runtime/Actions/ScaleAction.h - GraphicsModSystem/Runtime/Actions/SkipAction.cpp - GraphicsModSystem/Runtime/Actions/SkipAction.h - GraphicsModSystem/Runtime/CustomPipeline.cpp - GraphicsModSystem/Runtime/CustomPipeline.h - GraphicsModSystem/Runtime/CustomShaderCache.cpp - GraphicsModSystem/Runtime/CustomShaderCache.h - GraphicsModSystem/Runtime/FBInfo.cpp - GraphicsModSystem/Runtime/FBInfo.h - GraphicsModSystem/Runtime/GraphicsModAction.h - GraphicsModSystem/Runtime/GraphicsModActionData.h - GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp - GraphicsModSystem/Runtime/GraphicsModActionFactory.h - GraphicsModSystem/Runtime/GraphicsModManager.cpp - GraphicsModSystem/Runtime/GraphicsModManager.h - HiresTextures.cpp - HiresTextures.h - IndexGenerator.cpp - IndexGenerator.h - LightingShaderGen.cpp - LightingShaderGen.h - LookUpTables.h - NativeVertexFormat.h - NetPlayChatUI.cpp - NetPlayChatUI.h - NetPlayGolfUI.cpp - NetPlayGolfUI.h - OnScreenDisplay.cpp - OnScreenDisplay.h - OnScreenUI.cpp - OnScreenUI.h - OnScreenUIKeyMap.h - OpcodeDecoding.cpp - OpcodeDecoding.h - PerfQueryBase.cpp - PerfQueryBase.h - PerformanceMetrics.cpp - PerformanceMetrics.h - PerformanceTracker.cpp - PerformanceTracker.h - PipelineUtils.cpp - PipelineUtils.h - PixelEngine.cpp - PixelEngine.h - PixelShaderGen.cpp - PixelShaderGen.h - PixelShaderManager.cpp - PixelShaderManager.h - PostProcessing.cpp - PostProcessing.h - Present.cpp - Present.h - RenderState.cpp - RenderState.h - Resources/CustomResourceManager.cpp - Resources/CustomResourceManager.h - Resources/InvalidTextures.cpp - Resources/InvalidTextures.h - Resources/MaterialResource.cpp - Resources/MaterialResource.h - Resources/Resource.cpp - Resources/Resource.h - Resources/ShaderResource.cpp - Resources/ShaderResource.h - Resources/TextureAndSamplerResource.cpp - Resources/TextureAndSamplerResource.h - Resources/TextureDataResource.cpp - Resources/TextureDataResource.h - Resources/TexturePool.cpp - Resources/TexturePool.h - ShaderCache.cpp - ShaderCache.h - ShaderCompileUtils.cpp - ShaderCompileUtils.h - ShaderGenCommon.cpp - ShaderGenCommon.h - Spirv.cpp - Spirv.h - Statistics.cpp - Statistics.h - TextureCacheBase.cpp - TextureCacheBase.h - TextureConfig.cpp - TextureConfig.h - TextureConversionShader.cpp - TextureConversionShader.h - TextureConverterShaderGen.cpp - TextureConverterShaderGen.h - TextureDecoder.h - TextureDecoder_Common.cpp - TextureDecoder_Util.h - TextureInfo.cpp - TextureInfo.h - TextureUtils.cpp - TextureUtils.h - TMEM.cpp - TMEM.h - UberShaderCommon.cpp - UberShaderCommon.h - UberShaderPixel.cpp - UberShaderPixel.h - UberShaderVertex.cpp - UberShaderVertex.h - VertexLoader.cpp - VertexLoader.h - VertexLoaderBase.cpp - VertexLoaderBase.h - VertexLoaderManager.cpp - VertexLoaderManager.h - VertexLoaderUtils.h - VertexLoader_Color.cpp - VertexLoader_Color.h - VertexLoader_Normal.cpp - VertexLoader_Normal.h - VertexLoader_Position.cpp - VertexLoader_Position.h - VertexLoader_TextCoord.cpp - VertexLoader_TextCoord.h - VertexManagerBase.cpp - VertexManagerBase.h - VertexShaderGen.cpp - VertexShaderGen.h - VertexShaderManager.cpp - VertexShaderManager.h - VideoBackendBase.cpp - VideoBackendBase.h - VideoEvents.h - VideoCommon.h - VideoConfig.cpp - VideoConfig.h - VideoState.cpp - VideoState.h - Widescreen.cpp - Widescreen.h - XFMemory.cpp - XFMemory.h - XFStateManager.cpp - XFStateManager.h - XFStructs.cpp - XFStructs.h -) - -target_link_libraries(videocommon -PUBLIC - core - glslang::glslang -PRIVATE - fmt::fmt - spng::spng - xxhash::xxhash - imgui - implot - glslang::SPIRV - tinygltf -) - -if(_M_X86_64) - target_sources(videocommon PRIVATE - TextureDecoder_x64.cpp - VertexLoaderX64.cpp - VertexLoaderX64.h - ) -elseif(_M_ARM_64) - target_sources(videocommon PRIVATE - VertexLoaderARM64.cpp - VertexLoaderARM64.h - TextureDecoder_Generic.cpp - ) -else() - target_sources(videocommon PRIVATE - TextureDecoder_Generic.cpp - ) -endif() - -if(FFmpeg_FOUND) - target_sources(videocommon PRIVATE - FrameDumpFFMpeg.cpp - ) - target_link_libraries(videocommon PRIVATE - FFmpeg::avcodec - FFmpeg::avformat - FFmpeg::avutil - FFmpeg::swresample - FFmpeg::swscale - ) - if(APPLE) - target_link_libraries(videocommon PRIVATE - ${COREMEDIA_LIBRARY} - ${VIDEOTOOLBOX_LIBRARY} - ${COREVIDEO_LIBRARY} - ${AUDIOTOOLBOX_LIBRARY} - ) - endif() -endif() - -if(MSVC) - # Add precompiled header - target_link_libraries(videocommon PRIVATE use_pch) -endif() diff --git a/Source/Core/WinUpdater/CMakeLists.txt b/Source/Core/WinUpdater/CMakeLists.txt deleted file mode 100644 index 23135d706f..0000000000 --- a/Source/Core/WinUpdater/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -set (MANIFEST_FILE Updater.exe.manifest) - -add_executable(winupdater WIN32 - Main.cpp - Platform.cpp - WinUI.cpp - ${MANIFEST_FILE}) - -target_link_libraries(winupdater PRIVATE - uicommon - updatercommon - Comctl32 -) - -set_target_properties(winupdater PROPERTIES OUTPUT_NAME "Updater") - -if(MSVC) - # Add precompiled header - target_link_libraries(winupdater PRIVATE use_pch) -endif() diff --git a/Source/DSPTool/CMakeLists.txt b/Source/DSPTool/CMakeLists.txt deleted file mode 100644 index fb0cc41bcb..0000000000 --- a/Source/DSPTool/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_executable(dsptool DSPTool.cpp StubHost.cpp) -target_link_libraries(dsptool core) -if(NOT APPLE AND NOT WIN32) - install(TARGETS dsptool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() diff --git a/Source/PCH/CMakeLists.txt b/Source/PCH/CMakeLists.txt deleted file mode 100644 index 9123f803e0..0000000000 --- a/Source/PCH/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ -# The PCH that dolphin uses for MSVC is non-standard; -# Instead of having one PCH per module, dolphin has one PCH shared between all modules. -# So we need to implement PCH manually, rather than using the PCH support built into cmake - -# linking against this interface library will cause targets to enable PCH -add_library(use_pch INTERFACE) - -# Uncomment this return to disable PCH -#return() - -add_library(build_pch pch.h pch.cpp) - -# fmt/format.h is included in the PCH -target_link_libraries(build_pch PUBLIC fmt::fmt) - -# pch.cpp should be compiled with the /Yc command, which creates the precompiled header -target_compile_options(build_pch PRIVATE /Ycpch.h) - -# /Fp sets the location of the PCH. By forcing it to a fixed location, all modules -# will share this one PCH. We give it a fixed name so we can depend on it later -target_compile_options(build_pch PUBLIC /Fp$/dolphin.pch ) - -# Sharing a PCH breaks pdb files. So we use the /Z7 option to inline the pdb into -# the binary. However MSVC gets noisy if you set both /Zi and /Z7 -if (POLICY CMP0141) - # CMake 3.25 has a policy that makes us control this somewhat sanely - set_property(TARGET build_pch PROPERTY MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") - - # Unfortnually, properties don't propagate. So we also set it globally via parent scope - set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" PARENT_SCOPE) -else() - if (CMAKE_CXX_FLAGS_DEBUG MATCHES "/Zi") - # Otherwise we do an ugly string replace to remove it from FLAGS_DEBUG - string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") - - # and also overwrite the version in the parent scope - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE) - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" PARENT_SCOPE) - - target_compile_options(build_pch PUBLIC "$<$:/Z7>") - endif() -endif() -# Setting /Z7 also requires us to disable minimal rebuilds. -target_compile_options(build_pch PUBLIC "$<$:/Gm->") - -# To get this working with ninja, we need to tell it that compiling pch.cpp generates an extra output -set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES - OBJECT_OUTPUTS $/dolphin.pch -) - -# and then create a custom target that depends on the pch output -# so that ninja won't start building anything that depends on this -# target before the pch is built -add_custom_target(force_build_pch - DEPENDS $/dolphin.pch -) - -# link the pch into anything that depends on use_pch -target_link_libraries(use_pch INTERFACE build_pch) - -# targets which use the pch need these compile options -# /Yu - Use precompiled header named "pch.h" -# /FI - Force include "pch.h" at top of every source file -target_compile_options(use_pch INTERFACE /Yupch.h /FIpch.h) - -# For ninja, we need to depend on force_build_pch -add_dependencies(use_pch force_build_pch) diff --git a/Source/UnitTests/CMakeLists.txt b/Source/UnitTests/CMakeLists.txt deleted file mode 100644 index 659d9e5b28..0000000000 --- a/Source/UnitTests/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -enable_testing() -add_custom_target(unittests) -add_custom_command(TARGET unittests POST_BUILD COMMAND ${CMAKE_CTEST_COMMAND} "--output-on-failure") - -string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY "/Tests") - -add_executable(tests EXCLUDE_FROM_ALL UnitTestsMain.cpp StubHost.cpp) -set_target_properties(tests PROPERTIES FOLDER Tests) -target_link_libraries(tests PRIVATE fmt::fmt gtest::gtest core uicommon) -add_test(NAME tests COMMAND tests) -add_custom_command(TARGET tests POST_BUILD - COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sys" - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/Data/Sys" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sys" -) -add_dependencies(unittests tests) - -macro(add_dolphin_test target) - add_library(${target} OBJECT ${ARGN}) - target_link_libraries(${target} PUBLIC fmt::fmt gtest::gtest PRIVATE core uicommon) - target_link_libraries(tests PRIVATE ${target}) -endmacro() - -add_subdirectory(Common) -add_subdirectory(Core) -add_subdirectory(VideoCommon) diff --git a/Source/UnitTests/Common/CMakeLists.txt b/Source/UnitTests/Common/CMakeLists.txt deleted file mode 100644 index f7689b3ec4..0000000000 --- a/Source/UnitTests/Common/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -add_dolphin_test(AssemblerTest AssemblerTest.cpp) -add_dolphin_test(BitFieldTest BitFieldTest.cpp) -add_dolphin_test(BitSetTest BitSetTest.cpp) -add_dolphin_test(BitUtilsTest BitUtilsTest.cpp) -add_dolphin_test(BlockingLoopTest BlockingLoopTest.cpp) -add_dolphin_test(BusyLoopTest BusyLoopTest.cpp) -add_dolphin_test(CommonFuncsTest CommonFuncsTest.cpp) -add_dolphin_test(CryptoEcTest Crypto/EcTest.cpp) -add_dolphin_test(CryptoSHA1Test Crypto/SHA1Test.cpp) -add_dolphin_test(CWDemanglerTest CWDemanglerTest.cpp) -add_dolphin_test(EnumFormatterTest EnumFormatterTest.cpp) -add_dolphin_test(EventTest EventTest.cpp) -add_dolphin_test(FileUtilTest FileUtilTest.cpp) -add_dolphin_test(FixedSizeQueueTest FixedSizeQueueTest.cpp) -add_dolphin_test(FlagTest FlagTest.cpp) -add_dolphin_test(FloatUtilsTest FloatUtilsTest.cpp) -add_dolphin_test(MathUtilTest MathUtilTest.cpp) -add_dolphin_test(MutexTest MutexTest.cpp) -add_dolphin_test(NandPathsTest NandPathsTest.cpp) -add_dolphin_test(SettingsHandlerTest SettingsHandlerTest.cpp) -add_dolphin_test(SPSCQueueTest SPSCQueueTest.cpp) -add_dolphin_test(StringUtilTest StringUtilTest.cpp) -add_dolphin_test(SwapTest SwapTest.cpp) -add_dolphin_test(WorkQueueThreadTest WorkQueueThreadTest.cpp) - -if (_M_X86_64) - add_dolphin_test(x64EmitterTest x64EmitterTest.cpp) - target_link_libraries(x64EmitterTest PRIVATE bdisasm) -elseif (_M_ARM_64) - add_dolphin_test(Arm64EmitterTest Arm64EmitterTest.cpp) -endif() diff --git a/Source/UnitTests/Core/CMakeLists.txt b/Source/UnitTests/Core/CMakeLists.txt deleted file mode 100644 index 30aeae4477..0000000000 --- a/Source/UnitTests/Core/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -add_dolphin_test(MMIOTest MMIOTest.cpp) -add_dolphin_test(PageFaultTest PageFaultTest.cpp) -add_dolphin_test(CoreTimingTest CoreTimingTest.cpp) -add_dolphin_test(PatchAllowlistTest PatchAllowlistTest.cpp) - -add_dolphin_test(DSPAcceleratorTest DSP/DSPAcceleratorTest.cpp) -add_dolphin_test(DSPAssemblyTest - DSP/DSPAssemblyTest.cpp - DSP/DSPTestBinary.cpp - DSP/DSPTestText.cpp - DSP/HermesBinary.cpp - DSP/HermesText.cpp -) - -add_dolphin_test(ESFormatsTest IOS/ES/FormatsTest.cpp) - -add_dolphin_test(FileSystemTest IOS/FS/FileSystemTest.cpp) - -add_dolphin_test(SkylandersTest IOS/USB/SkylandersTest.cpp) - -if(_M_X86_64) - add_dolphin_test(PowerPCTest - PowerPC/DivUtilsTest.cpp - PowerPC/PageTableHostMappingTest.cpp - PowerPC/Jit64Common/ConvertDoubleToSingle.cpp - PowerPC/Jit64Common/Fres.cpp - PowerPC/Jit64Common/Frsqrte.cpp - ) -elseif(_M_ARM_64) - add_dolphin_test(PowerPCTest - PowerPC/DivUtilsTest.cpp - PowerPC/PageTableHostMappingTest.cpp - PowerPC/JitArm64/ConvertSingleDouble.cpp - PowerPC/JitArm64/FPRF.cpp - PowerPC/JitArm64/Fres.cpp - PowerPC/JitArm64/Frsqrte.cpp - PowerPC/JitArm64/MovI2R.cpp - ) -else() - add_dolphin_test(PowerPCTest - PowerPC/DivUtilsTest.cpp - PowerPC/PageTableHostMappingTest.cpp - ) -endif() - -target_sources(PowerPCTest PRIVATE - PowerPC/TestValues.h - StubJit.h -) diff --git a/Source/UnitTests/VideoCommon/CMakeLists.txt b/Source/UnitTests/VideoCommon/CMakeLists.txt deleted file mode 100644 index b5198536ed..0000000000 --- a/Source/UnitTests/VideoCommon/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_dolphin_test(VertexLoaderTest VertexLoaderTest.cpp)