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.
This commit is contained in:
parent
e2caf9876e
commit
7f95ecfdc7
@ -458,7 +458,6 @@ endif (HAVE_EXECINFO_H)
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (HAVE_STACKTRACE 1)
|
set (HAVE_STACKTRACE 1)
|
||||||
set (HAVE_SYMBOLIZE 1)
|
set (HAVE_SYMBOLIZE 1)
|
||||||
target_link_libraries (glog PUBLIC Dbghelp.lib)
|
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
if (UNIX OR (APPLE AND HAVE_DLADDR))
|
if (UNIX OR (APPLE AND HAVE_DLADDR))
|
||||||
|
|||||||
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
#if defined(OS_WINDOWS)
|
#if defined(OS_WINDOWS)
|
||||||
#include <DbgHelp.h>
|
#include <DbgHelp.h>
|
||||||
|
#pragma comment(lib, "DbgHelp")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_START_GOOGLE_NAMESPACE_
|
_START_GOOGLE_NAMESPACE_
|
||||||
|
|||||||
@ -840,6 +840,7 @@ _END_GOOGLE_NAMESPACE_
|
|||||||
#elif defined(OS_WINDOWS)
|
#elif defined(OS_WINDOWS)
|
||||||
|
|
||||||
#include <DbgHelp.h>
|
#include <DbgHelp.h>
|
||||||
|
#pragma comment(lib, "DbgHelp")
|
||||||
|
|
||||||
_START_GOOGLE_NAMESPACE_
|
_START_GOOGLE_NAMESPACE_
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user