From 72199cacdf7d46a81a955e6e81e807e834204b61 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 2 Sep 2020 13:19:16 +0800 Subject: [PATCH] [TD-1305] --- cmake/install.inc | 4 ++-- packaging/tools/make_install.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/install.inc b/cmake/install.inc index 40b29973e1..7a92a396e3 100755 --- a/cmake/install.inc +++ b/cmake/install.inc @@ -2,7 +2,7 @@ IF (TD_LINUX) SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh") INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})") - INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR})") + INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})") ELSEIF (TD_WINDOWS) IF (TD_POWER) SET(CMAKE_INSTALL_PREFIX C:/PowerDB) @@ -40,5 +40,5 @@ ELSEIF (TD_DARWIN) SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh") INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})") - INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin)") + INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})") ENDIF () diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index 6ee3b75c55..eff70d8035 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -10,6 +10,7 @@ set -e source_dir=$1 binary_dir=$2 osType=$3 +verNumber=$4 if [ "$osType" != "Darwin" ]; then script_dir=$(dirname $(readlink -f "$0")) @@ -180,7 +181,7 @@ function install_lib() { ${csudo} rm -f ${lib64_link_dir}/libtaos.* || : if [ "$osType" != "Darwin" ]; then - ${csudo} cp ${binary_dir}/build/lib/* ${install_main_dir}/driver && ${csudo} chmod 777 ${install_main_dir}/driver/* + ${csudo} cp ${binary_dir}/build/lib/libtaos.so.${verNumber} ${install_main_dir}/driver && ${csudo} chmod 777 ${install_main_dir}/driver/* ${csudo} ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1 ${csudo} ln -sf ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so -- GitLab