Browse Source

more cleanups, custom dir support

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3289/head
crueter 3 weeks ago
parent
commit
0f608328a2
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 17
      CMakeLists.txt
  2. 76
      CMakeModules/CPMUtil.cmake
  3. 21
      docs/CPMUtil/AddCIPackage.md
  4. 8
      docs/CPMUtil/AddJsonPackage.md
  5. 40
      docs/CPMUtil/AddPackage.md
  6. 2
      docs/CPMUtil/AddQt.md
  7. 10
      docs/CPMUtil/README.md
  8. 12
      externals/CMakeLists.txt
  9. 52
      externals/cpmfile.json
  10. 2
      externals/ffmpeg/CMakeLists.txt
  11. 16
      externals/ffmpeg/cpmfile.json
  12. 2
      externals/libusb/CMakeLists.txt
  13. 12
      externals/libusb/cpmfile.json
  14. 2
      externals/nx_tzdb/CMakeLists.txt
  15. 11
      externals/nx_tzdb/cpmfile.json
  16. 4
      src/dynarmic/CMakeLists.txt
  17. 34
      src/dynarmic/externals/CMakeLists.txt
  18. 21
      src/dynarmic/externals/cpmfile.json
  19. 3
      src/video_core/host_shaders/CMakeLists.txt
  20. 2
      tools/cpm/package/which.sh

17
CMakeLists.txt

@ -160,6 +160,7 @@ set(EXT_DEFAULT OFF)
if (MSVC OR ANDROID)
set(EXT_DEFAULT ON)
endif()
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT})
# ffmpeg
@ -533,6 +534,11 @@ find_package(SimpleIni)
find_package(SPIRV-Tools)
find_package(sirit)
find_package(gamemode)
find_package(mcl)
if (ARCHITECTURE_riscv64)
find_package(biscuit)
endif()
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
find_package(xbyak)
@ -615,20 +621,19 @@ if (ENABLE_QT)
## Components ##
# Best practice is to ask for all components at once, so they are from the same version
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
set(YUZU_QT_COMPONENTS Core Widgets Concurrent)
if (PLATFORM_LINUX)
list(APPEND YUZU_QT_COMPONENTS2 DBus)
list(APPEND YUZU_QT_COMPONENTS DBus)
endif()
if (YUZU_USE_QT_MULTIMEDIA)
list(APPEND YUZU_QT_COMPONENTS2 Multimedia)
list(APPEND YUZU_QT_COMPONENTS Multimedia)
endif()
if (YUZU_USE_QT_WEB_ENGINE)
list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets)
list(APPEND YUZU_QT_COMPONENTS WebEngineCore WebEngineWidgets)
endif()
if (ENABLE_QT_TRANSLATION)
list(APPEND YUZU_QT_COMPONENTS2 LinguistTools)
list(APPEND YUZU_QT_COMPONENTS LinguistTools)
endif()
set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE)
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS})
set(QT_MAJOR_VERSION 6)

76
CMakeModules/CPMUtil.cmake

@ -23,8 +23,17 @@ set(CPMUTIL_JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json")
if(EXISTS ${CPMUTIL_JSON_FILE})
file(READ ${CPMUTIL_JSON_FILE} CPMFILE_CONTENT)
if (NOT TARGET cpmfiles)
add_custom_target(cpmfiles)
endif()
target_sources(cpmfiles PRIVATE ${CPMUTIL_JSON_FILE})
set_property(DIRECTORY APPEND PROPERTY
CMAKE_CONFIGURE_DEPENDS
"${CPMUTIL_JSON_FILE}")
else()
message(WARNING "[CPMUtil] cpmfile ${CPMUTIL_JSON_FILE} does not exist, AddJsonPackage will be a no-op")
message(DEBUG "[CPMUtil] cpmfile ${CPMUTIL_JSON_FILE}"
"does not exist, AddJsonPackage will be a no-op")
endif()
# Utility stuff
@ -68,10 +77,10 @@ function(AddJsonPackage)
set(oneValueArgs
NAME
# these are overrides that can be generated at runtime, so can be defined separately from the json
# these are overrides that can be generated at runtime,
# so can be defined separately from the json
DOWNLOAD_ONLY
BUNDLED_PACKAGE
)
BUNDLED_PACKAGE)
set(multiValueArgs OPTIONS)
@ -86,7 +95,8 @@ function(AddJsonPackage)
endif()
if(NOT DEFINED CPMFILE_CONTENT)
cpm_utils_message(WARNING ${name} "No cpmfile, AddJsonPackage is a no-op")
cpm_utils_message(WARNING ${name}
"No cpmfile, AddJsonPackage is a no-op")
return()
endif()
@ -94,7 +104,8 @@ function(AddJsonPackage)
cpm_utils_message(FATAL_ERROR "json package" "No name specified")
endif()
string(JSON object ERROR_VARIABLE err GET "${CPMFILE_CONTENT}" "${JSON_NAME}")
string(JSON object ERROR_VARIABLE
err GET "${CPMFILE_CONTENT}" "${JSON_NAME}")
if(err)
cpm_utils_message(FATAL_ERROR ${JSON_NAME} "Not found in cpmfile")
@ -112,7 +123,8 @@ function(AddJsonPackage)
get_json_element("${object}" raw_disabled disabled_platforms "")
if(raw_disabled)
array_to_list("${raw_disabled}" ${raw_disabled_LENGTH} disabled_platforms)
array_to_list("${raw_disabled}"
${raw_disabled_LENGTH} disabled_platforms)
else()
set(disabled_platforms "")
endif()
@ -152,8 +164,10 @@ function(AddJsonPackage)
get_json_element("${object}" raw_patches patches "")
# okay here comes the fun part: REPLACEMENTS!
# first: tag gets %VERSION% replaced if applicable, with either git_version (preferred) or version
# second: artifact gets %VERSION% and %TAG% replaced accordingly (same rules for VERSION)
# first: tag gets %VERSION% replaced if applicable,
# with either git_version (preferred) or version
# second: artifact gets %VERSION% and %TAG% replaced
# accordingly (same rules for VERSION)
if(git_version)
set(version_replace ${git_version})
@ -178,9 +192,11 @@ function(AddJsonPackage)
foreach(IDX RANGE ${range})
string(JSON _patch GET "${raw_patches}" "${IDX}")
set(full_patch "${CMAKE_SOURCE_DIR}/.patch/${JSON_NAME}/${_patch}")
set(full_patch
"${PROJECT_SOURCE_DIR}/.patch/${JSON_NAME}/${_patch}")
if(NOT EXISTS ${full_patch})
cpm_utils_message(FATAL_ERROR ${JSON_NAME} "specifies patch ${full_patch} which does not exist")
cpm_utils_message(FATAL_ERROR ${JSON_NAME}
"specifies patch ${full_patch} which does not exist")
endif()
list(APPEND patches "${full_patch}")
@ -289,8 +305,17 @@ function(AddPackage)
cpm_utils_message(FATAL_ERROR "package" "No package name defined")
endif()
option(${PKG_ARGS_NAME}_FORCE_SYSTEM "Force the system package for ${PKG_ARGS_NAME}")
option(${PKG_ARGS_NAME}_FORCE_BUNDLED "Force the bundled package for ${PKG_ARGS_NAME}")
set(${PKG_ARGS_NAME}_CUSTOM_DIR "" CACHE STRING
"Path to a separately-downloaded copy of ${PKG_ARGS_NAME}")
option(${PKG_ARGS_NAME}_FORCE_SYSTEM
"Force the system package for ${PKG_ARGS_NAME}")
option(${PKG_ARGS_NAME}_FORCE_BUNDLED
"Force the bundled package for ${PKG_ARGS_NAME}")
if (DEFINED ${PKG_ARGS_NAME}_CUSTOM_DIR AND
NOT ${PKG_ARGS_NAME}_CUSTOM_DIR STREQUAL "")
set(CPM_${PKG_ARGS_NAME}_SOURCE ${${PKG_ARGS_NAME}_CUSTOM_DIR})
endif()
if(NOT DEFINED PKG_ARGS_GIT_HOST)
set(git_host github.com)
@ -330,14 +355,16 @@ function(AddPackage)
set(PKG_BRANCH ${PKG_ARGS_BRANCH})
else()
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
"REPO defined but no TAG, SHA, BRANCH, or URL specified, defaulting to master")
"REPO defined but no TAG, SHA, BRANCH, or URL"
"specified, defaulting to master")
set(PKG_BRANCH master)
endif()
set(pkg_url ${pkg_git_url}/archive/refs/heads/${PKG_BRANCH}.tar.gz)
endif()
else()
cpm_utils_message(FATAL_ERROR ${PKG_ARGS_NAME} "No URL or repository defined")
cpm_utils_message(FATAL_ERROR ${PKG_ARGS_NAME}
"No URL or repository defined")
endif()
cpm_utils_message(DEBUG ${PKG_ARGS_NAME} "Download URL is ${pkg_url}")
@ -399,7 +426,8 @@ function(AddPackage)
# because "technically" the hash is invalidated each week
# but it works for now kjsdnfkjdnfjksdn
string(TOLOWER ${PKG_ARGS_NAME} lowername)
if(NOT EXISTS ${outfile} AND NOT EXISTS ${CPM_SOURCE_CACHE}/${lowername}/${pkg_key})
if(NOT EXISTS ${outfile} AND NOT EXISTS
${CPM_SOURCE_CACHE}/${lowername}/${pkg_key})
file(DOWNLOAD ${hash_url} ${outfile})
endif()
@ -425,7 +453,7 @@ function(AddPackage)
- CPMUTIL_FORCE_BUNDLED
- BUNDLED_PACKAGE
- default to allow local
]] #
]]
if(PKG_ARGS_FORCE_BUNDLED_PACKAGE)
set_precedence(OFF OFF)
elseif(${PKG_ARGS_NAME}_FORCE_SYSTEM)
@ -436,7 +464,8 @@ function(AddPackage)
set_precedence(ON ON)
elseif(CPMUTIL_FORCE_BUNDLED)
set_precedence(OFF OFF)
elseif(DEFINED PKG_ARGS_BUNDLED_PACKAGE AND NOT PKG_ARGS_BUNDLED_PACKAGE STREQUAL "unset")
elseif(DEFINED PKG_ARGS_BUNDLED_PACKAGE AND
NOT PKG_ARGS_BUNDLED_PACKAGE STREQUAL "unset")
if(PKG_ARGS_BUNDLED_PACKAGE)
set(local OFF)
else()
@ -526,7 +555,11 @@ function(AddCIPackage)
set(optionArgs MODULE)
cmake_parse_arguments(PKG_ARGS "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
cmake_parse_arguments(PKG_ARGS
"${optionArgs}"
"${oneValueArgs}"
"${multiValueArgs}"
${ARGN})
if(NOT DEFINED PKG_ARGS_VERSION)
message(FATAL_ERROR "[CPMUtil] VERSION is required")
@ -607,10 +640,11 @@ function(AddCIPackage)
DOWNLOAD_ONLY ${PKG_ARGS_MODULE})
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${${ARTIFACT_PACKAGE}_SOURCE_DIR}" PARENT_SCOPE)
set(${ARTIFACT_PACKAGE}_SOURCE_DIR
"${${ARTIFACT_PACKAGE}_SOURCE_DIR}" PARENT_SCOPE)
if (PKG_ARGS_MODULE)
list(PREPEND CMAKE_PREFIX_PATH "${${ARTIFACT_PACKAGE}_SOURCE_DIR}")
list(APPEND CMAKE_PREFIX_PATH "${${ARTIFACT_PACKAGE}_SOURCE_DIR}")
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
endif()
else()

21
docs/CPMUtil/AddCIPackage.md

@ -7,13 +7,14 @@
- `EXTENSION`: Artifact extension (default `tar.zst`)
- `MIN_VERSION`: Minimum version for `find_package`. Only used if platform does not support this package as a bundled artifact
- `DISABLED_PLATFORMS`: List of platforms that lack artifacts for this package. Options:
* `windows-amd64`
* `windows-arm64`
* `mingw-amd64`
* `mingw-arm64`
* `android`
* `solaris-amd64`
* `freebsd-amd64`
* `linux-amd64`
* `linux-aarch64`
* `macos-universal`
- `windows-amd64`
- `windows-arm64`
- `mingw-amd64`
- `mingw-arm64`
- `android-x86_64`
- `android-aarch64`
- `solaris-amd64`
- `freebsd-amd64`
- `linux-amd64`
- `linux-aarch64`
- `macos-universal`

8
docs/CPMUtil/AddJsonPackage.md

@ -22,11 +22,11 @@ If `ci` is `false`:
- `sha` -> `SHA`
- `key` -> `KEY`
- `tag` -> `TAG`
* If the tag contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified
- If the tag contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified
- `url` -> `URL`
- `artifact` -> `ARTIFACT`
* If the artifact contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified
* If the artifact contains `%TAG%`, that part will be replaced by the `tag` (with its replacement already done)
- If the artifact contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified
- If the artifact contains `%TAG%`, that part will be replaced by the `tag` (with its replacement already done)
- `git_version` -> `GIT_VERSION`
- `git_host` -> `GIT_HOST`
- `source_subdir` -> `SOURCE_SUBDIR`
@ -101,4 +101,4 @@ In order: OpenSSL CI, Boost (tag + artifact), Opus (options + find_args), discor
]
}
}
```
```

40
docs/CPMUtil/AddPackage.md

@ -17,7 +17,7 @@
- `URL`: The URL to fetch.
- `REPO`: The repo to use (`owner/repo`).
- `GIT_HOST`: The Git host to use
* Defaults to `github.com`. Do not include the protocol, as HTTPS is enforced.
- Defaults to `github.com`. Do not include the protocol, as HTTPS is enforced.
- `TAG`: The tag to fetch, if applicable.
- `ARTIFACT`: The name of the artifact, if applicable.
- `SHA`: Commit sha to fetch, if applicable.
@ -26,23 +26,23 @@
The following configurations are supported, in descending order of precedence:
- `URL`: Bare URL download, useful for custom artifacts
* If this is set, `GIT_URL` or `REPO` should be set to allow the dependency viewer to link to the project's Git repository.
* If this is NOT set, `REPO` must be defined.
- If this is set, `GIT_URL` or `REPO` should be set to allow the dependency viewer to link to the project's Git repository.
- If this is NOT set, `REPO` must be defined.
- `REPO + TAG + ARTIFACT`: GitHub release artifact
* The final download URL will be `https://github.com/${REPO}/releases/download/${TAG}/${ARTIFACT}`
* Useful for prebuilt libraries and prefetched archives
- The final download URL will be `https://github.com/${REPO}/releases/download/${TAG}/${ARTIFACT}`
- Useful for prebuilt libraries and prefetched archives
- `REPO + TAG`: GitHub tag archive
* The final download URL will be `https://github.com/${REPO}/archive/refs/tags/${TAG}.tar.gz`
* Useful for pinning to a specific tag, better for build identification
- The final download URL will be `https://github.com/${REPO}/archive/refs/tags/${TAG}.tar.gz`
- Useful for pinning to a specific tag, better for build identification
- `REPO + SHA`: GitHub commit archive
* The final download URL will be `https://github.com/${REPO}/archive/${SHA}.zip`
* Useful for pinning to a specific commit
- The final download URL will be `https://github.com/${REPO}/archive/${SHA}.zip`
- Useful for pinning to a specific commit
- `REPO + BRANCH`: GitHub branch archive
* The final download URL will be `https://github.com/${REPO}/archive/refs/heads/${BRANCH}.zip`
* Generally not recommended unless the branch is frozen
- The final download URL will be `https://github.com/${REPO}/archive/refs/heads/${BRANCH}.zip`
- Generally not recommended unless the branch is frozen
- `REPO`: GitHub master archive
* The final download URL will be `https://github.com/${REPO}/archive/refs/heads/master.zip`
* Generally not recommended unless the project is dead
- The final download URL will be `https://github.com/${REPO}/archive/refs/heads/master.zip`
- Generally not recommended unless the project is dead
## Hashing
@ -54,20 +54,20 @@ Hashing strategies, descending order of precedence:
- `HASH`: Bare hash verification, useful for static downloads e.g. commit archives
- `HASH_SUFFIX`: Download the hash as `${DOWNLOAD_URL}.${HASH_SUFFIX}`
* The downloaded hash *must* match the hash algorithm and contain nothing but the hash; no filenames or extra content.
- The downloaded hash *must* match the hash algorithm and contain nothing but the hash; no filenames or extra content.
- `HASH_URL`: Download the hash from a separate URL
## Other Options
- `KEY`: Custom cache key to use (stored as `.cache/cpm/${packagename_lower}/${key}`)
* Default is based on, in descending order of precedence:
- Default is based on, in descending order of precedence:
- First 4 characters of the sha
- `GIT_VERSION`
- Tag
- `VERSION`
- Otherwise, CPM defaults will be used. This is not recommended as it doesn't produce reproducible caches
- `DOWNLOAD_ONLY`: Whether or not to configure the downloaded package via CMake
* Useful to turn `OFF` if the project doesn't use CMake
- Useful to turn `OFF` if the project doesn't use CMake
- `SOURCE_SUBDIR`: Subdirectory of the project containing a CMakeLists.txt file
- `FIND_PACKAGE_ARGUMENTS`: Arguments to pass to the `find_package` call
- `BUNDLED_PACKAGE`: Set to `ON` to default to the bundled package
@ -80,12 +80,14 @@ Hashing strategies, descending order of precedence:
For each added package, users may additionally force usage of the system/bundled package.
- `${package}_DIR`: Path to a separately-downloaded copy of the package. Note that versioning is not checked!
- `${package}_FORCE_SYSTEM`: Require the package to be installed on the system
- `${package}_FORCE_BUNDLED`: Force the package to be fetched and use the bundled version
## System/Bundled Packages
Descending order of precedence:
- If `${package}_FORCE_SYSTEM` is true, requires the package to be on the system
- If `${package}_FORCE_BUNDLED` is true, forcefully uses the bundled package
- If `CPMUTIL_FORCE_SYSTEM` is true, requires the package to be on the system
@ -101,8 +103,8 @@ URLs:
- `GIT_URL`
- `REPO` as a Git repository
* You may optionally specify `GIT_HOST` to use a custom host, e.g. `GIT_HOST git.crueter.xyz`. Note that the git host MUST be GitHub-like in its artifact/archive downloads, e.g. Forgejo
* If `GIT_HOST` is unspecified, defaults to `github.com`
- You may optionally specify `GIT_HOST` to use a custom host, e.g. `GIT_HOST git.crueter.xyz`. Note that the git host MUST be GitHub-like in its artifact/archive downloads, e.g. Forgejo
- If `GIT_HOST` is unspecified, defaults to `github.com`
- `URL`
Versions (bundled):
@ -113,4 +115,4 @@ Versions (bundled):
- `TAG`
- "unknown"
If the package is a system package, AddPackage will attempt to determine the package version and append ` (system)` to the identifier. Otherwise, it will be marked as `unknown (system)`
If the package is a system package, AddPackage will attempt to determine the package version and append `(system)` to the identifier. Otherwise, it will be marked as `unknown (system)`

2
docs/CPMUtil/AddQt.md

@ -25,4 +25,4 @@ The following versions have available builds:
- 6.9.3
See [here](https://github.com/crueter-ci/Qt) for an updated list at any time.
See [`crueter-ci/Qt`](https://github.com/crueter-ci/Qt) for an updated list at any time.

10
docs/CPMUtil/README.md

@ -5,7 +5,7 @@ CPMUtil is a wrapper around CPM that aims to reduce boilerplate and add useful u
Global Options:
- `CPMUTIL_FORCE_SYSTEM` (default `OFF`): Require all CPM dependencies to use system packages. NOT RECOMMENDED!
* You may optionally override this (section)
- You may optionally override this (section)
- `CPMUTIL_FORCE_BUNDLED` (default `ON` on MSVC and Android, `OFF` elsewhere): Require all CPM dependencies to use bundled packages.
You are highly encouraged to read AddPackage first, even if you plan to only interact with CPMUtil via `AddJsonPackage`.
@ -42,8 +42,8 @@ CPMUtil will create three lists of dependencies where `AddPackage` or similar wa
- `CPM_PACKAGE_NAMES`: The names of packages included by CPMUtil
- `CPM_PACKAGE_URLS`: The URLs to project/repo pages of packages
- `CPM_PACKAGE_SHAS`: Short version identifiers for each package
* If the package was included as a system package, ` (system)` is appended thereafter
* Packages whose versions can't be deduced will be left as `unknown`.
- If the package was included as a system package, `(system)` is appended thereafter
- Packages whose versions can't be deduced will be left as `unknown`.
For an example of how this might be implemented in an application, see Eden's implementation:
@ -59,6 +59,8 @@ If you are packaging a project that uses CPMUtil, read this!
For sandboxed environments (e.g. Gentoo, nixOS) you must install all dependencies to the system beforehand and set `-DCPMUTIL_FORCE_SYSTEM=ON`. If a dependency is missing, get creating!
Alternatively, if CPMUtil pulls in a package that has no suitable way to install or use a system version, download it separately and pass `-DPackageName_DIR=/path/to/downloaded/dir` (e.g. shaders)
### Unsandboxed
For others (AUR, MPR, etc). CPMUtil will handle everything for you, including if some of the project's dependencies are missing from your distribution's repositories. That is pretty much half the reason I created this behemoth, after all.
For others (AUR, MPR, etc). CPMUtil will handle everything for you, including if some of the project's dependencies are missing from your distribution's repositories. That is pretty much half the reason I created this behemoth, after all.

12
externals/CMakeLists.txt

@ -25,7 +25,7 @@ set(BUILD_SHARED_LIBS OFF)
# Skip install rules for all externals
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON)
# Xbyak (also used by Dynarmic, so needs to be added first)
# Xbyak
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
if (PLATFORM_SUN OR PLATFORM_OPENBSD OR PLATFORM_NETBSD OR PLATFORM_DRAGONFLY)
AddJsonPackage(xbyak_sun)
@ -34,11 +34,19 @@ if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
endif()
endif()
# Oaknut (also used by Dynarmic, so needs to be added first)
# Oaknut
if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
AddJsonPackage(oaknut)
endif()
# biscuit
if (ARCHITECTURE_riscv64)
AddJsonPackage(biscuit)
endif()
# mcl
AddJsonPackage(mcl)
# enet
AddJsonPackage(enet)

52
externals/cpmfile.json

@ -225,5 +225,57 @@
"hash": "e87ec14ed3e826d578ebf095c41580069dda603792ba91efa84f45f4571a28f4d91889675055fd6f042d7dc25b0b9443daf70963ae463e38b11bcba95f4c65a9",
"version": "1.7",
"find_args": "MODULE"
},
"biscuit": {
"repo": "lioncash/biscuit",
"tag": "v%VERSION%",
"hash": "1229f345b014f7ca544dedb4edb3311e41ba736f9aa9a67f88b5f26f3c983288c6bb6cdedcfb0b8a02c63088a37e6a0d7ba97d9c2a4d721b213916327cffe28a",
"version": "0.9.1",
"git_version": "0.19.0"
},
"mcl": {
"version": "0.1.12",
"repo": "azahar-emu/mcl",
"sha": "7b08d83418",
"hash": "9c6ba624cb22ef622f78046a82abb99bf5026284ba17dfacaf46ac842cbd3b0f515f5ba45a1598c7671318a78a2e648db72ce8d10e7537f34e39800bdcb57694",
"options": [
"MCL_INSTALL OFF"
],
"patches": [
"0001-assert-macro.patch"
]
},
"libusb": {
"repo": "libusb/libusb",
"tag": "v%VERSION%",
"hash": "98c5f7940ff06b25c9aa65aa98e23de4c79a4c1067595f4c73cc145af23a1c286639e1ba11185cd91bab702081f307b973f08a4c9746576dc8d01b3620a3aeb5",
"find_args": "MODULE",
"git_version": "1.0.29",
"patches": [
"0001-netbsd-gettime.patch"
]
},
"ffmpeg": {
"repo": "FFmpeg/FFmpeg",
"sha": "5e56937b74",
"hash": "9ab0457dcd6ce6359b5053c1662f57910d332f68ca0cca9d4134d858464840917027374de3d97e0863c3a7daaea2fe4f4cd17d1c6d8e7f740f4ad91e71c2932b",
"bundled": true
},
"ffmpeg-ci": {
"ci": true,
"package": "FFmpeg",
"name": "ffmpeg",
"repo": "crueter-ci/FFmpeg",
"version": "8.0.1-5e56937b74",
"min_version": "4.1"
},
"tzdb": {
"package": "nx_tzdb",
"repo": "misc/tzdb_to_nx",
"git_host": "git.crueter.xyz",
"artifact": "%VERSION%.tar.gz",
"tag": "%VERSION%",
"hash": "dc37a189a44ce8b5c988ca550582431a6c7eadfd3c6e709bee6277116ee803e714333e85c9e6cbb5c69346a14d6f2cc7ed96e8aa09cc5fb8a89f945059651db6",
"version": "121125"
}
}

2
externals/ffmpeg/CMakeLists.txt

@ -4,8 +4,6 @@
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
include(CPMUtil)
# TODO(crueter, MaranBr): Externals FFmpeg 8.0
set(FFmpeg_HWACCEL_LIBRARIES)

16
externals/ffmpeg/cpmfile.json

@ -1,16 +0,0 @@
{
"ffmpeg": {
"repo": "FFmpeg/FFmpeg",
"sha": "5e56937b74",
"hash": "9ab0457dcd6ce6359b5053c1662f57910d332f68ca0cca9d4134d858464840917027374de3d97e0863c3a7daaea2fe4f4cd17d1c6d8e7f740f4ad91e71c2932b",
"bundled": true
},
"ffmpeg-ci": {
"ci": true,
"package": "FFmpeg",
"name": "ffmpeg",
"repo": "crueter-ci/FFmpeg",
"version": "8.0.1-5e56937b74",
"min_version": "4.1"
}
}

2
externals/libusb/CMakeLists.txt

@ -4,8 +4,6 @@
# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
include(CPMUtil)
AddJsonPackage(libusb)
if (NOT libusb_ADDED)

12
externals/libusb/cpmfile.json

@ -1,12 +0,0 @@
{
"libusb": {
"repo": "libusb/libusb",
"tag": "v%VERSION%",
"hash": "98c5f7940ff06b25c9aa65aa98e23de4c79a4c1067595f4c73cc145af23a1c286639e1ba11185cd91bab702081f307b973f08a4c9746576dc8d01b3620a3aeb5",
"find_args": "MODULE",
"git_version": "1.0.29",
"patches": [
"0001-netbsd-gettime.patch"
]
}
}

2
externals/nx_tzdb/CMakeLists.txt

@ -4,8 +4,6 @@
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
include(CPMUtil)
set(NX_TZDB_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
add_library(nx_tzdb INTERFACE)

11
externals/nx_tzdb/cpmfile.json

@ -1,11 +0,0 @@
{
"tzdb": {
"package": "nx_tzdb",
"repo": "misc/tzdb_to_nx",
"git_host": "git.crueter.xyz",
"artifact": "%VERSION%.tar.gz",
"tag": "%VERSION%",
"hash": "dc37a189a44ce8b5c988ca550582431a6c7eadfd3c6e709bee6277116ee803e714333e85c9e6cbb5c69346a14d6f2cc7ed96e8aa09cc5fb8a89f945059651db6",
"version": "121125"
}
}

4
src/dynarmic/CMakeLists.txt

@ -115,10 +115,6 @@ endif()
find_package(Boost 1.57 REQUIRED)
find_package(fmt 8 CONFIG)
# Pull in externals CMakeLists for libs where available
add_subdirectory(externals)
find_package(mcl 0.1.12 REQUIRED)
if ("arm64" IN_LIST ARCHITECTURE OR DYNARMIC_TESTS)

34
src/dynarmic/externals/CMakeLists.txt

@ -1,34 +0,0 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
include(CPMUtil)
# Always build externals as static libraries, even when dynarmic is built as shared
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
# Allow options shadowing with normal variables when subproject use old cmake policy
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
# Disable tests in all externals supporting the standard option name
set(BUILD_TESTING OFF)
# For libraries that already come with a CMakeLists file,
# simply add the directory to that file as a subdirectory
# to have CMake automatically recognize them.
# biscuit
if ("riscv" IN_LIST ARCHITECTURE)
AddJsonPackage(
NAME biscuit
BUNDLED_PACKAGE ${DYNARMIC_USE_BUNDLED_EXTERNALS}
)
endif()
# mcl
AddJsonPackage(
NAME mcl
BUNDLED_PACKAGE ${DYNARMIC_USE_BUNDLED_EXTERNALS}
)

21
src/dynarmic/externals/cpmfile.json

@ -1,21 +0,0 @@
{
"biscuit": {
"repo": "lioncash/biscuit",
"tag": "v%VERSION%",
"hash": "1229f345b014f7ca544dedb4edb3311e41ba736f9aa9a67f88b5f26f3c983288c6bb6cdedcfb0b8a02c63088a37e6a0d7ba97d9c2a4d721b213916327cffe28a",
"version": "0.9.1",
"git_version": "0.19.0"
},
"mcl": {
"version": "0.1.12",
"repo": "azahar-emu/mcl",
"sha": "7b08d83418",
"hash": "9c6ba624cb22ef622f78046a82abb99bf5026284ba17dfacaf46ac842cbd3b0f515f5ba45a1598c7671318a78a2e648db72ce8d10e7537f34e39800bdcb57694",
"options": [
"MCL_INSTALL OFF"
],
"patches": [
"0001-assert-macro.patch"
]
}
}

3
src/video_core/host_shaders/CMakeLists.txt

@ -88,8 +88,7 @@ set(SHADER_FILES
)
if (PLATFORM_HAIKU)
# glslangValidator WILL crash, glslang will not - why? Who the fuck knows
#/boot/home/glslang/build/StandAlone/glslangValidator
# glslangValidator WILL crash, glslang will not
set(GLSLANGVALIDATOR "glslang")
else()
# Normal sane platform who doesn't have a CRASHING glslangValidator

2
tools/cpm/package/which.sh

@ -7,6 +7,6 @@
JSON=$(echo "$CPMFILES" | xargs grep -l "\"$1\"")
[ -n "$JSON" ] || echo "!! No cpmfile definition for $1" >&2 && exit 1
[ -n "$JSON" ] || { echo "!! No cpmfile definition for $1" >&2 && exit 1; }
echo "$JSON"
Loading…
Cancel
Save