You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/06/12 23:16:18 UTC
[12/27] mesos git commit: CMake: Windows: Fixed
configuration-dependent linkage of zlib.
CMake: Windows: Fixed configuration-dependent linkage of zlib.
The library generated by protobuf differs based on the configuration
and linkage. For example, in Debug mode, the static library generated
is `zlibstaticd`, whereas in Release mode, the shared library is just
`zlib`.
Review: https://reviews.apache.org/r/59784/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/31ca1073
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/31ca1073
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/31ca1073
Branch: refs/heads/master
Commit: 31ca10738149c7c15eb75040f7ea8a096741bf60
Parents: 00f59f8
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu Jun 8 14:30:53 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Jun 12 13:09:34 2017 -0700
----------------------------------------------------------------------
.../libprocess/cmake/Process3rdpartyConfigure.cmake | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/31ca1073/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index 0e50320..8da6ce6 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -108,15 +108,24 @@ if (WIN32)
# the library names are generated correctly.
set(CURL_LFLAG libcurl)
- # Windows requires a static build of zlib.
- set(ZLIB_LFLAG zlibstaticd)
-
set(PROTOBUF_LFLAG libprotobuf)
# The generator expression below appends the letter "d"
# when building the Debug configuration.
string(APPEND PROTOBUF_LFLAG $<$<CONFIG:Debug>:d>)
+ # Zlib generates different libraries depending on the linkage
+ # and configuration. i.e.:
+ # * For a static Debug build: `zlibstaticd`.
+ # * For a shared Release build: `zlib`.
+ set(ZLIB_LFLAG zlib)
+
+ if (NOT BUILD_SHARED_LIBS)
+ string(APPEND ZLIB_LFLAG static)
+ endif ()
+
+ string(APPEND ZLIB_LFLAG $<$<CONFIG:Debug>:d>)
+
# Windows requires Dbghelp.lib when linking to glog.
# NOTE: CMake's dependency graph does not pull in the `Dbghelp` library
# automatically as the glog dependency is added into Mesos as an