Add static compilation on CMake

Add the static compilation on CMake for others compilers besides Visual Studio