-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmakeplatform
More file actions
executable file
·25 lines (21 loc) · 849 Bytes
/
cmakeplatform
File metadata and controls
executable file
·25 lines (21 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
ECHO_PLATFORM=$1
ECHO_DEP_SCRIPTS_DIR=dependencies/scripts
if [ "${ECHO_ENGINE_INSTALL_DIR}" = "" ]; then
echo "Please specify the Echo install location:"
echo "You can avoid this prompt by setting ECHO_ENGINE_INSTALL_DIR"
read ECHO_ENGINE_INSTALL_DIR
if ! [ -d "${ECHO_ENGINE_INSTALL_DIR}" ]; then
echo "${ECHO_ENGINE_INSTALL_DIR} is not a directory"
exit 1;
fi
else
echo "ECHO_ENGINE_INSTALL_DIR is: ${ECHO_ENGINE_INSTALL_DIR}"
fi
BUILD_FOLDER=build-${ECHO_PLATFORM}
source ${ECHO_DEP_SCRIPTS_DIR}/${ECHO_PLATFORM}/${ECHO_PLATFORM}.config
mkdir -p $BUILD_FOLDER
cd $BUILD_FOLDER
BUILD_TYPE=${2:-Release}
echo "Build type: ${BUILD_TYPE}"
cmake ${CMAKE_OPTIONS_PLATFORM} -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DCMAKE_INSTALL_PREFIX="${ECHO_ENGINE_INSTALL_DIR}/${ECHO_PLATFORM}" -DECHO_TARGET_PLATFORM=$ECHO_PLATFORM ${@:2} ..