12345678910111213141516171819202122 |
- if [ "$#" -lt 1 ]; then
- echo "没有输入"
- echo "$1"
- exit
- fi
- HOSTQTLIB='/opt/qt/5.10.1/gcc_64/lib' #当前qt环境的lib目录
- RPATH='/home/root/ADS/lib' #运行依赖库的路径,目标板的qt库配置到该路径
- DEVICEQTLIB='/home/yuchuli/tem/qtbase-everywhere-src-5.10.1/lib' #qt的lib路径
- gccdir='/home/yuchuli/armgcc/surround_os/gcc-linaro-6.3.1/bin/aarch64-linux-gnu-gcc' #交叉编译的gcc路径
- gppdir='/home/yuchuli/armgcc/surround_os/gcc-linaro-6.3.1/bin/aarch64-linux-gnu-g++' #交叉编译的g++路径
- protoincdir='/home/yuchuli/tem/proto/protobuf-3.0.2/src' #交叉编译的protobuf路径
- yamlinc='/home/yuchuli/tem/yaml-cpp/include' #yaml include路径
- yamllib='/home/yuchuli/tem/yaml-cpp/build' #ymal lib路径
- sed -i "s:CC = gcc:CC = ${gccdir}:g" $1
- sed -i "s:CXX = g++:CXX = ${gppdir}:g" $1
- sed -i "s:LINK = g++:LINK = ${gppdir}:g" $1
- sed -i "s:INCPATH =:INCPATH =-I${protoincdir} -I${yamlinc} :g" $1
- sed -i "s:-rpath,${HOSTQTLIB}:-rpath,${RPATH}:g" $1
- sed -i "s:LIBS = :LIBS = -L${DEVICEQTLIB} -L${yamllib} :g" $1
|