note:
Actually, static build is perfectly fine but the cmake always build static and dynamic library togather, in the static environment, dynamic build will fail due link error.
I twisted a patch to the CMakeLists.txt to make dynamic build happy when building static.