From c5539b31a5a4aa6ec2f0e5d2a893c9fb06bae0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Frohm=C3=BCller?= Date: Sun, 16 Oct 2022 14:10:29 +0200 Subject: [PATCH] Minor changes to build scripts. --- .gitignore | 7 +++++-- .vscode/settings.json | 15 +++++++++++++++ build.sh | 10 ++-------- clean.sh | 2 +- install-dependencies-deb.sh | 8 ++++---- install-dependencies-red.sh | 8 ++++---- install.sh | 8 ++++++++ 7 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 install.sh diff --git a/.gitignore b/.gitignore index 3724f65..f71d6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,10 @@ compile_commands.json CTestTestfile.cmake _deps -# Ignore build directory and build binaries +# Ignore build directories build debug -release \ No newline at end of file +release + +# Ignore IDE artifacts +# .vscode \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..dc74fe7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,15 @@ +{ + "cmake.configureOnEdit": true, + "cmake.configureOnOpen": true, + + "cmake.buildDirectory": "${workspaceFolder}/build", + "cmake.installPrefix": "${workspaceFolder}/debug", + + "cmake.debugConfig": { + + }, + + "cmake.configureSettings": { + + } +} \ No newline at end of file diff --git a/build.sh b/build.sh index b542c63..e6a3b54 100755 --- a/build.sh +++ b/build.sh @@ -1,14 +1,8 @@ mkdir build # Build for Debug and install locally -# cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=./debug - -# Build for Release and install locally -cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release - -# Build for Release and install to /usr/local/ -# cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ +cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=./debug cd build make -make install \ No newline at end of file +make install diff --git a/clean.sh b/clean.sh index dd1876e..ac9c63b 100755 --- a/clean.sh +++ b/clean.sh @@ -1,3 +1,3 @@ rm -r build rm -r debug -rm -r release \ No newline at end of file +rm -r release diff --git a/install-dependencies-deb.sh b/install-dependencies-deb.sh index 2c70677..287f02d 100755 --- a/install-dependencies-deb.sh +++ b/install-dependencies-deb.sh @@ -1,4 +1,4 @@ - -apt-get install libusb-0.1 -y -apt-get install make -y -apt-get install gcc -y +sudo apt-get install libusb-0.1 -y +sudo apt-get install make -y +sudo apt-get install cmake -y +sudo apt-get install gcc -y diff --git a/install-dependencies-red.sh b/install-dependencies-red.sh index dfdd569..750499b 100755 --- a/install-dependencies-red.sh +++ b/install-dependencies-red.sh @@ -1,4 +1,4 @@ - -yum install libusb-0.1 -y -yum install make -y -yum install gcc -y +sudo yum install libusb-0.1 -y +sudo yum install make -y +sudo yum install cmake -y +sudo yum install gcc -y diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..7c27e80 --- /dev/null +++ b/install.sh @@ -0,0 +1,8 @@ +mkdir build + +# Build for Release and install to /usr/local/ +cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ + +cd build +make +make install