mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-17 18:02:35 +02:00
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2692>
35 lines
905 B
Bash
Executable File
35 lines
905 B
Bash
Executable File
#!/bin/sh
|
|
# Copyright 2019-2024, Collabora, Ltd.
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
# Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
|
|
|
# Formats all the CMake files in this project
|
|
|
|
set -e
|
|
|
|
CMAKE_FORMAT=cmake-format
|
|
if ! command -v ${CMAKE_FORMAT} > /dev/null; then
|
|
echo "cmake-format not found, do pipx install cmakelang" 1>&2
|
|
exit 1
|
|
fi
|
|
(
|
|
echo "${CMAKE_FORMAT}"
|
|
"${CMAKE_FORMAT}" -v
|
|
|
|
cd "$(dirname $0)/.."
|
|
find \
|
|
CMakeLists.txt \
|
|
doc \
|
|
src/xrt \
|
|
src/external/CMakeLists.txt \
|
|
src/external/imgui/CMakeLists.txt \
|
|
src/external/openxr_includes/CMakeLists.txt \
|
|
src/external/vulkan/CMakeLists.txt \
|
|
src/CMakeLists.txt \
|
|
tests \
|
|
\( -name "CMakeLists.txt" -o -name "*.cmake" \) \
|
|
! -name ".cmake" \
|
|
-print0 | \
|
|
xargs -0 "${CMAKE_FORMAT}" -c "$(pwd)/.cmake-format.py" -i
|
|
)
|