cmake: Add MinGW DLL Prefix Workaround

CMake assigns "lib" as the prefix to shared libraries on MinGW
GCC, but MinGW does not expect such a prefix when linking to
DLLs. By setting, CMAKE_SHARED_LIBRARY_PREFIX to "" the
example tests were able to run with the exception of the
calculator_test which segfaults (SIGSEGV) on the setjmp in
test_divide_by_zero. This fault is specific to MinGW and does not
occur within runs on Cygwin or Visual Studio.

calculator_test was enabled only for static linking on MinGW

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
3 files changed