TarsCloud / TarsFramework

Tars Basic service framework
BSD 3-Clause "New" or "Revised" License
200 stars 143 forks source link

tarscpp/CMakeList.txt 中的 MYSQL_DIR_INC/LIB 建议删除 #9

Closed oulong closed 5 years ago

oulong commented 5 years ago

build目录下 CMakeList.txt 已经有了 MYSQL_DIR_INC/LIB的定义。 如果采用自定义MYSQL_DIR_INC/LIB路径,容易漏改导致报错

ETZhangSX commented 5 years ago

你好,TarsFramework中只是引用了TarsCloud/TarsCpp作为子模块tarscpp,是一个独立的模块,不依赖于TarsFramework,删除会导致TarsCpp无法使用,因此没有办法删除。

若是担心漏改,可以使用如下命令修改所有文件的路径,将${mysql_inc}和${mysql_lib}替换为自己安装的路径即可

sed -i "s#/usr/local/mysql/include#${mysql_inc}#g" `grep /usr/local/mysql/include -rl ./*`
sed -i "s#/usr/local/mysql/lib#${mysql_lib}#g" `grep /usr/local/mysql/lib -rl ./*`