added install script

This commit is contained in:
Linus Vogel 2026-03-15 15:24:14 +01:00
parent e676e27010
commit fbe9021b04
3 changed files with 11 additions and 0 deletions

View File

@ -4,3 +4,5 @@ project(cputild C)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
add_executable(cputild main.c) add_executable(cputild main.c)
install(TARGETS cputild CONFIGURATIONS Release CONFIGURATIONS RelWithDebInfo)

9
install.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
SRC_DIR="$(realpath $(dirname $0))"
TMP_DIR="$(mktemp -d "cputild-build-XXXXXX" -p "/tmp")"
trap "rm -rf '$TMP_DIR'" EXIT
cmake -S "$SRC_DIR" -B "$TMP_DIR" -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build "$TMP_DIR"
sudo cmake --install "$TMP_DIR" --prefix "/usr/local"

BIN
install/bin/cputild Executable file

Binary file not shown.