2011-05-16 13:12:07 +00:00
|
|
|
|
2013-07-18 21:03:01 +00:00
|
|
|
if(NOT CMAKE_CROSSCOMPILING)
|
|
|
|
add_definitions(-DDBGHELP_STATIC_LIB)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2013-07-18 21:03:01 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
add_definitions(-D_X86_)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${REACTOS_SOURCE_DIR}/tools
|
2016-04-20 12:36:25 +00:00
|
|
|
${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
|
|
|
list(APPEND SOURCE
|
|
|
|
compat.c
|
|
|
|
dbghelp.c
|
|
|
|
dwarf.c
|
|
|
|
module.c
|
|
|
|
pe_module.c
|
|
|
|
source.c
|
|
|
|
stabs.c
|
|
|
|
storage.c
|
|
|
|
symbol.c
|
|
|
|
type.c)
|
|
|
|
|
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
list(APPEND SOURCE cpu_i386.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(dbghelphost ${SOURCE})
|
|
|
|
else()
|
|
|
|
add_definitions(
|
|
|
|
-D__WINESRC__
|
|
|
|
-D_WINE
|
|
|
|
-DHAVE_ALLOCA_H
|
|
|
|
-D_IMAGEHLP_SOURCE_)
|
|
|
|
|
|
|
|
if(ARCH STREQUAL "amd64")
|
|
|
|
add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3)
|
|
|
|
endif()
|
2012-03-12 12:39:51 +00:00
|
|
|
|
2013-07-18 21:03:01 +00:00
|
|
|
include_directories(
|
2016-04-20 12:36:25 +00:00
|
|
|
BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine
|
|
|
|
${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
|
|
|
spec2def(dbghelp.dll dbghelp.spec ADD_IMPORTLIB)
|
|
|
|
|
|
|
|
list(APPEND SOURCE
|
|
|
|
coff.c
|
|
|
|
cpu_arm.c
|
|
|
|
cpu_arm64.c
|
|
|
|
cpu_i386.c
|
|
|
|
cpu_ppc.c
|
|
|
|
cpu_x86_64.c
|
|
|
|
crc32.c
|
|
|
|
dbghelp.c
|
|
|
|
dwarf.c
|
|
|
|
elf_module.c
|
|
|
|
image.c
|
|
|
|
macho_module.c
|
|
|
|
minidump.c
|
|
|
|
module.c
|
|
|
|
msc.c
|
|
|
|
path.c
|
|
|
|
pe_module.c
|
|
|
|
rosstubs.c
|
2017-02-17 16:18:15 +00:00
|
|
|
rsym.c
|
2013-07-18 21:03:01 +00:00
|
|
|
source.c
|
|
|
|
stabs.c
|
|
|
|
stack.c
|
|
|
|
storage.c
|
|
|
|
symbol.c
|
|
|
|
type.c
|
2018-03-04 22:54:20 +00:00
|
|
|
precomp.h
|
2014-02-10 12:19:56 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
2014-02-10 12:19:56 +00:00
|
|
|
add_library(dbghelp SHARED
|
|
|
|
${SOURCE}
|
|
|
|
version.rc
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
|
|
|
set_module_type(dbghelp win32dll)
|
|
|
|
target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames zlib)
|
|
|
|
add_delay_importlibs(dbghelp version)
|
|
|
|
add_importlibs(dbghelp psapi msvcrt kernel32 ntdll)
|
2018-03-04 22:54:20 +00:00
|
|
|
add_pch(dbghelp precomp.h SOURCE)
|
2013-07-18 21:03:01 +00:00
|
|
|
add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all)
|
|
|
|
|
|
|
|
endif()
|