Have trouble compiling src on Linux

os is centos 6.5 x64. I’m using cmake for compiling the game. Commands are:

cmake .. -DCMAKE_BUILD_TYPE=optimized -DCMAKE_INSTALL_PREFIX="/opt" -DUSE_HOME_DIR=0 -DLUA=1 -DLUA_BINARY="/usr/local/bin/lua" -DLUA_INCLUDE_DIR="/usr/local/include" -DLUA_LIBRARY="/usr/local/lib/liblua.a" -DRELEASE=1 -DLANGUAGES="zh_CN" make && make install

This will raise tons of undefined symbol error on lua related code. I have lua5.1 in /usr and lua5.2 in /usr/local. Not sure how to pass all the path correctlly.

If I set LUA=0 then it’s all ok. Except I cannot start the game out of the project folder, game says:
DEBUG: could not read data/raw/keybindings.json

I checked /opt find data/* are put in /opt/share/cataclysm-dda/*. What should I do to set the game found the path correctly?

UPDATE: problem 2 solved, simply put the binary back to the project folder and delete all the installed data files. And use a shell script to launch game. Now I will try to make it work in dgamelaunch

*Sorry for my English, I hope I explain my problems clearly.