1 Star 0 Fork 4

zhougl/sofa

forked from Gitee 极速下载/sofa 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
config.sh 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
####
# Determine the location of the script.
# This algorithm also works when sourcing the script
# or when some directories are symbolic links.
SCRIPT_PATH="${BASH_SOURCE[0]}";
if([ -h "${SCRIPT_PATH}" ]) then
while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
fi
pushd . > /dev/null
cd `dirname ${SCRIPT_PATH}` > /dev/null
SCRIPT_PATH=`pwd`;
popd > /dev/null
####
PLATFORM=$(uname)
if [ "$PLATFORM" = "Darwin" ]; then
PLATFORM=macx
else
PLATFORM=linux
fi
export SRC_DIR=$SCRIPT_PATH
# Add the first param (if it exist) to SCRIPT_PATH
# In general $1 is the cmake build directory
# readlink Remove unnecessary slashes (if $1 is empty)
if [ "$PLATFORM" = "macx" ]; then
# quick-and-dirty fix, since readlink -m is not available on MacOS
export BUILD_DIR=$PWD
else
export BUILD_DIR=$(readlink -m $PWD"/"$1"/")
fi
export PATH=$BUILD_DIR/bin:$PATH
export LD_LIBRARY_PATH=$BUILD_DIR/lib:$SRC_DIR/lib/$PLATFORM:$LD_LIBRARY_PATH
if [ "$PLATFORM" = "macx" ]; then
export DYLD_LIBRARY_PATH=$BUILD_DIR/lib:$SRC_DIR/lib/$PLATFORM:$DYLD_LIBRARY_PATH
fi
export LIBRARY_PATH=$BUILD_DIR/lib:$SRC_DIR/lib/$PLATFORM:$LIBRARY_PATH
export CPATH=$SRC_DIR/include:$CPATH
if [ "$BUILD_DIR" != "$SRC_DIR" ]; then
export SOFA_DATA_PATH=$SRC_DIR/examples:$SRC_DIR/share:$SOFA_DATA_PATH
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/zgl_yc_admin/sofa.git
[email protected]:zgl_yc_admin/sofa.git
zgl_yc_admin
sofa
sofa
master

搜索帮助