mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-02 19:07:34 +00:00
[cmake, tools, docs] Update CPMUtil (#2790)
updates CPMUtil to [`8f9b39fc98`](https://git.crueter.xyz/CMake/CPMUtil/commit/8f9b39fc980fc7079c7c4471c19f219180abe368) Makes the tooling/docs better and enforces usage of tar.gz everywhere as opposed to zips Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2790 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
+8
-9
@@ -7,22 +7,21 @@
|
||||
# CHANGE THESE FOR YOUR PROJECT! #
|
||||
##################################
|
||||
|
||||
# Which directories to search
|
||||
DIRS=". src"
|
||||
|
||||
# How many levels to go (3 is 2 subdirs max)
|
||||
MAXDEPTH=3
|
||||
|
||||
# shellcheck disable=SC2038
|
||||
# shellcheck disable=SC2016
|
||||
# shellcheck disable=SC2086
|
||||
[ -z "$PACKAGES" ] && PACKAGES=$(find $DIRS -maxdepth "$MAXDEPTH" -name cpmfile.json | xargs jq -s 'reduce .[] as $item ({}; . * $item)')
|
||||
# For your project you'll want to change this to define what dirs you have cpmfiles in
|
||||
# Remember to account for the MAXDEPTH variable!
|
||||
# Adding ./ before each will help to remove duplicates
|
||||
[ -z "$CPMFILES" ] && CPMFILES=$(find . ./src -maxdepth "$MAXDEPTH" -name cpmfile.json | sort | uniq)
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
[ -z "$PACKAGES" ] && PACKAGES=$(echo "$CPMFILES" | xargs jq -s 'reduce .[] as $item ({}; . * $item)')
|
||||
|
||||
# For your project you'll want to change the PACKAGES call to include whatever locations you may use (externals, src, etc.)
|
||||
# Always include .
|
||||
LIBS=$(echo "$PACKAGES" | jq -j 'keys_unsorted | join(" ")')
|
||||
|
||||
export PACKAGES
|
||||
export CPMFILES
|
||||
export LIBS
|
||||
export DIRS
|
||||
export MAXDEPTH
|
||||
|
||||
Reference in New Issue
Block a user