added install script
This commit is contained in:
parent
e676e27010
commit
fbe9021b04
@ -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
9
install.sh
Executable 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
BIN
install/bin/cputild
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user