Commit 7f95ecfd authored by Andrew Schwartzmeyer's avatar Andrew Schwartzmeyer

Link to DbgHelp using pre-processor directive

This method ensure that all users of glog get automatically linked to
the DbgHelp library without needing to set compiler flags.
parent e2caf987
......@@ -458,7 +458,6 @@ endif (HAVE_EXECINFO_H)
if (WIN32)
set (HAVE_STACKTRACE 1)
set (HAVE_SYMBOLIZE 1)
target_link_libraries (glog PUBLIC Dbghelp.lib)
endif (WIN32)
if (UNIX OR (APPLE AND HAVE_DLADDR))
......
......@@ -40,6 +40,7 @@
#if defined(OS_WINDOWS)
#include <DbgHelp.h>
#pragma comment(lib, "DbgHelp")
#endif
_START_GOOGLE_NAMESPACE_
......
......@@ -840,6 +840,7 @@ _END_GOOGLE_NAMESPACE_
#elif defined(OS_WINDOWS)
#include <DbgHelp.h>
#pragma comment(lib, "DbgHelp")
_START_GOOGLE_NAMESPACE_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment