update library source code and optimize build setting