modify CMakeLists in 3rdparty, fix compile bug resulting from makefile changes