Fix DbgHelp check

CMake didn't always find the correct DbgHelp.lib on Win64. Somehow,
nobody seems to have noticed!
issue1247
Nicolas Hake 2015-02-07 15:51:59 +01:00
parent 37eb7a0095
commit 0076fc7d7b
2 changed files with 4 additions and 3 deletions

View File

@ -792,8 +792,9 @@ CHECK_INCLUDE_FILES_CXX("X11/Xlib.h;X11/keysym.h" HAVE_X11_KEYSYM_H)
if(MSVC)
get_filename_component(WINSDK_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
mark_as_advanced(WINSDK_ROOT)
list(APPEND CMAKE_INCLUDE_PATH "${WINSDK_ROOT}/Include")
include_directories(SYSTEM ${WINSDK_ROOT}/Include)
if(${FIND_LIBRARY_USE_LIB64_PATHS})
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND CMAKE_LIBRARY_PATH ${WINSDK_ROOT}/Lib/x64)
else()
list(APPEND CMAKE_LIBRARY_PATH ${WINSDK_ROOT}/Lib)

View File

@ -1,6 +1,6 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2011-2013, The OpenClonk Team and contributors
# Copyright (c) 2011-2015, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
@ -18,7 +18,7 @@
# DBGHELP_LIBRARIES, the libraries needed to use DbgHelp.
# DBGHELP_FOUND, If false, do not try to use DbgHelp.
find_path(DBGHELP_INCLUDE_DIR NAMES dbghelp.h)
find_path(DBGHELP_INCLUDE_DIR NAMES dbghelp.h PATH_SUFFIXES include)
set(DBGHELP_NAMES ${DBGHELP_NAMES} dbghelp)
find_library(DBGHELP_LIBRARY NAMES ${DBGHELP_NAMES})