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
|
|
|
include_directories(
|
2020-09-11 17:05:02 +00:00
|
|
|
${REACTOS_SOURCE_DIR}/tools)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
|
|
|
list(APPEND SOURCE
|
|
|
|
compat.c
|
|
|
|
dbghelp.c
|
|
|
|
dwarf.c
|
2020-09-11 17:05:02 +00:00
|
|
|
inflate.c
|
2013-07-18 21:03:01 +00:00
|
|
|
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})
|
2019-11-15 13:07:46 +00:00
|
|
|
target_link_libraries(dbghelphost PRIVATE host_includes)
|
2013-07-18 21:03:01 +00:00
|
|
|
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(
|
2020-09-11 17:00:46 +00:00
|
|
|
BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
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_x86_64.c
|
|
|
|
dbghelp.c
|
|
|
|
dwarf.c
|
2020-09-11 17:00:45 +00:00
|
|
|
# elf_module.c
|
2013-07-18 21:03:01 +00:00
|
|
|
image.c
|
2020-09-11 17:00:45 +00:00
|
|
|
# macho_module.c
|
2020-09-11 17:05:02 +00:00
|
|
|
inflate.c
|
2013-07-18 21:03:01 +00:00
|
|
|
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-09-05 21:20:28 +00:00
|
|
|
precomp.h)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
2019-03-20 13:19:48 +00:00
|
|
|
add_library(dbghelp MODULE
|
2014-02-10 12:19:56 +00:00
|
|
|
${SOURCE}
|
|
|
|
version.rc
|
2018-09-05 21:20:28 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c
|
2014-02-10 12:19:56 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
|
2013-07-18 21:03:01 +00:00
|
|
|
|
|
|
|
set_module_type(dbghelp win32dll)
|
2020-09-11 17:00:46 +00:00
|
|
|
target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames)
|
2013-07-18 21:03:01 +00:00
|
|
|
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)
|
|
|
|
|
2021-03-03 01:54:37 +00:00
|
|
|
if(MSVC)
|
|
|
|
# Disable warning C4477 (printf format warnings)
|
|
|
|
remove_target_compile_option(dbghelp "/we4477")
|
2020-09-18 09:49:18 +00:00
|
|
|
endif()
|
2013-07-18 21:03:01 +00:00
|
|
|
endif()
|