You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2019/07/30 12:53:31 UTC
[mesos] 01/02: Fixed GLog linking with debug targets.
This is an automated email from the ASF dual-hosted git repository.
bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 37798b9ea89a6301d64e613ac3ddb2f86f9e233f
Author: Jan Schlicht <ja...@mesosphere.io>
AuthorDate: Tue Jul 30 10:00:38 2019 +0200
Fixed GLog linking with debug targets.
When building with debug symbols, the GLog library will be called
'libglogd' instead of 'libglog'. This is resolved by adding a suffix,
similar to how it's already done for the Protocol Buffers library.
Review: https://reviews.apache.org/r/71198/
---
3rdparty/CMakeLists.txt | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index a143b70..23ef7c1 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -398,10 +398,15 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
IMPORTED_IMPLIB_RELEASE ${GLOG_INSTALL_DIR}/lib/glog${CMAKE_IMPORT_LIBRARY_SUFFIX}
)
else ()
+ # This is for single-configuration generators such as GNU Make.
+ if (CMAKE_BUILD_TYPE MATCHES Debug)
+ set(GLOG_SUFFIX d)
+ endif ()
+
set_target_properties(
glog PROPERTIES
- IMPORTED_LOCATION ${GLOG_INSTALL_DIR}/lib/libglog${LIBRARY_SUFFIX}
- IMPORTED_IMPLIB ${GLOG_INSTALL_DIR}/lib/libglog${CMAKE_IMPORT_LIBRARY_SUFFIX}
+ IMPORTED_LOCATION ${GLOG_INSTALL_DIR}/lib/libglog${GLOG_SUFFIX}${LIBRARY_SUFFIX}
+ IMPORTED_IMPLIB ${GLOG_INSTALL_DIR}/lib/libglog${GLOG_SUFFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX}
)
endif ()