For Windows builds, zlib provides 4 build files:
- Makefile.gcc for MinGW
- Makefile.msvc and MSBuild files for Visual Studio
- CMake
For a given compiler, names of generated binaries are not consistent among these build systems:
MinGW:
| build file |
static |
shared (import lib & dll) |
| Makefile.gcc |
libz.a |
libz.dll.a & zlib1.dll |
| CMakeLists.txt |
libzlibstatic.a |
libzlib.dll.a & libzlib1.dll |
Visual Studio:
| build file |
static |
shared (import lib & dll) |
| Makefile.msvc |
zlib.lib |
zdll.lib & zlib1.dll |
| MSBuild |
zlibstat.lib |
zlibwapi.lib & zlibwapi.dll |
| CMakeLists.txt |
zlibstatic[d].lib |
zlib[d].lib & zlib[d]1.dll |
Wouldn't it be better to follow Makefiles names in CMakeLists.txt? What is considered canonical name for each compiler?