-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.sh
49 lines (39 loc) · 1.39 KB
/
configure.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/bash
# Will exit the Bash script the moment any command will itself exit with a non-zero status, thus an error.
set -e
EXTRACT_PATH=$1
BUILD_PATH=$2
INSTALL_PATH=${REZ_BUILD_INSTALL_PATH}
DOXYGEN_VERSION=${REZ_BUILD_PROJECT_VERSION}
# We print the arguments passed to the Bash script.
echo -e "\n"
echo -e "================="
echo -e "=== CONFIGURE ==="
echo -e "================="
echo -e "\n"
echo -e "[CONFIGURE][ARGS] EXTRACT PATH: ${EXTRACT_PATH}"
echo -e "[CONFIGURE][ARGS] BUILD PATH: ${BUILD_PATH}"
echo -e "[CONFIGURE][ARGS] INSTALL PATH: ${INSTALL_PATH}"
echo -e "[CONFIGURE][ARGS] DOXYGEN VERSION: ${DOXYGEN_VERSION}"
# We check if the arguments variables we need are correctly set.
# If not, we abort the process.
if [[ -z ${EXTRACT_PATH} || -z ${BUILD_PATH} || -z ${INSTALL_PATH} || -z ${DOXYGEN_VERSION} ]]; then
echo -e "\n"
echo -e "[CONFIGURE][ARGS] One or more of the argument variables are empty. Aborting..."
echo -e "\n"
exit 1
fi
# We run the configuration script of Doxygen.
echo -e "\n"
echo -e "[CONFIGURE] Running the configuration script from Doxygen-${DOXYGEN_VERSION}..."
echo -e "\n"
mkdir -p ${BUILD_PATH}
cd ${BUILD_PATH}
cmake \
${BUILD_PATH}/.. \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC"
echo -e "\n"
echo -e "[CONFIGURE] Finished configuring Doxygen-${DOXYGEN_VERSION}!"
echo -e "\n"