Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows: set CMAKE_MSVC_RUNTIME_LIBRARY for zlib
Since v1.3, zlib advertises compatibility with CMake 3.15 which prefers to leave the MSVC runtime library selection flags out of the default CMAKE_<LANG>_FLAGS_<CONFIG> values and instead offer a first-class abstraction. The CMAKE_MSVC_RUNTIME_LIBRARY variable and MSVC_RUNTIME_LIBRARY target property may be set to select the MSVC runtime library. If they are not set then CMake uses the default value MultiThreaded$<$<CONFIG:Debug>:Debug>DLL which is equivalent to the flags for dynamic linking. This causes linking errors when building the statically linked Win32 version of libfido2. Adjust the default depending on our target build type to also allow for static linking. [1] https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html
- Loading branch information