bcb72a486733fabefb3e68f8436ca260b32b275b
[reactos.git] / dll / win32 / dbghelp / CMakeLists.txt
1
2 add_definitions(
3 -D__WINESRC__
4 -D_WINE
5 -DHAVE_ALLOCA_H
6 -D_IMAGEHLP_SOURCE_)
7
8 if(ARCH STREQUAL "amd64")
9 add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3)
10 endif()
11
12 include_directories(
13 ${REACTOS_SOURCE_DIR}/include/reactos/wine
14 ${REACTOS_SOURCE_DIR}/include/reactos/libs/zlib)
15
16 spec2def(dbghelp.dll dbghelp.spec ADD_IMPORTLIB)
17
18 list(APPEND SOURCE
19 coff.c
20 cpu_arm.c
21 cpu_arm64.c
22 cpu_i386.c
23 cpu_ppc.c
24 cpu_x86_64.c
25 crc32.c
26 dbghelp.c
27 dwarf.c
28 elf_module.c
29 image.c
30 macho_module.c
31 minidump.c
32 module.c
33 msc.c
34 path.c
35 pe_module.c
36 rosstubs.c
37 source.c
38 stabs.c
39 stack.c
40 storage.c
41 symbol.c
42 type.c
43 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c
44 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
45
46 add_library(dbghelp SHARED ${SOURCE} version.rc)
47
48 if(NOT MSVC)
49 # FIXME: http://www.cmake.org/Bug/view.php?id=12998
50 #allow_warnings(dbghelp)
51 set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
52 endif()
53
54 set_module_type(dbghelp win32dll)
55 target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames zlib)
56 add_delay_importlibs(dbghelp version)
57 add_importlibs(dbghelp psapi msvcrt kernel32 ntdll)
58 add_pch(dbghelp dbghelp_private.h)
59 add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all)