diff --git a/config.sh b/config.sh new file mode 100755 index 0000000..00d3dde --- /dev/null +++ b/config.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +cmd=${1} +package=tesseroids +address=/opt + +if [[ ${cmd} == "configure" && ! -d "build/" ]]; then + mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${address}/stow/${package} -DCMAKE_BUILD_TYPE=Release +elif [[ ${cmd} == "configure" ]]; then + cd build && rm -rf * && cmake .. -DCMAKE_INSTALL_PREFIX=${address}/stow/${package} -DCMAKE_BUILD_TYPE=Release +elif [[ ${cmd} == "build" ]]; then + cd build && make +elif [[ ${cmd} == "install" ]]; then + cd build && sudo make install + sudo stow --dir=${address}/stow --target=${address} ${package} +fi \ No newline at end of file diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 6ce57e9..613cbd7 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -60,5 +60,5 @@ endif() # 头文件安装命令 file(GLOB LIBTESS_HEAD *.h) -# 安装到/opt/include/tess +# 安装到include/tess install(FILES ${LIBTESS_HEAD} DESTINATION include/tess) \ No newline at end of file