forked from shaunharker/CHomP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·31 lines (27 loc) · 1.19 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# install.sh [--prefix=PREFIX] [--build=BUILDTYPE] \
# [--search=SEARCHPATH] [CMake arguments]
#
# Build the project with the supplied configurations,
# or else default values.
#
# PREFIX gives the location to install.
# BUILDTYPE is either Debug or Release
# (or some other CMake recognizable build type)
# SEARCHPATH is an optional location to search for headers
# and libraries (i.e. SEARCHPATH/include and SEARCHPATH/lib)
# The default setting for PREFIX is /usr/local unless it is not writable
# in which case it is ~/.local.
# The default setting for BUILDTYPE is Release
# The default setting for SEARCHPATH is to be equal to PREFIX
# Additional arguments will be passed to CMake. Any paths in these arguments
# should be absolute.
SRC_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
build="$SRC_ROOT/.install/build.sh"
# Parse command line arguments
source $SRC_ROOT/.install/parse.sh
# Build "NetworkLogic"
cd $SRC_ROOT
$build --prefix=$PREFIX --searchpath=$SEARCHPATH --build=$BUILDTYPE --test $MASS || exit 1
echo "For a graphical test, type: ./build/bin/chomp-greyscale-to-cubical .\
/examples/rubik.jpg 128 ./examples/rubik.cub"