fix #39 cmake config and cpack is static build aware now