Files
eden/tools/cpm/cmake/package/dir.cmake
T
crueter 66b073ab8d [cmake] CPMUtil rewrite of the day number 852 (#4130)
Composite PR for several changes to CPMUtil, most notably:
- https://git.crueter.xyz/CMake/CPMUtil/pulls/19
- https://git.crueter.xyz/CMake/CPMUtil/pulls/22
- https://git.crueter.xyz/CMake/CPMUtil/pulls/24
- https://git.crueter.xyz/CMake/CPMUtil/pulls/25

These contain a lot of changes that generally simplify control flow and improve ease-of-use. Read those descriptions and patchsets for more info.

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4130
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-07-06 23:11:39 +02:00

33 lines
721 B
CMake
Executable File

#!/usr/bin/env -S cmake -P
# SPDX-FileCopyrightText: Copyright 2026 crueter
# SPDX-License-Identifier: LGPL-3.0-or-later
cmake_minimum_required(VERSION 3.31)
include(${CMAKE_CURRENT_LIST_DIR}/../ScriptUtils.cmake)
function(usage)
echo([=[
Usage: cpmutil.sh package dir [-a|--all] [PACKAGE]...
Get the local directory for the specified packages.
Options:
-a, --all Operate on all packages in this project.
]=])
endfunction()
parse_script_args(args)
# TODO: CI packages.
foreach(key ${args})
parse_key(${key})
# Guh.
get_cache_path(${package} ${version} cache_path)
cmake_path(ABSOLUTE_PATH cache_path NORMALIZE OUTPUT_VARIABLE abs_path)
echo("${key}: ${abs_path}")
endforeach()