<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Folks<br class=""><br class="">My project (<a href="http://exiv2.org" class="">exiv2.org</a>) uses zlib and is builds well on all platforms (Linux,<br class="">Cygwin, MacOS-X and Visual Studio) with CMake.<br class=""><br class="">A user complained that the CMake/Visual Studio static builds link zlib.dll<br class="">(zlibd.dll for debug) and wants to link zlibstatic.lib (zlibstaticd.lib). <br class="">I've tracked this down to FindZlib.cmake which sets ZLIB_FOUND,<br class="">ZLIB_LIBRARIES and ZLIB_INCLUDE_DIRS to use the zlib dynamic libraries.  For<br class="">the moment, I have a work-around which externally copies zlibstatic.lib to<br class="">overwrite zlib.lib.<br class=""><br class="">I've inspected the code in FindZlib.cmake and it doesn't appear to know<br class="">about zlibstatic.  I've unsuccessfully tried to use string(REPLACE ...) on<br class="">ZLIB_LIBRARIES.  I don't know CMake very well.  Is ZLIB_LIBRARIES a string<br class="">or a list of strings?  How can I either edit it, or get a new variable<br class="">ZLIB_STATIC_LIBRARIES to pass to target_link_libraries(...)<br class=""><br class="">Any suggestions?  All help appreciated.<br class=""><br class="">Robin Mills<div class=""><img apple-inline="yes" id="4FF93430-513B-4A9B-8A86-720AC7359E46" src="cid:701B5D1B-6253-42A6-8313-C0BC8FAFA438" class=""></div></body></html>